Prerequisites
Follow the instructions at the IVS Installation Guide to get IVS installed and running.
Installation
Install the packages required for virtualbox
sudo apt-get install virtualbox-4.2
Create a TAP interface for each virtual machine that will be running on the host. The following command creates 8 interfaces numbered veth0 to veth7.
for tap in `seq 0 7`; do sudo ip tuntap add mode tap veth$tap; sudo ip link set veth$tap up; done
Edit /etc/rc.local to automatically create the TAP interfaces at startup.
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. for tap in `seq 0 7`; do sudo ip tuntap add mode tap veth$tap; sudo ip link set veth$tap up; done /etc/init.d/xenon restart exit 0
Modify the IVS configuration file /etc/default/ivs to include the virtual interfaces.
# Default to connecting to a local OpenFlow controller DAEMON_ARGS="-c 127.0.0.1:6633 -i veth0 -i veth1 -i veth2 -i veth3 -i veth4 -i veth5 -i veth6 -i veth7"
Restart xenon to apply the changes
sudo restart xenon
To connect a virtual machine to the Xenon switch, go to the network configuration under Machine->Settings->Network, select Bridged Adapter, and then choose one of the veth interfaces.