The Portable XP Experiment
on 06.11.06, 01:24pm in windows • Comments (11)
Update: Details about Portable CE 3.0 are now online.
In the a post the other day, I mentioned that I was going to experiment a bit with portable drives, virtual machines and Windows XP. For now, I’m calling the experiment “Portable XP” (akin to Portable CE).
The “goal” of the experiment was to see how easy it would be to create a “portable” virtual machine image of Windows XP that I could put on a USB flash or hard drive. In the end, it turned out to be rather simple.
My first thought was to use either VMWare Player or Virtual PC, but both of these “break” one of the cardinal rules in my book - they both have heavy reliance on the registry, and really need to be installed on the host machine. After some research (i.e. - search Google), I came across an open source VM called QEMU that was not only built for Windows but for a wide variety of platforms. And the best part: no install required. So I decided to give it a shot.
Here’s how I ended up building my “image”:
- Download QEMU for Windows and unzip to a folder on your hard drive (I’d recommend using the HD during install for speed.)
- Create an ISO image from a Windows XP install disk. I used Nero to do this, but any ISO tool should be fine. For this example, I called it “WindowsXP.iso”.
- Open a command prompt, and go to where you unzipped QEMU. You’ll need to go ahead and create a hard drive image first, and I chose to make it about 3gb:
qemu-img create portablexp.img 3G - Start up the VM and boot from the XP install disk ISO:
qemu -L . -m 512 -boot d -hda portablexp.img -cdrom WindowsXP.iso - Follow your normal Windows XP install. I chose to quick format the partition as NTFS.
- Once the entire install was completed, I shutdown the VM and copied the entire folder (not including the XP install ISO) to a portable USB drive.
- To run the VM, from the command prompt, you plug your USB drive into any Windows machine, and can simply type:
qemu -L . -m 512 -boot c -hda portablexp.img - That’s it.
Now granted, running the VM off a USB drive isn’t the fastest way to boot XP. But one thing I liked about QEMU is that there’s bits for Linux, Windows and even Mac. I would imagine (but havent tried) that the drive image should work between the various versions.
At this point, I doubt I would change over my machine to use Virtual PC, VMWare or QEMU. None of them seem to have nearly the speed that Parallels has, but I’m sure that future versions will get more usable once they use true processor virtualization.
Anyways - it was an interesting little experiment, which really did achieve what I wanted to do: create a self contained VM that I could walk around with and boot on various machines. I’d be curious to hear if anyone else plays with this and their thoughts on it. One last note: You should be able to “slim down” your XP install in the VM with tools such as “XP Lite“. The install of the bits (including the page file) was just under 2GB - using one of these tools might be able to get the image down to a size that runs off a keychain fob.




John (June 12, 2006 @ 11:02 am)
Since QEMU is a processor emulator I wouldn’t expect it to perform as fast as true virtualization. Still very cool that it just runs with nothing to install.
Apparently there are a couple of kernel modules (kqemu is one) available to accelerate QEMU to near native speeds. It would be interesting to see the performance difference between accelerated (kqemu) and non accelerated. Of course kqemu requires a service install on Windows. It would be cool if the same OS image would work with or without the accelerator. This way you could get a perf boost on machines that that the service installed.
Jens (June 23, 2006 @ 2:40 am)
An interesting experiment, have you tried Bartspe (http://65.24.134.81/KipSolutions/BootableCDrom/BartsPE.htm) One could have use a Bartpe iso image as a slimed down XP, and then have an additionel hd image on the portable device for documents. Or maybe save space on the portable device by making qemu boot from an actual cdrom.
Cakeslice (August 31, 2006 @ 7:10 pm)
How does it emulate hardware? I havent tried using it on other computers so i’m not sure what happens then, so i don’t have any idea what happens when you run portable xp on other PCs with very different hardware configurations…
joeker (September 4, 2006 @ 9:28 pm)
very nice! after experimenting with ‘portable ce’ I discovered and implemented this bastard. works perfectly,.. and I don’t own a state-of-the-art pc (128mb ram for the vm).
I booted from the ‘XP stripped to the bone’ image, which is only about 800mb on harddisk, so 1,5gb are more than enough for a working environment.
Cakeslice: try to find out .. from what I discovered in the device manager, the default configuration should be safe for most hardware devices.
Joey (September 12, 2006 @ 3:08 pm)
I cant get it to work. someone please help me
Joey (September 12, 2006 @ 3:10 pm)
Sry for first post, my e-mail address is joey@jpui.net . I just need someone to explain it more. thanks.
ferdinand (November 24, 2006 @ 9:22 am)
hellow good stuff you must edit your iso from tutorial nlite win xp very small iso xp 350MB and running in old computer PII ibm build up
[indonesian]
Scott (February 13, 2007 @ 1:47 pm)
Very Cool! I got it to work on one of my extra harddrives and I can see where it will work on a flash drive but isn’t the portablexp.img file still 3G? I loaded Bartpe.iso so maybe the .img file doesn’t need to be so large?
or did I miss something?
Ashton (April 2, 2007 @ 2:18 am)
You’ll need to go ahead and create a hard drive image first, and I chose to make it about 3gb:
qemu-img create portablexp.img 3G
—————————————-
sorry what is a hard drive image and how do i make one?
Ashton (April 2, 2007 @ 10:40 pm)
sorry I really don’t understand what you mean can you pleae email me?
NJ (July 20, 2007 @ 11:50 pm)
Fo microsoft updates Mirror go to
http://microsoftupdatesmirror.blogspot.com/