Installation with Virtual Box
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.
Alternatively, the VboxManage tool can be used to edit the network configuration from the command-line.
VBoxManage modifyvm <vmname> --nic1 bridged --bridgeadapter1 <interface_to_bridge_to>
The hosts should now be able to communicate via the Xenon switch. xenon-ctl show should show traffic counters increasing on the bridged interfaces.
~$ xenon-ctl show indigo: kernel lookups: hit=348 missed=444 lost=0 kernel flows=0 ports: 0 indigo (internal) rx: packets=0 bytes=0 errors=0 dropped=0 tx: packets=0 bytes=0 errors=0 dropped=0 1 veth0 rx: packets=0 bytes=0 errors=0 dropped=0 tx: packets=420 bytes=25632 errors=0 dropped=0 2 veth1 rx: packets=0 bytes=0 errors=0 dropped=0 tx: packets=420 bytes=25632 errors=0 dropped=0 3 veth2 rx: packets=531 bytes=38992 errors=0 dropped=0 tx: packets=261 bytes=22944 errors=0 dropped=0 4 veth3 rx: packets=261 bytes=22944 errors=0 dropped=0 tx: packets=531 bytes=38992 errors=0 dropped=0 5 veth4 rx: packets=0 bytes=0 errors=0 dropped=0 tx: packets=420 bytes=25632 errors=0 dropped=0 6 veth5 rx: packets=0 bytes=0 errors=0 dropped=0 tx: packets=420 bytes=25632 errors=0 dropped=0 7 veth6 rx: packets=0 bytes=0 errors=0 dropped=0 tx: packets=420 bytes=25632 errors=0 dropped=0 8 veth7 rx: packets=0 bytes=0 errors=0 dropped=0 tx: packets=420 bytes=25632 errors=0 dropped=0 1023 gre (gre) rx: packets=0 bytes=0 errors=0 dropped=0 tx: packets=0 bytes=0 errors=0 dropped=420