Creating and Configuring Hyper-V Virtual Hard Disks (VHDs)

From Virtuatopia
Revision as of 18:17, 13 January 2009 by Neil (Talk | contribs) (Creating Hyper-V Virtual Hard Disks)

Jump to: navigation, search

In Creating Hyper-V Virtual Machines we looked at creating a Hyper-V Virtual Hard Disk (VHD) as part of the Create New Virtual Machine wizard process. Unfortunately, the ease of use of the wizard masks some powerful features of Virtual Hard Disks within Hyper-V. The purpose of this chapter, therefore, is to cover some of the more advanced features of Hyper-V virtual hard disk creation and configuration.

Creating Hyper-V Virtual Hard Disks

As previously covered, virtual hard disks can be created as part of the virtual machine creation process. To gain access to a wider range of disk configuration options, an alternative is to create the disk independently of the virtual machine, and then subsequently assign to the virtual machine after the disk has been created.

New disks are created from the Hyper-V Manager (Start->Administrative Tools->Hyper-V Manager). Once Hyper-V Manager is running, select the desired Hyper-V host from the left hand panel and then click on the New->Hard Disk... option in the Actions panel. This will invoke the New Virtual Hard Disk wizard. If the welcome screen appears, click next to proceed to the Choose Disk Type screen as illustrated in the following figure:


Choosing the Hyper-V virtual hard disk type


Hyper-V supports three different types of virtual hard disk:

  • Dynamically Expanding - Dynamically expanding virtual hard disks start small and then automatically expand to provide more capacity on an as needed basis. Note that the dynamic feature only applies to expansion. In other words, the virtual hard disk will not automatically decrease in size when data is removed.
  • Fixed - Fixed virtual hard disks are created at the size specified during the disk creation process. The size of fixed virtual hard disks can be altered using the Hyper-V Manager Edit Disk... action to launch the Edit Virtual Hard Disk Wizard.
  • Differencing - Differencing is a concept which involves a parent disk and a child disk. The parent disk contains a baseline hard disk image with the operating system and perhaps a range of applications and data installed. Once this baseline parent disk is configured, a differencing disk is assigned as a child. When the virtual machine to which the disk is assigned runs, any changes made the baseline parent image are actually stored on the child differencing disk, leaving the parent disk unaltered.