Hi,
I think new versions of OpenVZ might have some improvements; in my case I am using an old version (from Debian Lenny) and I did it with scripts (can be found in the wiki):
1.) config file
NETIF="ifname=eth0,mac=00:18:51:C5:33:F8,host_ifname=veth200.0,host_mac=00:18:51:0D:89:B9"
CONFIG_CUSTOMIZED="yes"
VZHOSTBR="br-lan"
CONFIG_CUSTOMIZED tells OpenVZ to execute a script (see below) and VZHOSTBR tells the script to which bridge the device should be assigned.
The script is configured in vz.conf via:
EXTERNAL_SCRIPT="/usr/local/sbin/vznetaddbr"
If you need more details on this please let me know!
The VLANs itself are assigned to the VLANs directly on the host. In my case in Debian:
iface br-wan inet manual
bridge_ports eth0.3
bridge_maxwait 0
iface br-lan inet static
address 192.168.200.1
netmask 255.255.255.0
gateway 192.168.200.120
bridge_ports eth0.2
bridge_maxwait 0
iface br-stfg inet manual
bridge_ports eth0.4
bridge_maxwait 0
iface vlan1 inet static
vlan-raw-device eth0
address 10.7.1.10
netmask 255.255.255.0
As you can see, VLAN 3 and VLAN 4 do not have an interface on the host but are just used to "export" these interfaces to some OpenVZ guests. This way I have WAN and internal guests together.
Regards,
divB