Unix is very simple, but it takes a genius to understand the simplicity (Dennis Ritchie)

Home

Linux

Iptables


Other Links

Debian

Slackware

Contact Us

 

Windows guest on Linux host

QEMU is a virtual machine program. So, that's a machine in the machine. There is a computer, called host, which runs an OS, called host OS, and QEMU (besides other programs). Inside QEMU, there runs an OS, called guest OS. QEMU is a simple program ("exe") from the host point of view.

Installing QEMU click here

1. Add blank disk image ("harddisk"). This is like adding a blank disk to the virtual computer that QEMU creates

qemu-img create -f qcow /PathTo/windowsxp.img 3G

This 3G will be the maximum end size of the image file. It will grow while adding contents (writing files to the harddisk). A fresh WinXP installation will use e.g. 1.7Gb

2. Installing Windows XP.

If you have an installation CD, put the Windows installation into the real CD drive of your host computer. Then run

qemu -cdrom /dev/cdrom -hda /PathTo/windowsxp.img -m 256 -boot d

Suppose you have an install ISO image , Then run

qemu -cdrom /PathTo/WindowsXP.iso -hda /PathTo/windowsxp.img -m 256 -boot d

You can easily create iso by running this command
dd if=/dev/cdrom of=/PathTo/WindowsXP.iso

Note: If you get error something like this, then follow what has been suggested.
You do not have enough space in '/dev/shm' for the 256 MB of QEMU virtual RAM.
To have more space available provided you have enough RAM and swap, do as root:
umount /dev/shm
mount -t tmpfs -o size=272m none /dev/shm
Or disable the accelerator module with -no-kqemu

When Windows installation reboots after copying files run (to continue with installation.

qemu -cdrom /PathTo/WindowsXP.iso -hda /PathTo/windowsxp.img -m 256

3. Running Windows

Finally when windows installation finish, you can run windows guest

qemu -hda /PathTo/windowsxp.img -m 256 -localtime