Version 2 (modified by 13 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:
- 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
- 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. - 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". - Once these are installed you can start/restart the openvswitch dameon
/etc/init.d/openvswitch-switch
- 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
- 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. - 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
- 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
- From here we should be able to fire up virt-manager and build a VM.
Building the client OS
- 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
- Start up virt-manager (you will probably need x11 forwarding enabled). Click on the new button.
- When you're setting the params make sure to specify bridging as the networking method.
- 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
Attachments (3)
-
virtmanager.jpg
(21.5 KB
) - added by 13 years ago.
Virt-Manager
-
virtmannet.jpg
(24.1 KB
) - added by 13 years ago.
Virt-manager Network Config of new VM
-
KVM-MULTI-NETWORK.pdf
(583.2 KB
) - added by 13 years ago.
http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fliaat%2Fliaatbptap.htm
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.