I did just that.. I installed evil inside the good.. Okay, don't worry.. I was not touched upon by angel and visited by God. I was talking about installing and booting Windows from inside Linux.
I used a VMM (Virtual Machine Monitor) called Qemu for this. Qemu came installed in my Dapper Drake.
I had some problems figurging out using the options. The options tell Qemu what to do and what hardware resources are available.
So here I what I did.
First, I create a virtual harddisk image using the utility qemu-img. Below is the command that I used. The below command creates a 4 GB virtual harddisk.
qemu-img create ./hda 4G
Second, I boot from Windows CD by specifying the cdrom device and also specify the virtual harddisk created by me in the earlier step. Once I execute the below command, I boot from the Windows CD and then go on to install Windows on the 4GB virtual harddisk.
qemu -hda ./hda -cdrom /dev/cdrom -boot d
I found that the performance of Windows running as a guest OS is not that bad. It is close to real.
Qemu, emulates a default set of hardware. For example, it emulates a RealTek NIC (Network Interface Card) to Windows. Windows installs the driver for the RealTek NIC. The last screenshot shows hardware configuration of the virtual machine.




