Okay, that's a lengthy title. Sorry about that. I couldn't figure out a better one.
Anyhow, this is a guide/how-to on how to run Windows XP Pro on Ubuntu Gutsy Gibbon using Qemu. I am going to go through this section by section; so that you don't get lost along the way.
Installing Qemu
This part is very straightforward.
sudo apt-get install qemu
Done.
Installing KQemuThis part is not as simple as the previous one. You actually don't need this to get Windows up and running on Ubuntu; but you need this so that it runs smoother. If not, you will be looking at 3 frames per second slide show which is a real pain the ass when you are actually trying to be as productive as you can.
First, let's install a few things first shall we?
sudo apt-get install module-assistant kqemu-common kqemu-source
Please note that you might already have
module-assistant.
After that you need to compile and install the kqemu module; like so:
sudo module-assistant prepare
sudo module-assistant auto-install kqemu-source
When that is done, we need to
modprobe it (so as to make it available to be used):
sudo modprobe kqemu
Change the permission so that other users can use it.
sudo chmod 666 /dev/kqemu
You can make sure that the permission is correct and that it is already up and running:
ls -l /dev/kqemu
Okay, that completes the installation of Kqemu. I don't plan on emulating Windows so often so I didn't make this as a startup. If you need it to be on startup, you can refer to a guide
here.
Installing Windows XP ProThe installation is going to take FOREVER. I warned you. So do it before you go to sleep. I did it on the day I had to go somewhere else; and it finished when I got back which is just nice.
First, let's create a hard disk image. Yes, you don't need a partition to install Windows.
qemu-img create windows.img 3500M
3500M means 3500MB or 3.5GB. It means you have just created a hard disk for Windows with a size of 3.5GB.
Next, let's boot into Windows! I am using a CD Image here.
qemu -boot d -cdrom /path/to/cd_image -hda /path/to/hdd_image
.. and proceed with the lengthy installation.
You can also do this with a CD. Instead of using the above command, use this one instead.
qemu -boot d -cdrom /dev/cdrom0 -hda /path/to/hdd_image
You can replace
/dev/cdrom0 with your own CD drive if you need to. When the installation is done. Just shutdown Qemu by closing the window.
Booting Windows XP ProUse this:
qemu -boot c -hda /path/to/hdd_image
... and you shall boot into Windows normally :D
By default, the RAM for the guest OS is only 128MB. You can give it more RAM by specifying a boot flag.
qemu -boot c -hda /path/to/hdd_image -m 256
Sharing folders between Windows and UbuntuBefore that, you should boot Windows with NIC enabled! (NIC = Network Interface Controller)
qemu -boot c -hda /path/to/hdd_image -net user -net nic
This is the least boot flag you should have. You can add more if you want to.
You need SAMBA! Configuring Samba is a different matter. You can refer here for the
easiest method to configure Samba.
Now when you share a folder, make sure to give the folder write permission. From Windows, press Window + R, type in:
\\10.0.2.2\name_of_shared_folder
You should then be able to see the shared folder and dump files there :)
Easy way to choose boot flags/parametersThere's this GUI tool called
qemu-launcher. Install it.
sudo apt-get install qemu-launcher
After installed, you can launch it from
Applications > Accessories > Qemu Launcher. It's so much easier to boot from here and furthermore, you can enable audio for your Windows! :D
I think that is enough to get you up and running Windows on Ubuntu. Drop me a comment if you run into any issues and I might be able to help.
References:
1. https://help.ubuntu.com/community/WindowsXPUnderQemuHowTo
2. http://ubuntuforums.org/showthread.php?t=39513