wiki:Internal/VMHostSetup

Version 1 (modified by ssugrim, 12 years ago) ( diff )

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
    
  2. 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.
  3. 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 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".
  4. Once these are installed you can start/restart the openvswitch dameon
    /etc/init.d/openvswitch-switch
    
  5. The readme refrenced here recomends installing the uml utilities, I didn't need them but I installed them any way.
    apt-get install uml-utilities
    
  6. 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.
  7. As referenced in the brcompat documentation 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
    
  8. Now we're ready to install the KVM packages documented here, all but the bridge-utils:
    sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder virt-manager
    
  9. 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
    
  2. Start up virt-manager (you will probably need x11 forwarding enabled). Click on the new button. Virt-Manager
  3. When you're setting the params make sure to specify bridging as the networking method. Virt-manager Network Config of new VM
  4. When you get to the ubuntu install screen, Rember to press f4 on the ubuntu install menu to get the virtual machine version.

refrences:

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.