My DA Favourites
PAINFUL PLEASURE by reiq
5 Jun, 2008

Convert Drive Snapshot image to VMWare virtual machine

Before disposing of my previous PC running Windows XP, I took a backup of it using Drive Snapshot.  I like this utility because it is somewhat free, and allows you easy access to the files within the image.  However, this was before I was aware of VMWare converter, which is even more free and has the added benefit of allowing you to actually boot up the backup as virtual machine.  This will allow you to boot the OS and export information from the installed programs that my have otherwise been inaccessible via the file system.

So my goal was to convert my Drive Snapshot backup of my old PC to a virtual machine so I could load some of my old software when required.  It's not difficult to do, but when I was searching the web in hopes I of learning from someone else I found nothing (useful).

The un-detailed steps to do this is to create a new virtual machine that will become your old PC (which I'll refer to as Restore VM), attach it's virtual disk to another virtual machine (which I'll refer to as Helper VM), use the Helper VM to restore the image to the Restore VM disk, detach the disk from the Helper VM and then start the Restore VM.

Note that my backup was of Windows XP and I've found XP to be quite good at moving to different hardware (in this case, virtual hardware).  If you're using an older version of Windows, this guide may not work for you.

These are the detailed steps I followed to do this successfully using a Beta version of VMWare Workstation 6.5 (these steps will most likely work with the free VMWare Server also):

  1. First create a new virtual machine that will run the restored Drive Snapshot backup.  I'm going to call this machine Restore VM.  When you create Restore VM using the wizard, make sure on the the Guest Operating System Installation screen you select "I will install the operating system later" and then select the correct operating system that you will be restoring. 

    Also, make sure you specify a disk size large enough to restore your backup to (just to be safe I made mine a few GB larger than necessary).  If you're not sure how much space will be required, run Drive Snapshot and click the button "View contents of saved Disk Image" then choose the image file (.SNA), it will then display the original size of the backup disk.  Complete the wizard and we now have our virtual machine ready to restore our image to.

  2. Now the trick is to get our snapshot onto the Restore VM disk.  There's a couple of way you can do this, but what I did was create another virtual machine running Windows called Helper VM.  If you already have a Windows virtual machine you could use that instead of creating a new one.

  3. Now we want to attach our Restore VM disk to the Helper VM.  With the Helper VM shutdown, edit the machine settings and click the Add button to add hardware.  In the Add Hardware Wizard, select Hard Disk from the list of hardware types and click next.  On the next screen select "Use an existing virtual disk" and click next.  Browse to the Restore VM virtual disk and then click Finish.

  4. Before closing the Virtual Machine Settings for Helper VM, go to the Options tab and select "Shared Folders".  Enable folder sharing and then click the Add button and follow the wizard to share the folder containing your Drive Snapshot backup files.  With that done, you might like to copy the Drive Snapshot program (snapshot.exe) into the same folder as your backup files so you have easy access to it from the Helper VM.  If your VMWare product does not have this feature, you can share the folder using Windows--do whatever it take to get access to the files.

    You may find that the virtual disk created for the Restore VM is an IDE device.  If your Helper VM's virtual disk is SCSI you will need to make sure the boot order in the virtual machine BIOS is set to boot off the SCSI drive before the IDE drive.

  5. With the Helper VM started, open Computer Management (run compmgmt.msc), cancel any wizards that might appear as a result of Windows detecting a new disk and go to Storage > Disk Management.  You should see the Restore VM disk you created to restore your backup to.  Right click on the left area of the disk (where it says "Disk #") and select "Initialize Disk" and click OK to initialize the disk.  Now right-click on the right area of the disk (where it says "Unallocated") and select "New partition...".  Follow the New Partition Wizard to create a primary partition at the maximum size and assign it any drive letter you like.  Make sure you choose the same file system as your backup used and select the option to perform a quick format.

  6. Once you've completed the wizard, the disk has finished formatting and is reported as healthy, open your VMWare shared folder (Should be an icon on the desktop but if not, go to \\.host\Shared Folders\) and run snapshot.exe.  In Drive Snapshot, click the button to "Restore Disk from File", select the backup image file and click Next.  From the list of volumes, select the Restore VM drive you created, click Next and respond Yes to the last warning about overwriting all data on the disk.  If it asks about extending the file system to match the partition size, click Yes.  Now we grab a coffee, or ten, or possibly go on vacation, until the restore is complete.

  7. Shutdown Helper VM, edit the virtual machine settings and remove the Restore VM disk you restored the image to.

  8. Here's the exciting part, start Restore VM.  Windows XP Should install all necessary drivers to make the system usable, then you can install the VMWare Tools to get proper control of the system.

Note that Windows XP will recognise that it has been moved to different hardware and will most likely demand that it be reactivated.  Additional changes to the virtual machine settings after activation may again result in another prompt to reactivate.  Before activating Windows, set the amount of RAM to your prefered size and install VMWare Tools.  Refer to the VMWare Windows XP Help page for more details about Windows Activation.

Filed In:

Comments

No comments have been posted.

Add comment:


Submit Comment Preview Comment

Rules: Paragraphs and linebreaks are automatically created (two or more linebreaks create a paragraph). Linebreaks between code tags remain linebreaks. Block tags cannot be enclosed by inline tags. Red attributes are required and green is optional.

Use "&lt;" and "&gt;" for "<" and ">". Enclosing PHP code in <code> tags will highlight the code (i.e. <code>&lt;?php echo 'hello world'; ?&gt;</code>).

List of valid tags: