slackbuilds_ponce/network/openvswitch/xen/README
Christopher Walker 444996d10d network/openvswitch: Added (multilayer virtual switch)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
2011-08-22 08:23:47 -03:00

39 lines
1.7 KiB
Text

Here are some scripts that I've written for use with Xen at my site.
In order to use these scripts with your Xen installation you'll need to copy
both the network-openvswitch and vif-openvswitch files to your
/etc/xen/scripts directory. You can instruct Xen to use these scripts by
editing your /etc/xen/xend-config.sxp file and specifying these scripts as
the default network-script and vif-script.
For example, here are the entries in my xend-config.sxp file:
(network-script 'network-openvswitch netdev=eth2 bridge=ovs0')
(vif-script 'vif-openvswitch bridge=ovs0')
If your network interface card and attached network switch support VLAN
tagged traffic, you can place virtual machines within a seperate VLAN by
appending a '.' and the VLAN tag number you wish the domain to use. For
example, to have all domains default to VLAN 2 you can do the following:
(vif-script 'vif-openvswitch bridge=ovs0.2')
You can also specify tagged traffic in the domain configuration file.
If you are hosting a hardware virtualized domain understand that the
/etc/xen/scripts/qemu-ifup script is run instead of the vif-script specified
in the xend-config.sxp file. You'll need to edit this file to add the port
to the vswitch instead of using the brctl (unless of course you are using
the appropriate kernel module to control the vswitch using brctl.) Here is
a snippet from my qemu-ifup to handle hardware virtualized ports:
if lsmod | grep -c openvswitch_mod 1> /dev/null && ! lsmod | grep -c brcompat_mod 1> /dev/null
then
ovs-vsctl -- --may-exist add-port $bridge $1
else
brctl addif $bridge $1 || true
fi
This doesn't handle tagged traffic. I'll leave that as an exercise for you.
Enjoy.