Friday, 6 October 2006

Virtualization - QEMU and VMWare

Discovered QEMU the other day, and I've just given it a spin. Virtualization is all the go, these days: the VMWare product is now free for personal use (if I understand the license), and remains my preferred technology on Windows.  But this QEMU thing is new to me, and appears to be open source, too.



To use QEMU on Windows, you need to go to this site and download the qemu-0.8.2-windows.zip file first.  Create a folder for it, and unzip the contents.  You can try it out right away, by running the qemu-win.bat script.  What you will see (if, like me, it runs straight out of the box) is a new console window containing a very small command-line Linux.  So far so good, but (of course) I really want to run a more functional distro. 



I have the ISO image for the Live CD of the excellent PCLinuxOS distro, and you can edit the batch script to load from this image:



    qemu.exe -L . -m 256 -boot d -hda harddisk.img -cdrom pclinuxos-p93a-minime.iso



The "-boot d" ensures we boot from the CDROM device and the -cdrom argument is the name of the ISO file (which obviously needs to be in the same folder).   The hda argument specifies the file to be used as the virtual hard-drive: I created a new (larger) one with the qemu-img.exe tool, called harddisk.img, and that's what appears in the line above.



Well, I can report that this works!  It's a bit slow, but it does work.  To make it perform better, you are supposed to use the QEMU Accelerator as long as you're on an x86 machine.  Unzip (or untar/gz) the archive, locate the kqemu.inf file, right-click and choose Install.  Then, open up a cmd window and type "net start kqemu" (go here for documentation).  Once the service is running, you add -kernel-kqemu to the argument list in the batch file.



For me, this didn't work at all: I saw the boot screen and the PCLinuxOS progress bar, but it didn't get further than that. I suspect this is something to do with the fact I'm booting a live CD image and not a regular boot from the virtual drive.  I'm going to persevere a bit, in spare time: more later if I get it to work.

No comments:

Post a Comment