Hyper-V, Hyper-V v2, References, Server 2008 R2, Virtualization, Windows
Leave a comment

Hyper-V: Notes on differencing disk usage

I came across a few issues while doing some scripting work related VHDShellExt project. In this series, I will list a few issues I found around differencing disk usage.

First one: Adding differencing disk as a new VHD to an existing VM

If that section title is too complex to understand, here is the step-by-step of what I tried. One assumption: You have integration components installed inside the guest OS.

    • Right-click on a VM and select settings
    • Select “IDE Controller 0”, select “Hard drive” on right pane and click “Add”
    • In the subsequent window, click on “New”
    • In the “New Virtual Hard disk” wizard, select “differencing disk” and click “next”
    • Give it a name and location and click “Next”
    • On the “configure Disk” screen, click on “Browse”, locate the VHD connected to this VM and click on “Open”
    • Click “Finish”

Now, when you try to power-on this virtual machine, you will see a nice error message like below

image

Now, let us try one more experiment. Let us remove the previously attached differencing VHD from the IDE controller and attach it to a SCSI controller. Now, try powering-on the virtual machine. In this scenario also, you will see a very similar message as above.

The reason behind these errors is simple. You cannot have the parent and child VHDs attached to the virtual machine at the same time. When you have a differencing disk, remove the parent VHD from the VM settings and try booting. It works.!

However, that is not the real technical explanation. When you try to mount a differencing VHD, it’s parent gets auto-mounted. Similarly — when you connect both Parent VHD and it’s child to the same VM — during VM initialization, both VHDs get initialized and are now “in use”. So, when you try booting from the differencing VHD now, it is not possible because the VHD is already in use. That is it…!

Filed under: Hyper-V, Hyper-V v2, References, Server 2008 R2, Virtualization, Windows

by

Ravikanth is a principal engineer and the lead architect for Microsoft and VMware virtualized and hybrid cloud solutions within the Infrastructure Solutions Group at Dell EMC. He is a multi-year recipient of Microsoft Most Valuable Professional (MVP) award in Windows PowerShell (CDM) and Microsoft Azure. Ravikanth is the author of Windows PowerShell Desired State Configuration Revealed (Apress) and leads Bangalore PowerShell and Bangalore IT Pro user groups. He can be seen speaking regularly at local user group events and conferences in India and abroad.