Friday, April 16, 2010

Converting your Windows 7 computer to VHD

Here I am working on a project to convert my Windows 7 laptop to a VHD. With this VHD I can keep my workspace regardless of hardware as long as I am able to boot from a VPC.

It also proves to be a good way to backup your computer while keeping your programs and files the way they are. You can always use a cloning tool to restore the VHD to your hard disk.

There are a few tools we need:

1. Disk2vhd – Windows Sysinternals tools http://technet.microsoft.com/en-us/sysinternals/ee656415.aspx

2. VHD Resizer – VMToolKit http://vmtoolkit.com/files/folders/converters/entry87.aspx

3. Windows Virtual PC http://www.microsoft.com/Windows/virtual-pc/default.aspx

Let’s start to convert your Windows 7 computer to VHD.

1. Run Disk2vhd, select the disk to convert to VHD. Then enter a VHD file name. Once done, click on Create to start the conversion.

image

image

2. One of the limitations of Windows Virtual PC is IDE hard disk and disk size limit of 127 GB. For those of you who’s hard disk are bigger than 127GB, you have to shrink it. To shrink the VHD, open Computer Management Console and Attach VHD.

image

3. Right click and bring the VHD Online.

image

4. Shrink the OS volume.

image

5. Now shrink the VHD volume to less than 127GB. Detach the VHD when shrinking completes.

image

6. Open VHD Resizer to resize the VHD to less than 127GB.

image

This completes how to convert your physical Windows 7 computer to a VHD. I will be posting an article on running this Windows 7 VHD on a Windows Virtual PC soon.