Changes between Version 4 and Version 5 of Internal/VMHostSetup


Ignore:
Timestamp:
Nov 28, 2011, 11:28:25 PM (13 years ago)
Author:
ssugrim
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/VMHostSetup

    v4 v5  
    66Bridge: Open V Switch
    77Emulator: KVM
     8Packages: OpenVSwitch (via-debs), qemu-kvm
    89}}}
    9 
    10 '''UPDATE:''' I've amended the directions to eliminate the need for bridging compatibly. This requires us to not use libvirt and virt-manager/virsh. We want to use open vswitch in it's native mode with out the bridge. This should be a more "flexible" setup.
    1110
    1211
     
    8887--------------------------------------------------------------------
    8988   }}}
    90  1. '''NOTE:''' Omit this step since we are not using bridging compatability.[[BR]]''
    91     As referenced in the brcompat documentation [http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=INSTALL.bridge;hb=HEAD here],
    92     I took these steps to bring up the bridge daemon. According to the kvm documentation,
    93     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,
    94     it will load the bridge modules and create conflicts with openvswitch_mod.''
    95     {{{
    96     insmod /lib/modules/2.6.38-8-server/kernel/brcompat_mod.ko
    97     ovs-brcompatd --pidfile --detach
    98     }}}
    9989 1. Now we're ready to install the KVM packages documented [https://help.ubuntu.com/community/KVM/Installation here], all but the bridge-utils:
    10090    {{{
    10191    sudo apt-get install qemu-kvm
    10292    }}}
    103     '''NOTE:''' This step has been amended to exclude: '''libvirt-bin ubuntu-vm-builder virt-manager'''. This is because we are no longer using bridging compatibly.
    10493 1. Next we will build a vm using the command line tools.
    10594
     
    130119    * -boot order=dc - specify boot params like boot order, splash screen, etc... If omitted will default to the first disk
    131120 1. Once this done you can point your vnc client (locally, or if you specified the parameters correctly remotely) to the specfied port and answer the prompts to
    132     preform an installation.
     121    preform an installation. '''Rember''' to press f4 at the start screen and choose the minimal vm install option. You will get a machine with a "virtual" kernel.
     122    {{{
     123native@clientvm:~$ uname -r
     1242.6.38-8-virtual
     125    }}}
    133126 1. After the os is installed, it will try to reboot and fail. At this point you can "shut down" the machine by kill -9 the process.
    134127 1. Next "remove" the cdrom and start the vm again. It should boot appropriately. Note the missing -boot param.
     
    136129kvm -daemonize -vnc :0 -m 2048 -smp 2 -net nic,macaddr=00:11:22:EE:EE:EE -net tap,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown -drive file=/root/test_mac.img
    137130    }}}
    138 ----
    139 ==== Old process, Deprecated ====
    140  1. copy the install iso to some directory (I used /root)
     131 1. On external3 I've made 2 scripts to start the VM. Their contents are very simple:
    141132    {{{
    142     wget http://mirrors.mit.edu/ubuntu-releases/11.10/ubuntu-11.10-server-amd64.iso
     133start_vm:
     134kvm -daemonize -vnc :$2 -m 2048 -smp 2 -net nic,macaddr=00:11:22:EE:EE:E$2 -net tap,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown -drive file=$1
     135install_vm:
     136kvm -daemonize -vnc :0 -m 2048 -smp 2 -net nic,macaddr=00:11:22:EE:EE:E0 -net tap,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown -cdrom /root/ubuntu-11.04-server-amd64.iso -boot order=dc -drive file=$1
     137root@external3:/root#
    143138    }}}
    144  1. Start up virt-manager (you will probably need x11 forwarding enabled). Click on the new button.[[BR]]
    145     [[Image(virtmanager.jpg)]]
    146  1. When you're setting the params make sure to specify bridging as the networking method.[[BR]]
    147     [[Image(virtmannet.jpg)]]
    148  1. When you get to the ubuntu install screen, Rember to press f4 on the ubuntu install menu to get the virtual machine version.
    149  
     139    install_vm takes 1 parameter, the name of the disk image to install on (the image created earlier via kvm-img), it takes the default vnc port :0 (tcp port 5900), and also mounts a cdrom. The vnc port number is also the last digit of the mac address. start_vm has two arguments, the first is also the image name, the second is which vnc port to take (1-9). It also follows the last digit mac convention.
     140
     141
    150142refrences:
    151143 * http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF8&rurl=translate.google.de&sl=de&tl=en&u=http://qemu-buch.de/de/index.php/QEMU-KVM-Buch/_Inhaltsverzeichnis&usg=ALkJrhir9hvb8x9SA1RJNnNapZstHXVYGg