Friday, November 13, 2009

VirtualBox










VirtualBox on OpenSuse 11.1

i have windows 7 running as guest using KVM in my opensuse, but i don't like the SVGA emulation.

So i try virtualbox, and i convert the qemu image to vmware image and use it in VirtualBox , but it failed.

opensuse:/kvm-disk # qemu-img convert -O vmdk hp-win7.img hp-win7.vmdk

So i configure a new vdi image for my windows 7 guest and start my vm, but i got an error, and the error advise me to run this:

opensuse:/kvm-disk # /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module done
Recompiling VirtualBox kernel module failed
(Look at /var/log/vbox-install.log to find out what went wrong)

opensuse:/kvm-disk # more /var/log/vbox-install.log
Makefile:174: *** Error: unable to find the include directory for your current L
inux kernel. Specify KERN_INCL= and run Make again. Stop.

opensuse:/kvm-disk # ls -la /dev/vboxdrv
ls: cannot access /dev/vboxdrv: No such file or directory

opensuse:/kvm-disk # uname -a
Linux opensuse 2.6.27.7-9-pae #1 SMP 2008-12-04 18:10:04 +0100 i686 i686 i386 GNU/Linux

so i install the kernel source for 2.6.27-9.1 using Yast although 2.6.27.37 is available...


opensuse:/kvm-disk # /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module done
Recompiling VirtualBox kernel module done
Starting VirtualBox kernel module done
opensuse:/kvm-disk #


seems to work...








Cloning a virtualbox VM

you install virtualbox, and install , say windows 2008, as a guest. then u realise you need to install another windows 2008 guest. do u need to install again? No. u can clone the first one. And there is no need to run NewSID on the cloned vm, yes, it is true, read it here http://blogs.technet.com/markrussinovich/archive/2009/11/03/3291024.aspx.

here is how i did it:



C:\Users\chan\.VirtualBox\HardDisks>"C:\Program Files\Sun\VirtualBox\vboxman
age" clonehd old.vdi new.vdi
VirtualBox Command Line Management Interface Version 3.0.10
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 1dfaa26a-2761-4ee4-9cd6-24642f3c8
53e

C:\Users\chan\.VirtualBox\HardDisks>





















Wednesday, November 11, 2009

KVM

KVM - kernel virtual machine

kvm uses QEMU for device emulation. So your guest will only see a VGA graphics card. Don't expect good performance here. I increase the resolution to 1024 and i could get a larger screen, but it will be better when qemu emulate some better graphicscard. Xen-HVM uses QEMU for emulation too. I tried -vga vmware in kvm-qemu, but it is worse than no specifying anything (i.e. using the default).


I run a vncserver (RealVNC) in my Windows 7 guest and connect to it from my Linux host using vncviewer, the performance sucks!! it is slow. So there is no need to use vnc to connect to your guest. But I tried Microsoft remote desktop , mstsc.exe, to connect to my Windows 2008 server guests, the results is great. You won't know you are on a VM.

Qemu allows your guests to use the usb port too.

Monday, November 2, 2009

bridge - linux

http://www.linuxfoundation.org/en/Net:Bridge


qemu

http://qemu-buch.de/cgi-bin/moin.cgi/QemuAndTuntap