Today we’re going to run a virtual machine using the KVM hypervisor and an openvswitch based virtual network. I’ve recorded a screencast so you can follow the steps easily. I’m going to configure a virtual network using openvswitch and I’ll test connectivity pinging my router 192.168.1.1.
Before the screencast a few comments:
- I’m going to add a rule in iptables allowing traffic for VNC connection using the following commands:
iptables -I INPUT -p tcp --dport 29876 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT service iptables save
- I’m using the ttylinux image from the OpenNebula market as it is small. I’m skipping the “Create image” step so image downloading time doesn’t affect the screencast.
- The virtual machine template will run with 512 MB of RAM and it’ll use 50% of a CPU (maximum).
- A virtual network called net0 is created with a fixed range (192.168.1.21,192.168.1.22,192.168.1.23) though just one IP address would be needed.
- ttylinux image is ready for contextualization so an IP address from the net0 pool will be automatically assigned after adding a NIC to the template. My openvswitch bridge is named br0.
And finally here is the video: