== Building A VM host == External3 was rebuilt into a VM host. {{{ BASE OS: Ubunut 11.04 Bridge: Open V Switch Emulator: KVM }}} === Building the Host === It was built using the following steps: 1. Install Ubuntu 11.04 from CD (with stock kernel): Had to switch to version 11.04 for kernel compatibly with openvswitch. The running Kernel Version is: {{{ root@external3:~# uname -r 2.6.38-8-server root@external3:~# uname -a Linux external3 2.6.38-8-server #42-Ubuntu SMP Mon Apr 11 03:49:04 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux }}} 1. run kvm-ok. You might need to run {{{ apt-get install cpu-checker }}} Check for a message like this one: {{{ INFO: /dev/kvm does not exist HINT: sudo modprobe kvm_intel INFO: Your CPU supports KVM extensions INFO: KVM (vmx) is disabled by your BIOS HINT: Enter your BIOS setup and enable Virtualization Technology (VT), and then hard poweroff/poweron your system KVM acceleration can NOT be used }}} If disabled, you will need to enter the bios to enable it. 1. Install the openvswitch packages. Do not use the Ubuntu repositories since the install the incorrect versions of the package, instead download the packages that match your kernel version from [http://openvswitch.org/releases/binaries/1.2.2.10448/natty_amd64/ here] I downloaded: {{{ openvswitch-datapath-module-2.6.38-8-server_1.2.2.10448_amd64.deb openvswitch-common_1.2.2.10448_amd64.deb openvswitch-switch_1.2.2.10448_amd64.deb openvswitch-brcompat_1.2.2.10448_amd64.deb }}} and then Installed them in that order with "dpkg -i". 1. Once these are installed you can start/restart the openvswitch dameon {{{ /etc/init.d/openvswitch-switch }}} 1. The readme refrenced [http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.KVM;hb=HEAD here] recomends installing the uml utilities, I didn't need them but I installed them any way. {{{ apt-get install uml-utilities }}} 1. After these components were installed I added a bridge and got it an address: {{{ ovs-vsctl add-br br0 ovs-vsctl add-port br0 eth0 ifconfig eth0 up dhclient br0 }}} In retrospect I could have used brctl once I brought up the compatibly daemon. 1. As referenced in the brcompat documentation [http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.bridge;hb=HEAD here], I took these steps to bring up the bridge daemon. According to the kvm documentation, you don't really need brcompat however virtmanager fails to build VM's if you don't bring up the daemon. '''NOTE''' you do not need, and should not install bridge-utils, it will load the bridge modules and create conflicts with openvswitch_mod. {{{ insmod /lib/modules/2.6.38-8-server/kernel/brcompat_mod.ko ovs-brcompatd --pidfile --detach }}} 1. Now we're ready to install the KVM packages documented [https://help.ubuntu.com/community/KVM/Installation here], all but the bridge-utils: {{{ sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder virt-manager }}} 1. From here we should be able to fire up virt-manager and build a VM. ---- === Building the client OS === 1. copy the install iso to some directory (I used /root) {{{ wget http://mirrors.mit.edu/ubuntu-releases/11.10/ubuntu-11.10-server-amd64.iso }}} 1. Start up virt-manager (you will probably need x11 forwarding enabled). Click on the new button. [[Image(virtmanager.jpg)]] 1. When you're setting the params make sure to specify bridging as the networking method. [[Image(virtmannet.jpg)]] 1. When you get to the ubuntu install screen, Rember to press f4 on the ubuntu install menu to get the virtual machine version. refrences: * https://help.ubuntu.com/community/KVM * http://openvswitch.org/releases/binaries/1.2.2.10448/natty_amd64/ * http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.bridge;hb=HEAD * http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.KVM;hb=HEAD * https://help.ubuntu.com/community/KVM/Installation * https://help.ubuntu.com/community/KVM/Networking