HOWTO install Windows XP Professional 64-bit (x64) on 32-bit Linux


  • 2 x AMD Opteron 240 (1.4GHz) – see this by running cat /proc/cpuinfo
  • 1GB RAM
  • Host OS: Xubuntu 7.04 (Feisty)
  • Guest OS: Windows XP Professional 64-bit (also referred to as x64)


This whole thing started when I got motivated to use Linux (Ubuntu) as my main OS, and Windows for what I absolutely had to have (the whole Office 2003 suite – Outlook, Visio – and some other work-related apps that only ran in Windows). Yes, there’s WINE out there, but I didn’t want to spend forever and a day configuring WINE to run a single application (yes, I’ve spent a considerable amount of time in the past trying to get Windows applications to run on Linux, and I’ve been rather successful, but it takes far too much time to justify it, in my opinion). Well, I have a Windows XP Pro 64-bit license (not a 32-bit — NOTE THIS). Turns out that the 64-bit and 32-bit licenses aren’t cross-compatible (same OS — go figure). I realize that there a massive amount of differences between 32 and 64 bit OSs, but still, it seems like the license should allow use of either (or at least backwards compatbility — ie. if you have the 64-bit, you can run either the 32-bit or 64-bit). Too logical of a solution, I guess because it’s not that way. I’m stuck with the 64-bit… I started off by trying to use VMWare Server (free download from VMWare), but my CPUs lacked certain required features. See to see if your processors are on the "approved" list. There are other options — BOCHS might do it, but it’s horrifically slow… I didn’t find much in the way of 64-bit support on KVM. There’s lots of other virtualization products, but most of them have the same requirements as VMWare Server. Bummer.


When I thought I was out of luck, I found a solution. Welcome to QEMU! QEMU can be found on the web at There’s lots of different features and lots of HOWTOs out there on using QEMU, so I’m not going to delve into that. I’m focusing on getting XP x64 to install and run on QEMU. IMPORTANT NOTE: You *must* download the latest version of QEMU (I’m currently running 0.9.0). Don’t depend on your distro’s package for this. You can try installing your distro’s package, but if it’s not a more recent version (I’d recommend nothing prior to 0.9.0), uninstall it and get the latest off the web. It’s said that 64-bit guest OS support is still experimental, so it can only be found in the latest version. Prior versions didn’t have support for it at all. FYI: I’m not covering KQEMU as my processors don’t support its requirements (same situation as VMWare above). If you’re wanting to use KQEMU, lookup a HOWTO on the Internet. If you have some performance specs between QEMU and KQEMU, I’d love to hear about it though (I can drool over it until I upgrade my system so I can run KQEMU). To start with, create the hard drive image you’ll be using for the virtual machine. In the directory you want the image to reside in, run the following command:

qemu-img create xp_64.img 3G

You can specify a larger disk image, but I wouldn’t go much smaller as Windows is a HD hog. NOTE: My first attempt, I created the virtual machine on an NTFS partition (I have two hard drives — one for Linux, one for Windows). I noticed a performance degredation with this as the NTFS drivers were sucking up a lot of resources. I’m not sure what NTFS driver was loaded at the time as I just scrapped that idea and loaded it on the native Linux ext3 partition. Problem solved. I’d recommend having an ISO image of your XP CD as this will be faster and won’t require you to mess with the physical CD. Google how to create an ISO from a CD in Linux if you don’t know how — I forget the link I used, but it involved using dd. Next, run QEMU as the following:

qemu-system-x86_64 -cdrom xp64.iso -hda /home/user/vm/xp_64.img -localtime -boot d -m 256 -win2k-hack

This will startup QEMU as follows:

  • 256MB RAM
  • CDROM drive using xp64.iso as the image
  • Hard drive using /home/user/vm/xp_64.img as the image for the hard drive
  • Boot off of the CD-ROM
  • Win2k (and XP) compatibility hack

Note the -win2k-hack was required for me to finish the XP installation — if this wasn’t supplied, it’d hang right towards the end of the final installation steps (it would hang when there were a couple of minutes remaining in the installation). When I passed this argument, it worked like a champ. After you’re done with the setup, you can use the -boot c argument (tell it to boot off of the hard drive, not the cd-rom).


The next challenge was getting the networking to work. Again, there are lots of HOWTOs on this, so I’m only going to share what I did and what worked for me. My goal was to have a unique IP address for the guest OS as well as the host OS (ie. two IP addresses consumed by my single, physical machine — one for each OS). You have to have several packages installed, none of which I have in front of me. Here’s a few commands that are needed — if you have an Ubuntu distro, if you type in some of the commands and the package isn’t installed, it’ll notify you of this so that you can install the correct package to get the needed program.

  • tunctl
  • brctl

Additionally, unless you’re logged into your system as root all the time (no, no, no!), I’d recommend changing your sudoers file so that you don’t have to type in your root password when you execute QEMU. Don’t manually edit the file — to edit it, run the following:

sudo visudo

This opens up an editor and checks the consistency of the file (for errors, etc.). Here’s what my sudoers file looks like:

# /etc/sudoers
# This file MUST be edited with the ‘visudo’ command as root.
# See the man page for details on how to write a sudoers file.
# Host alias specification

# User alias specification

# Cmnd alias specification
Cmnd_Alias QEMU = /sbin/ifconfig, \
                                        /sbin/modprobe, \
                                        /usr/sbin/brctl, \

# Defaults
Defaults !lecture,tty_tickets,!fqdn

# User privilege specification
root ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

See the Cmnd_Alias QEMU above? When linked with the user account "user" (bottom of the file), it allows the "user" account to execute the programs in the Cmnd_Alias QEMU without having to type in a password (ie. sudo ifconfig won’t prompt for a password — it’ll just run). Before continuing, make sure you have the necessary packages installed (try to run brctl and tunctl at minimum). Don’t continue until these programs run (are installed)! Let’s create the bridge that’ll be used right now…

brctl addbr br0 brctl addif br0 eth0

Obviously if you have a different ethernet interface, use it above (if you’re not sure, run ifconfig and look at the interfaces it defines — usually it’ll be something like an eth or eth0, eth1, etc.). Okay, now the QEMU startup script can be created… use your favorite editor to create the file /etc/qemu-ifup. Here’s the winning combination that I found works for me:

  • Change the permissions on /dev/net/tun so that you can read/write to it
  • Create the tunnel interface and make sure that it’s bound to your username
  • Bring up the tunnel interface (tap) in promisc mode…
  • Add the tunnel/tap interface to the bridge

Here’s what my /etc/qemu-ifup looks like:


echo "Executing /etc/qemu-ifup"
echo "Configuring the tunnel so that permissions are correct…"
sudo chmod 777 /dev/net/tun
echo "Creating tunnel/tap interface $1…"
sudo tunctl -u user -t $1
echo "Bringing up $1 for bridged mode…"
sudo /sbin/ifconfig $1 promisc up
echo "Adding $1 to br0…"
sudo /usr/sbin/brctl addif br0 $1

Lastly, you have to execute QEMU differently to let it know what kind of networking to use. When I installed XP, there are certain defaults that QEMU uses for the networking. The default NIC model didn’t show up in Windows, so I changed the model and am using the following:

qemu-system-x86_64 -cdrom xp64.iso -hda /home/user/vm/xp_64.img -localtime -boot d -m 256 -win2k-hack -net nic,vlan=0,model=rtl8139 -net tap,vlan=0,ifname=tap,script=/etc/qemu-ifup

After all of the steps we’ve done, the above should be pretty clear. If not, man it and google it! One last caveat: for some reason (I don’t know — if you do, email me and let me know!), the script doesn’t get called in the right order. If I don’t execute the /etc/qemu-ifup script first, then run QEMU, QEMU complains that the tap interface doesn’t exist — it’s like it checks for the interface first, then continues executing (and running the /etc/qemu-ifup script). Well, in my script the tap interface isn’t created until the qemu-ifup. Yes, I could rework it so that the tunnel’s created on startup, but I’m lazy. It’s easy enough for me to run two commands rather than one. I’m just glad I figured out how to get XP 64-bit to run as a guest OS on a 32-bit host Linux OS!


XP 64-bit does run on QEMU — I can vouch for it. It’s rather slow, but not unbearable. I guess it really depends what you’re doing on it. I wouldn’t consider it for any graphics (CAD/3D modeling), but for business apps, it’s sufficient (Outlook, Excel, Word, Visio) and meets my needs. Everything else I can do in Linux, so no need to deal with the sluggish behavior! As a side note, it does tend to suck up a lot of CPU. I have two CPUs — one of them is constantly pegged to the max when running XP x64 on QEMU. I’m not sure if that’s because I don’t have it configured right or some performance optimization that I haven’t done yet or what. If you have ideas, please let me know! One last thing: I’d turn off many of the "advanced" features of XP. I’m running the GUI in "old-school" (win2k) mode, I turned off all of the graphical effects and have turned off the fading in/out menus in Office 2003 (the fading in/out is *really* slow — the expanding menus work fine, but the fading is just too lousy on the virtual machine). If you have any experiences with this or would like to share tips/hints/thanks/*constructive* criticism from this article or about QEMU in general, feel free to contact me.

Related posts:

  1. HOWTO dual-boot between Linux and Windows using GRUB When I first started out with Linux, I wasn’t aware...
  2. HOWTO install ScummVM on a Treo 650 (Palm OS)… INTRODUCTION If you’ve never heard of ScummVM before?  Neither had...
  3. Adding Context Options for All File Types in Windows Summary: I often times have the need to open a file...
  4. Linux Command Reference Here’s a Linux Command Reference that I created a couple...

Related posts brought to you by Yet Another Related Posts Plugin.

Leave a Reply