Monday, November 9, 2009

Windows 7 - What's New in Virtual Hard Disks


The Microsoft Virtual Hard Disk file format (.vhd) is a publicly available format specification that specifies a virtual hard disk encapsulated in a single file, capable of hosting native file systems and supporting standard disk operations. VHD files are used by Microsoft Windows Server 2008 Hyper-V, Microsoft Virtual Server and Microsoft Virtual PC for virtual disks connected to a virtual machine. VHDs are useful containers and the .vhd file format is also used by Microsoft Data Protection Manager, Windows Server Backup as well as many other Microsoft and Non-Microsoft solutions.

What's new in Virtual Hard Disks?

In Windows® 7, a virtual hard disk can be used as the running operating system on designated hardware without any other parent operating system, virtual machine, or hypervisor. Windows 7 disk-management tools, the DiskPart command line tool and the Disk Management Microsoft Management Console can be used to create a VHD file. A Windows 7 image (.wim format) file can be deployed to the VHD and the .vhd file can be copied to multiple systems. The Windows 7 boot manager can be configured for native, or physical boot of the Windows image contained in the VHD. The .vhd file can also be connected to a virtual machine for use with the Hyper-V Role in Windows Server® 2008 R2. Native-boot VHD files are not designed or intended to replace full image deployment on all client or server systems. Previous Windows releases do not support native boot from a VHD and require a hypervisor and virtual machine in order to boot from a VHD file.

For more information about using Virtual Hard Disks for Native Boot in Windows 7, see the Walkthrough: Deploy a Virtual Hard Disk for Native Boot topic in the Windows Automated Installation Kit for Windows 7 Beta.

Who will want to use Virtual Hard Disks?

Enterprise environments already managing and using .vhd files for virtual machine deployment will find the most benefit from the disk management support for VHD files and native-boot VHD capabilities. Many of our data center customers are transitioning to Hyper-V virtual machines (VMs) for server consolidation and lower energy costs. Native VHD support in the disk management utilities and core storage system simplify creation and image management in VHD files.

While moving an increasing number of applications to virtual machines, Enterprise environments still operate a significant part of the data center on physical machines. IT administrators have to maintain two sets of images: one set based on the .wim format for physical machines, another set based on the .vhd format for virtual machines. The common image format supporting both physical and virtual machines provides flexibility in image deployment while simplifying the process of image management.

Developers and testers are using virtual machines to test new system and application software. Virtual machines provide a convenient, isolated test environment and reduce the need for dedicated test hardware. But sometimes you need to run tests on a physical machine to access a specific hardware device, like the graphics card, or to get accurate performance profiling. A common image format that runs on both virtual and physical machines also benefits developers and testers. Native boot from VHD enables booting a Windows 7 image from a file without creating a separate physical disk partition in which to install Windows.

What are the benefits of the new and changed features?

Native support for VHDs makes image management simpler and reduces the number of images to catalog and maintain. To create a VHD on Windows Server 2008, you install the Hyper-V Server role and use the Hyper-V Manager to create a VHD file, and then started the virtual machine to install a version of Windows from the CD/DVD onto a partition in the VHD. In Windows 7, the native support for the VHD format means that VHD files can be created and modified without installing the Hyper-V Server role. VHD files can be attached using the disk management tools, and the Windows image inside the VHD is available for servicing. The Windows Deployment tools in the Windows Automated Installation Kit (Windows AIK) can be used to apply a Windows image to the VHD, and to apply updates to the system image in the VHD file.

The Windows image applied to a VHD file can boot in either a Hyper-V virtual machine, or boot natively on a physical machine without the use of a hypervisor. In order to boot the Windows system in either a virtual or physical machine, the boot environment must be initialized correctly for each scenario.

What are the dependencies?

The steps for deploying a Windows 7 or Windows Server 2008 R2 image to a VHD file depends on the Windows deployment tools, including imagex.exe. Imagex.exe is used to capture a Windows operating system partition into a Windows Image (.wim) file format, and to apply a .wim file to a file system partition, which may reside inside a VHD file.

The imagex.exe deployment tool is one of the tools distributed in the Windows Automated Installation Kit (Windows AIK). The Windows 7 Beta version of the Windows AIK must be installed to get the deployment tools and is available for download from the Windows Automated Installation Kit for Windows 7 Beta.

The Windows AIK download is an ISO image that you burn to a DVD and then install on your system. After installing the Windows AIK, the ImageX command line tool is located in the Windows AIK\PE Tools directory.

Native boot of Windows 7 from a VHD file also requires the Windows 7 boot environment. The Windows 7 boot environment is initialized during a full operating system installation and includes the Windows Boot Manager and Boot Configuration Data (BCD) and other supporting files.

What's the impact of these changes on Virtual Hard Disks?

The support for VHD as a native format targets key scenarios in the enterprise where the IT staff is well versed with different imaging technologies and tools to manage their client and servers. A managed enterprise environment also employs technologies like folder redirection and roaming profiles to manage the user’s data outside the deployed VHD images. There are recommendations and limitations for virtual hard disks in the Frequently Asked Questions: Virtual Hard Disks topic.