mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-26 22:06:35 +01:00
…
|
||
---|---|---|
.. | ||
network-openvswitch | ||
README | ||
vif-openvswitch |
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.