Friday, November 25, 2011

XenServer Virtual Lab (Part 2) : KVM Virtual Networks

In this part I show you how you can quickly configure a simple virtual networks in Virtual Machine Manager. The base of my solution is qemu-kvm-0.15.1-3.fc16.x86_64 with virt-manager-0.9.0-7.fc16.noarch. I will be not explaining here how to install those packages as there are tons of materials available online for this subject.

I will be using four virtual networks:
- default : this is a default network configured with fresh installation of KVM and it will be used to access the Internet and give an access to the VMs from the host system
- isolated : this will be used for management and communication between XenCenter and XenServer
- iscsi : this is for connecting iSCSI LUN from the RHEL6 VM running iSCSI target software
- heartbeat : used for any heartbeat requirements

The default network uses NAT and has enabled DHCP. The other networks are isolated and have DHCP disabled as I want to run DHCP from the Windows VM.

Now lunch your Virtual Machine Manager, select Edit > Connection details > Virtual Networks and let's start the adventure...

The first screenshot shows the final virtual networks.


 Click the button on the left bottom corner with a green + icon to start a wizard.


Choose a name for the network.


Select the IPv4 network. This is set the default gateway for this network as well.


Disable DHCP for this network.


Isolate this network. This means that the VMs will not have an access to the external networks via your host system or physical NIC(s) in your system while connected to this network. Only VMs connected to the same network will be able to communicate with each other.


Double check the summary window and press Finish button if you are happy with your selections.


Repeat those steps to create the networks you want to use.
Of course you can enable DHCP and connect to the physical networks if required.

To verify the configuration of your networks you can use virsh and brctl. See man pages for those commands for more information on how to use them.




:: XenServer Virtual Lab (Part 1) : Introduction
:: XenServer Virtual Lab (Part 2) : KVM Virtual Networks

To be continued...