Windows... in a window! Posted on 23 August 2007 | Tagged , , , , , | Comments (7)

Over the last two days I've been experimenting with virtualisation - running one operating system inside another. The motivation was twofold - firstly Internet Explorer testing at work is a real pain. I normally have to upload all my changes to a test server, remote desktop into an IE test box and then make any changes via ssh - not particularly productive. The second objective is I have yet to find a way to be able to use the iTunes store in Linux! So off on the virtualisation adventure I went.

My friend Matt had managed to get Windows XP running on his work machine on Ubuntu at decent speeds using VMware. While VMware looks very cool, I didn't particularly feel like forking out any money, so I decided to see what the open source options were like. My first stop was Xen - it's built into the kernel and sits very close the the hardware, so is supposed to be very fast. Unfortunately for me it sits too close to the hardware - I'd need either a modified version of XP (which while exists isn't actually available to anyone due to licensing restrictions), or for my CPU to support virtualisation. A quick check on wikipedia showed that my CPU was just a few models too late.. gutting :(.

Next stop was QEMU. QEMU is a bit different - it sits on a much higher level, the software doing more work. Unfortunately this meant it was very slow. Recently, though, someone had developed a kernel module that allowed the hardware to do much more of the grunt work; the module is called KQEMU. I managed to get this all set up (ArchLinux had it all packaged up nicely), however as soon I tried to install XP with KQEMU enabled, I was greeted with a lovely big BSOD. Oh no..

Not willing to give up hope, I ran the installer without the kernel module - this tooking pretty much forever (like hours and hours forever). I don't advise it. After the installation was complete, it booted into Windows... very, very slowly. At that point I shut down the virtual machine. I reenabled KQEMU and rebooted - voila! Windows XP at fairly decent speeds - not native speeds for certain, but it does run faster than a lot of XP machines I've used. And as I plan to only be running a single application, it is more than adequate for my purposes. I have also since found that the problem with the BSOD on install was due to QEMU's less than perfect implementation of ACPI, and that disabling acpi on the commandline would've fixed the issue - doh, wish I had known earlier, would've saved me a lot of time! Lesson learnt - QEMU by itself = horribly slow, QEMU with kQEMU = victory!

After letting Windows do it's update thing, I made a backup of my machine - this is where virtualisation comes in handy. I then proceeded to install Internet Explorer 7 on one copy - so I now have an easy way to test both IE6 & IE7. I was slightly scared about trying to set up networking with QEMU, but I was pleasantly suprised - not only could I access the Internet without configuring anything, but my real linux machine was avaiable at 10.0.2.2, so my web server was all ready to go! :)

My final task was to install iTunes - this ran without a problem. Unfortunately most of the music available on iTunes store is DRM protected, and as I don't plan to boot up a virtual machine every time I want to listen to music, and I have yet to find a way to remove it, I won't be buying any DRM music. Fortunately all EMI music can be bought DRM free (for a slightly higher price, but thus is the price of freedom). While initially I didn't think I listened to a whole lot of EMI music, I discovered that a number of labels with lots of bands I listen to are actually owned by EMI - most importantly Tooth & Nail :). So after setting up a iTunes account, I took for a test run and bought Mae's The Everglow EP, which, btw, I highly recommend (well I highly recommend anything by Mae in general).

The last piece of the puzzle was figuring out how to transfer my newly purchased music from my virtual machine to my actual machine. First I tried Windows file sharing with [url=http://www.samba.orgSamba</a> - however I had a few problems with authorisation - I don't think I'll ever understand how to configure Samba properly. So I took an easier road - downloaded WinSCP on my virtual machine, and used ssh to transfer the files. Result - Mae on Banshee! Excellent!

Post your comment

Comments

  • well im more of a geek cuz i did all that just in case my ipod f**** up and i need to reinstall itunes on it. i still think Apple should understand that not all people with an ipod want to have a Mac or Windows. For that reason i dont want a native windows install cuz f*** micro*** so i just lost 2 days making winXP work in QEMU, did all the upgrade, put an anti virus (darn) and now have a fully functionning winXP that is NOT native uuuu. yep... what a geek i know :)

    Posted by Noland, 29/04/2008 4:36pm (7 months ago)

  • I see what you mean...that looks pretty bad without paragraphs.

    Posted by Jez, 19/09/2007 1:45pm (1 year ago)

  • 1. Mae = :up:

    2. VMWare Server and Player are good, and I'll probably swap to them when my trial license for VMWare Workstation runs out. I already know that VMWare Player can load up my XP installation without a hitch, and it's not much slower, I just lose the ease of editing machine config - memory limits and the like.

    3. What I really want to see you do is install Cygwin on Windows, for those times when you're IE-testing but miss the excellent of command-line Linux.

    Posted by Matt, 15/09/2007 9:33pm (1 year ago)

  • Congratulations.
    You are SUCH a geek! :P
    Sounds handy though, I guess, if I knew what it was :P lol.. when are you gonna post COOL updates like, about orange handbags and such??

    Posted by Emma, 28/08/2007 11:44pm (1 year ago)

  • You should take a serious look at VirtualBox. I'm lead to believe that it was initially based on QEMU. There are also packages available from the Arch repositories. I have two installs of Windows XP, one for IE6 and the other for IE7/Safari3, it makes cross-browser compatibility testing much easier.

    While I'm aware of other solutions such as Wine, I've often encountered too many problems (Random bugs and flickering). At least with a VM, you know that's the real environment.

    Posted by Tate, 25/08/2007 12:19am (1 year ago)

  • I have IE working with WINE, but its buggy and therefore not that useful for testing. And I never managed to get iTunes working with WINE. :(

    Posted by Andy, 24/08/2007 9:42pm (1 year ago)

  • gosh all that trouble just for IE testing.. I got internet explorer working on arch64 using WINE :D but using 32bit libraries :P

    Btw, with VMWARE you need to install Vmware Tools to get optimum performance. Vmplayer is free btw. But then again thats why I dual boot on my laptop. And i have two workstations with 2 different operating systems. Sharing 1 keyboard and mouse over the network using synergys :D pacman -S synergy ftw!

    Posted by shoaib, 23/08/2007 9:02pm (1 year ago)

RSS feed for comments on this page