Know to create Windows 7 Virtual Hard Disk as a backup device

You can create a VHD from the Disk Management Console

You can create a VHD from the Disk Management Console
As you know, using external hard disks as backup devices has become very popular recently due to the fact that they are now relatively inexpensive to purchase or build. I use several of them for backups on my home and test systems.

The other day I was experimenting with Windows XP Mode on my Microsoft Windows 7 test system and was backing up my Windows XP Mode virtual machine and the accompanying virtual hard disk (VHD), when it occurred to me that I could use a VHD as a backup device.

Once I began experimenting with this technique, I knew that it would be perfect complement to my overall backup strategy. I don't trust a single backup device and like to have multiple backups just in case. Using VHDs, I can easily back up my data and then just copy the VHD file to another external device.

In this edition of the Windows Desktop Report, I'll show you how to create and use a VHD as a backup device.

Getting started
Because the technology is built right into the Windows 7 operating system, you don't have to install Windows Virtual PC to create a VHD - you can do it right from the Disk Management Console or even from the command line with the Diskpart command. Let's take a look at the procedure using the Disk Management Console. (I'll go over the Diskpart command procedure at a later time.)

To get started, click the Start button and type Diskmgmt.msc in the Start Search box and then press [Enter]. When the Disk Management Console appears, as shown, you're ready to create your VHD.


You'll then need to specify a location, name, and size for your VHD

You'll then need to specify a location, name, and size for your VHD
Creating a VHD
Pull down the Action menu and select the Create a VHD command. When you do, you'll see the Create and Attach Virtual Hard Disk dialog box. You'll then need to specify a location and name by clicking the Browse button. You then will specify a size. The Size drop down will allow you to select the size of the VHD in MB, GB, and, TB. As you can see in Figure B, I set up a 40GB VHD called My VH Disk in the Documents folder.

You'll see a progress gauge at the bottom of the Disk Management Console window

You'll see a progress gauge at the bottom of the Disk Management Console window
You can specify the format be either Dynamically expanding or Fixed size. The latter is the default and is the option I chose for my VHD. A fixed size VHD will create a file that is the same size as the virtual disk. For example, if you create fixed VHD that is 40GB in size, the system will create a host file approximately 40GB in size.

A dynamically expanding VHD will create a file that at any given time is as large as the actual data written to it plus the size of the header and footer. For example, if you create a virtual hard disk that is 40GB in size, the system will create a host file approximately 80MB in size. As more data is written, the file dynamically increases in size by allocating more disk space from the host hard disk.

For the purposes of creating a virtual Back up device, either format is fine.

When you click OK, the Disk Management Console will begin creating the VHD. Depending on the size that you selected, it may take a little while to create the VHD. You'll see a progress gauge at the bottom of the Disk Management Console window, as shown.

When you select the command you'll see the Initialize Disk dialog box

When you select the command you'll see the Initialize Disk dialog box
Once the VHD is created, right click on its header panel on the left side and select the Initialize Disk command and you'll see the Initialize Disk dialog box, as shown. You'll see that your new disk is already selected and since the GPT partition style is designed for 2TB disks or Itanium-based computers, just go with the default MBR partition style and click OK.

When you select the command and you'll see the New Simple Volume Wizard

When you select the command and you'll see the New Simple Volume Wizard
As you may know, MBR is the standard partitioning style that's been used on hard disks since the PC first came out. (Just FYI: MBR supports a maximum partition size of 2TB. GPT supports a maximum partition size of 256TB.)

Initializing the disk is a very quick operation. Once it is complete right click on right side and select the New Simple Volume command and you'll see the New Simple Volume Wizard, as shown.

When you complete the wizard, an AutoPlay dialog box will appear and prompt you to open the new driveWhen you complete the wizard, an AutoPlay dialog box will appear and prompt you to open the new drive

There are five steps in this wizard and you can just accept all the default settings and click through to the end. When you do, the disk will be formatted as an NTFS volume and an AutoPlay dialog box will appear and prompt you to open the new drive, as shown.

You can locate and copy your VHD file to multiple locations.

You can locate and copy your VHD file to multiple locations.
Implementing the VHD backup strategy
To back up your data to the VHD, you can simply copy the files and folders from your hard disk to the VHD or you can use Windows 7's Backup and Restore to actually create its backup file on the VHD. You can then locate the actual VHD file, as shown, and copy it to an external hard disk or to a network drive.

You can locate and copy your VHD file to multiple locations.

If you want to have multiple copies of your backup, you can copy the VHD file to multiple locations.

Comments

Anonymous said…
whats the benefit of copying to a vhd? Why not just backup to ext hdd's?
kalil said…
Dear nex,

VHD has takes whole image of your OS.You can use VHD as Virtual image source