Resurrecting a dead PC – P2V using VMWare Fusion

February 22nd, 2009

This is a more than slightly techie post, so apologies if you were looking for further tales of life on the river. One of the reasons for my lack of bloggage over the last six months or more has been that my old faithful Acer laptop died in early August. I replaced it temporarily with an Asus eeePC 900, although that was such a pain to use for more than about half-an-hour that my enthusiasm for blogging diminished considerably! Anyway, I saved my pennies and splashed out on a new Mac a little while ago, which brings me to the mainstream of this evening’s symposium, as Tom Lehrer used to say…

I had a laptop with a nontrivial fault (either motherboard or processor – it wouldn’t boot) but reckoned that the hard disk was okay. Based on this hunch, I got a cheap caddy from Dabs and converted the laptop’s internal hard drive into a USB external disk. This let me recover my data, but the PC also contained quite a lot of software – much of it paid for – that I was reluctant to reinstall and track down all the relevant licence keys. Besides, I’ve moved to a Mac – so I bought VMWare Fusion to met me run Windows for those odd awkward things that won’t work under Mac OS.

VMWare’s website contains lots of useful instructions for converting a PC to a virtual machine (this is called Physical to Virtual or P2V in the jargon) but all of them assume that the PC is still in a working state. Finally, I found a forum post that gave some idea of how to do what I wanted, but warned that this was nontrivial. I gave it a go. Here’s my step-by-step on how to do this, but please read it all the way through before you get started, as the issues surrounding Windows licence keys and activation are quite serious.

Firstly, create a new VM. In VMWare Fusion go to File->New and click Continue Without Disk. Then choose “Custom virtual machine” and select the correct operating system (in this case Windows XP Pro). Then go on to the next screen and click Customise Settings and adjust the VM’s HDD size to be the same size as the one from the dead machine you’re importing.

Once the VM is set up, connect its CDROM drive to an XP install disk (ideally one with the right service pack slipstreamed in – mine was XP with SP2) and boot it up. Go through the Windows Setup procedure, telling Windows to create a partition and format the disk. When the disk’s been formatted, checked and Setup starts to copy files, crash the VM out by making VMWare power it down (hint – if you go to the Virtual Machine menu and hold down the option key, you’ll see you get Power Off instead of Shut Down). Now obtain yourself a suitable Linux liveCD. I used Knoppix 5.1 as recommended by the VMWare forum post, although I found that the mouse driver on it really disliked the Mac touchpad. Download the ISO image and point the VM’s CD drive at it. Boot up Knoppix and connect the dead machine’s hard drive via USB. Knoppix should happily now be showing you the VM’s internal hard disk (/dev/hda1) and the external disk (probably /dev/sda1). Check these! Get a terminal window. Type “su” to become the root “superuser” and then dd if=/dev/sda1 of=/dev/hda1

dd is a program that does a low-level copy of the whole hard disk. It will take some time. In my case, for a 40GB disk, this was about an hour. Once dd has finished, shut down Knoppix and reconnect the VM’s CDROM to the XP disk. Go into the setup again – don’t try Recovery Console – and Windows will offer you a Recovery Install by pressing R. Do this. Make another cup of coffee – Windows will copy a whole load of files across and then reboot. When it reboots, you’ll see the graphical installer, which will prod you for various items. At some point it will ask you for a Windows serial number. This is where you may come unstuck. My original Windows serial number (on the sticker on the bottom of the old laptop) won’t work, because Microsoft distinguish between OEM copies of Windows (supplied to PC builders) and consumer copies (which are likely to get reinstalled). It’s possible that you might get round this by using the PC’s original recovery disk, but I didn’t try. Instead, I inserted a new serial number for Windows, as I had a seperate unused licence I’d obtained through a student discount scheme. Once Windows has accepted the serial number, you will now face a barrage of irritating popups, claiming that Setup cannot copy various .DL_ files. You need to laboriously manually cancel all of these. This gets a bit tedious as there are probably about fifty of them. Another burst of them appears when Setup tries to update the Start Menu. Once this is over, the machine will reboot and magically come back to life. It’ll probably prompt you first for Windows activation and registration, but then will bring you back to a familiar looking desktop! Job done. I hope this helps somebody at some point in the future!

2 Responses to “Resurrecting a dead PC – P2V using VMWare Fusion”

  1. Matthew Says:

    I replaced it temporarily with an Asus eeePC 900, although that was such a pain to use for more than about half-an-hour that my enthusiasm for blogging diminished considerably!

    That’s why you should have got an Acer Aspire One. :-) Mine is great. You’re never going to do work on it but it’s perfect for a bit of browsing and answering your e-mail. 802.11 out the wazoo as well so no need for a network cable. The only downside is the 2 hour battery life.

  2. Michael P-J Says:

    Matthew: I bought the eeePC in Tottenham Court Road about three weeks before the Aspire One was launched, as I just needed a new machine right there and then. It had its good moments, but I’ve barely had it on since buying the new Mac, so it’s on the transfer list.

Leave a Reply