Introduction to Virtual Hard Disks
Applies To: Windows 7, Windows Server 2008 R2
The virtual hard disk file format (.vhd) specifies the format of a file that represents a virtual hard disk. To use VHDs on Windows Server 2008 and previous versions of Windows, you must install the Hyper-V role, Microsoft Virtual Server, or Windows Virtual PC. However, with Windows 7 and Windows Server 2008 R2, you can create, configure, and boot physical computers from VHDs without a virtual machine or hypervisor. This functionality simplifies image management because it enables you to:
Standardize the image format and toolsets in your organization.
Reduce the number of images to catalog and support.
Enable increased server utilization to conserve energy.
For a list of the tools that you use to create and maintain VHDs, see Appendix: Tools and APIs for Virtual Hard Disks.
In this topic:
Supported operating systems
Common usage scenarios
Supported operating systems
All versions of Windows 7 and Windows Server 2008 R2 support basic VHD operations such as creating and attaching VHDs. However, the editions that support native VHD boot are:
Windows Server 2008 R2: All editions except Windows Server 2008 R2 Foundation
Windows 7: Only the Enterprise and Ultimate editions
Common usage scenarios
Microsoft used the following scenarios to guide development and support for VHDs in Windows 7 and Windows Server 2008 R2.
Scenario one: Image consolidation
Goal: Enable customers to create, deploy, and maintain a single image format for physical and virtual computers.
Background:
Enterprise and datacenter administrators who manage large numbers of servers typically generate a set of master images to simplify operating system maintenance and deployment. Each master image is for a particular hardware and operating system configuration (for example, it has a specific set of applications, drivers, and so on). These master images comprise an organization’s image library, which includes a variety of image formats. Administrators must maintain separate processes and toolsets to support each format in the library.
Scenario description:
Josh Bailey, the IT administrator of Wide World Importers, maintains an image library that contains 14 master images to support physical and virtual environments. The images include the following types:
Windows Imaging file format (.wim images)
Hyper-V (.vhd images)
VMware virtual appliances
PowerQuest
Altiris
Josh is using the following tools to create, maintain, and deploy the images:
Microsoft System Center Configuration Manager for the .wim and .vhd images.
HP Systems Insight Manager (SIM) for the VMware images.
PowerQuest Drive Image for the PowerQuest images.
HP Insight Rapid Deployment (RDP) for the Altiris images.
Josh has decided to standardize all physical and virtual images on the .vhd format and to migrate the Windows 2000 workloads to a virtualized environment. Standardizing has allowed him to reduce the total number of images from 14 to 11 and reduce the number of supported image formats from four to one. Using only the .vhd format allows him to adopt a single application—Configuration Manager—to create, maintain, and deploy the images instead of the four applications he used to use.
With the tools that are provided in Windows Server 2008 R2 and the Windows AIK, Josh creates generalized Windows Server 2008 R2 VHDs that run in physical and virtual environments. Using System Center Virtual Machine Manager, Josh preconfigures VHDs that run in virtual environments for the Windows Server 2008 R2 operating system. He also uses these tools to create and maintain VHDs that support workloads for the Windows 2000 operating system.
Simplifying the toolset saved Josh significant time and expense in tool development, licensing, and maintenance. It also allowed him to merge infrastructure and deployment processes, which significantly reduced operation and capital expenses.
Scenario two: Server provisioning
Goal: Enable customers to provision physical computer resources.
Background:
Enterprise and datacenter administrators who want to operate a flexible and dynamic environment frequently need to quickly provision computer resources. To achieve this goal, they deploy images from an image library that contains master images as part of a managed deployment solution.
Scenario description:
Phil Spencer is an administrator for Woodgrove Bank who used the .vhd file format to standardize all images. After he completed the standardization, his boss told him that the company needs additional capacity for the servers that currently run their Web site. Phil determines that three physical servers are required to satisfy this request.
The deployment and provisioning service in his organization executes scripts to do the following:
Create a new allocation record in the configuration management database.
Capture the required configuration parameters.
Store the parameters in the new allocation record.
Turn on three reserve servers that are configured to network boot, copy, and launch a Windows Deployment Services client.
The Windows Deployment Services client is provided an Unattend.xml file that describes the storage and operating system configuration of the server and identifies the correct image to deploy. The image is contained within a VHD, which includes Windows Server 2008 R2 with Internet Information Services (IIS) installed and configured. The deployment process also configures the local boot environment for each server. After the VHD is copied to the destination server, the server restarts and Setup continues. The server restarts again and another script is run to finalize the server configuration.
Standardizing the physical images on the .vhd file format enables Phil to perform a simple and rapid deployment of Windows images without requiring him to set up the operating system or apply the image. Image deployment is reduced to copying a file and configuring the boot environment, which minimizes the deployment time.
Scenario three: Server repurposing
Goal: Enable customers to repurpose hardware without increasing the complexity of deployment or servicing.
Background:
Enterprise and data center administrators who want to operate a flexible and dynamic environment frequently need to quickly repurpose computer resources. To achieve this goal, they deploy images from an image library that contains master images as part of a managed deployment solution.
Scenario description:
A. Datum Corporation offers services for hosting web, mail and application server workloads for customers. Customers can lease physical computers from A. Datum in increments of as little as 12 hours or more for each of the three workloads.
By using VHDs, A. Datum can configure each physical computer with the ability to run any of the three workloads. The administrator can transition between the workloads by updating the boot environment and rebooting the computer. After the computers are configured, customers are allocated a VHD instead of an entire physical computer that contains an operating system image and the specific workload. All changes that are made by the customer to the image are captured to a differencing disk. When the customer’s lease ends, the differencing disk is archived and the boot environment can be reconfigured to boot a workload as required by the next customer.
Scenario four: Application development and validation
Goal: Enable ISVs to develop a common, reusable image that can be quickly deployed for validation.
Background:
Many ISVs who develop software and drivers to support hardware devices often need to perform tests (for performance, reliability, and so on) on real hardware. Traditionally this required ISVs to install Windows on a destination computer, run specific tests, and then debug in that environment. Products like Virtual PC allow ISVs to virtualize test resources for development purposes. However, virtualization solutions in general do not support virtualization of specialized hardware, which may be a key part of testing scenarios. As a result, this testing must occur on physical computers.
Scenario description:
Contoso, Ltd. develops the software and hardware for a graphics card. They test continually to validate that the hardware and software work correctly. In addition, Contoso performs monthly validation passes across a broad range of hardware configurations. To manage these processes, Contoso has created a set of generalized operating system VHDs that contain various user applications.
At the beginning of the week, Contoso deploys each image to a set of hardware configurations. After the image is deployed and specialized, Contoso deploys a differencing disk to which all additional data is written, including all test data. At the end of a test run, the differencing disk is analyzed for test failures and a new one is created for the next test run. If failures occurred during a run, the differencing disk is archived for future use.
Using differencing disks in this way allows Contoso to run each test from a clean installation. The administrators do not have to worry about discrepancies in the environment from a previously failed test run. In addition, by archiving the differencing disks from the failed runs, developers can debug these failures on their schedule without worrying about stalling other runs. They can re-create an approximation of the test failure by using the archived differencing disk.
Scenario five: Virtual desktop infrastructure
Goal: Enable customers to deploy one image type to both physical and virtual client computers.
Background:
Many enterprises are moving to a virtual desktop infrastructure (VDI) to host client computers. VDIs typically use Terminal Services or virtual machines. In both cases, there is a host server that provides a server image. With a virtual machine-based VDI solution, there are client images on a VHD. When administrators run all the virtual machines, there is no problem with using VHDs; however, when the administrator wants to migrate a user from a VDI to a physical computer, he needs to deploy the operating system image to a physical computer. This requires the administrator to have two images: one for the physical computers and one for the VDI.
Scenario description:
Contoso,Ltd. has a call center with hundreds of employees. One-hundred of the employees work remotely through VDI, but need the same desktop images as the employees who work onsite using physical computers.
As part of its highly managed environment, Contoso uses Folder Redirection and roaming user profiles so that the user state of remote employees is not stored in the image. Contoso also uses Windows Deployment Services and multicasting to deploy the VHD images to multiple computers at one time. By using native support for VHD boot in Windows 7, Contoso is able to create and deploy VDI images to all 100 remote employees. When an employee requires a transition to a physical computer, their VDI image is prepared with Sysprep and configured to boot to a physical computer boot. After the image is deployed to a physical computer and joined to a domain, the user profile data and redirected folders are available to the user. If employees are migrated back to VDI, the process can be reversed. That is, the images are prepared with Sysprep and configured for the virtual memory boot. After they are joined to a domain, the redirected folders and profile data are available.