Changes between Initial Version and Version 1 of Internal/VMHostSetup


Ignore:
Timestamp:
Nov 19, 2011, 12:21:42 AM (13 years ago)
Author:
ssugrim
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/VMHostSetup

    v1 v1  
     1== Building A VM host ==
     2External3 was rebuilt into a VM host.
     3
     4{{{
     5BASE OS: Ubunut 11.04
     6Bridge: Open V Switch
     7Emulator: KVM
     8}}}
     9
     10=== Building the Host ===
     11It was built using the following steps:
     12
     13 1. Install Ubuntu 11.04 from CD (with stock kernel): Had to switch to version 11.04 for kernel compatibly with openvswitch.
     14    The running Kernel Version is:
     15    {{{
     16    root@external3:~# uname -r
     17    2.6.38-8-server
     18    root@external3:~# uname -a
     19    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
     20    }}}
     21 1. run kvm-ok.
     22    You might need to run
     23    {{{
     24    apt-get install cpu-checker
     25    }}}
     26    Check for a message like this one:
     27    {{{
     28    INFO: /dev/kvm does not exist
     29    HINT:   sudo modprobe kvm_intel
     30    INFO: Your CPU supports KVM extensions
     31    INFO: KVM (vmx) is disabled by your BIOS
     32    HINT: Enter your BIOS setup and enable Virtualization Technology (VT),
     33          and then hard poweroff/poweron your system
     34    KVM acceleration can NOT be used
     35    }}}
     36    If disabled, you will need to enter the bios to enable it.
     37 1. Install the openvswitch packages. Do not use the Ubuntu repositories since the install the incorrect versions of the package, instead download the
     38    packages that match your kernel version from [http://openvswitch.org/releases/binaries/1.2.2.10448/natty_amd64/ here]
     39    I downloaded:
     40    {{{
     41    openvswitch-datapath-module-2.6.38-8-server_1.2.2.10448_amd64.deb
     42    openvswitch-common_1.2.2.10448_amd64.deb
     43    openvswitch-switch_1.2.2.10448_amd64.deb
     44    openvswitch-brcompat_1.2.2.10448_amd64.deb
     45    }}}
     46    and then Installed them in that order with "dpkg -i".
     47 1. Once these are installed you can start/restart the openvswitch dameon
     48    {{{
     49    /etc/init.d/openvswitch-switch
     50    }}}
     51 1. The readme refrenced [http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.KVM;hb=HEAD here] recomends installing
     52    the uml utilities, I didn't need them but I installed them any way.
     53    {{{
     54    apt-get install uml-utilities
     55    }}}
     56 1. After these components were installed I added a bridge and got it an address:
     57    {{{
     58    ovs-vsctl add-br br0
     59    ovs-vsctl add-port br0 eth0
     60    ifconfig eth0 up
     61    dhclient br0
     62    }}}
     63    In retrospect I could have used brctl once I brought up the compatibly daemon.
     64 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],
     65    I took these steps to bring up the bridge daemon. According to the kvm documentation,
     66    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,
     67    it will load the bridge modules and create conflicts with openvswitch_mod.
     68    {{{
     69    insmod /lib/modules/2.6.38-8-server/kernel/brcompat_mod.ko
     70    ovs-brcompatd --pidfile --detach
     71    }}}
     72 1. Now we're ready to install the KVM packages documented [https://help.ubuntu.com/community/KVM/Installation here], all but the bridge-utils:
     73    {{{
     74    sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder virt-manager
     75    }}}
     76 1. From here we should be able to fire up virt-manager and build a VM.
     77
     78----
     79=== Building the client OS ===
     80
     81 1. copy the install iso to some directory (I used /root)
     82    {{{
     83    wget http://mirrors.mit.edu/ubuntu-releases/11.10/ubuntu-11.10-server-amd64.iso
     84    }}}
     85 1. Start up virt-manager (you will probably need x11 forwarding enabled). Click on the new button.
     86    [[Image(virtmanager.jpg)]]
     87 1. When you're setting the params make sure to specify bridging as the networking method.
     88    [[Image(virtmannet.jpg)]]
     89 1. When you get to the ubuntu install screen, Rember to press f4 on the ubuntu install menu to get the virtual machine version.
     90
     91
     92refrences:
     93 * https://help.ubuntu.com/community/KVM
     94 * http://openvswitch.org/releases/binaries/1.2.2.10448/natty_amd64/
     95 * http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.bridge;hb=HEAD
     96 * http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.KVM;hb=HEAD
     97 * https://help.ubuntu.com/community/KVM/Installation
     98 * https://help.ubuntu.com/community/KVM/Networking