Sunday, March 22, 2015

Mounting and Unmounting VHD Files

I recently had to work with Hyper-V for setting up an environment for hosting Virtual Machines.  I have been a long-time user of VMWare products (VMWare Workstation, Player and vSphere) so I was relatively unfamiliar with Hyper-V.

In fact, the last time I worked with Microsoft virtualization was when they had just released Microsoft Virtual PC and Microsoft Virtual Server!

Fortunately, even being unfamiliar with the product, I was able to ramp up and figure out how to set up a VM in just a few minutes.

However, one of the perplexing aspects of Hyper-V was the use of VHD files.  I could mount multiple VHD disks, but I could not get the boot CD to recognize the VHD disks at all.

Well, I discovered that I could mount and unmount VHD files like I can mount VMDK files in VMWare.  However, the mounting of VHD files could occur directly through the Disk Management Console!

After looking over this article: http://www.7tutorials.com/disk-management-how-mount-and-unmount-vhd-images, I was able to mount my VHD files and format them.

I also found these PowerShell commands to mount and unmount the VHD files:

 https://technet.microsoft.com/en-us/library/hh848551.aspx

https://technet.microsoft.com/en-us/library/hh848562.aspx?f=255&MSPPError=-2147217396

Once I had formatted the VHD files, I detached the VHD files and booted up my Hyper-V virtual machine once more.

As expected, I could now see the VHD Disks in my virtual machine using my boot CD!


No comments:

Post a Comment