Sat, 31 Dec 2005

Quantian in VMWare Player: Create a virtual disk with qemu

A few days ago, I blogged about booting/running the Quantian iso via VMware Player, a 'free as in beer' virtualization tool.

Over the last few days, I have experimented a little more, perused the VMware Player Forum and googled a bit. It turns out that you can employ the 'free as in speech' virtualization tool qemu (using version 0.7.2 from Debian unstable is fine, looks like a newer 0.8.0 it out upstream) to create a virtual disk image in vmdk format suitable for VMware. For example, the command

qemu-img create -f vmdk Quantian.vmdk 512M
creates a 512mb file of the given name in the in required vmdb format. By the way, qemu is smart and creates a much smaller file -- an 'empty' 512mb partition occupies only 12mb.

It is then only a matter of updating the previously posted Quantian.vmx file to add the 'new disk'. I.e. instead of defining just one ide device, we now use two as per

# CDROM Info
ide0:0.present = "TRUE"
ide0:0.fileName = "quantian_0.7.9.1.iso"
ide0:0.deviceType = "cdrom-image"

# edd 31 Dec 2005 adding a virtual disk file
ide1:0.present = "TRUE"
ide1:0.filename = "Quantian.vmdk"
ide1:0.redo = ""
ide1:0.deviceType = "ata-hardDisk"
On the next reboot, Quantian will display a disk symbol for hdc. It it then a matter of starting a root shell in Quantian, running cfdisk or fdisk to partition the new "empty" disk drive and to add a /dev/hdc1 partition (or more), running mke2fs -j dev/hdc1 to add a filesystem --- and on a subsequent reboot, the disk is ready for use.

It should thus be possible to create a suitable disk file of, say, ten or so gigabytes (given that Quantian expands to around seven gigs), create a filesystem and then run knx2hd to install Quantian onto the new virtual disk, make the disk bootable and, presto!, have a virtual instance of Quantian on stateful read/write media. While my tests have been limited to using a Linux host, this procedure should work just the same way in Windows.

Oh, and as it's still early afternoon here: Best wishes for 2006 to everyone!

/computers/linux/debian/quantix | permanent link