December 09, 2012

Windows 8 Hyper-V to run another OS prepackaged as a VHD

XP Mode isn't the only way you can run a "prepackaged" operating system from a VHD file. Many other Microsoft operating systems are also available in VHD bundles, such as Windows Server 2012. The same goes for many of Microsoft's server-side applications, such as SQL Server and Exchange Server.

Many other vendors' products -- whether OSes or products that come deployed as a virtual appliance -- are also being made available in VHD editions. Various Linux distributions, for instance, and products like Citrix XenApp are offered as VHD downloads.

The beauty of this kind of prepackaging is that there's nothing to set up on the host system. You only need to download the VHD, create a virtual machine to host it in the Client Hyper-V console, and boot it.

If you've obtained a virtual disk in a format other than VHD, not to worry. Third-party programs can convert virtual disks between formats, including free ones such as StarWind V2V Converter.

Use Windows 8 Hyper-V to migrate an OS from a physical machine
Another nifty use of Client Hyper-V is to run a virtual machine made from a copy of another physical machine's hard drive. This is handy if the system in question is suffering from hardware problems or otherwise needs to be retired from service, but the instance of the OS on it still needs to be running in some form.

That said, Client Hyper-V can't perform this kind of migration by itself. Microsoft engineers Mark Russinovich and Bryce Cogswell (of Sysinternals fame) created a tool called Disk2vhd to bridge the gap. When run on a given Windows system (Windows XP SP2 and later), Disk2vhd polls all the available physical drives in the system and lets you create an image from them. You can even convert a currently running system drive, since Disk2vhd uses Windows' own Volume Snapshot technology to accomplish this.

Two details are worth noting here. First, the virtual machine you create should match the hardware specifications of the original whenever possible. Otherwise, when you boot the VHD for the first time, the guest OS may detect major hardware changes and respond accordingly, including triggering the need to reactivate Windows.

Second, note that due to licensing, you can't transfer an OEM-licensed copy of Windows to a virtual machine from a physical machine for production use. You can, however, do this with systems that have a full retail Windows license or a copy of Windows courtesy of Software Assurance.



The Disk2vhd tool generates VHD images from a hard drive, even one with a running instance of Windows on it. Use Disk2vhd to migrate physical machines; just remember the limitations of any licensing agreements.

No comments:

Post a Comment