Posts Tagged ‘ vz

openVZ: Automatic VETH Bridging Script

When you use openVZ you will sooner or later need virtual ethernet interfaces in VEs you’re going to bridge to an interface on your host node – for example to put your container into some special VLAN. Though openVZ included the optional “bridge” parameter to their configuration specification, they do not provide an automatic way of dealing with it once you set it up so you’ll have to take care about it yourself.

We wrote a script that allows you to bridge the virtual ethernet interface automatically to the hosts interface you specified within your VEs configuration once you start a virtual entity. All you have to do is saving it to /etc/vz/scripts, making it executable and starting it along with the VE mount event. To do this, insert “/etc/vz/ $VEID &” into /etc/vz/conf/vps.mount (you might have to create the vps.mount file in first place and make it executeable too.).

You’ll find the script available for download here