Udostępnij za pośrednictwem


Live New Parent in Windows Server 2012 Hyper-V

 

In several presentations and various documents we mention the feature “Live New Parent”. In all cases we mention the feature in a comparison table. Nowhere do we explain the feature or go into a little bit of detail on what it is.

Today I ran into a situation where I used it and thought it was actually very cool.

In my rather limited demo environment, I have two laptops running Hyper-V Server 2012 Beta. For a future demo I needed to reinstall both hosts with Windows Server 2012 Beta. But I had virtual machines running and one of them is my management VM from which I run all management tasks.
So I wanted to Live Migrate the VM’s to one host and install Windows Server 2012. Then, after installation and a bit of configuration, I wanted to Live Migrate everything back and install Windows Server 2012 on the second host.

Two virtual machines however failed to Live Migrate. By the way, this is all Shared Nothing Live Migration I am talking about so Live Migration without shared storage.
The issue was related to a virtual disk that could not be found. It was the parent virtual disk of the differencing disk I use with all my VM’s.

On both hosts I use the same path to the parent virtual disk for example c:\vm\base\ws8beta.vhdx. When migrating VM’s from host1 to host2 and vice versa, I only need to migrate the differencing virtual disks because both point to the same parent location. This means that the relatively large parent virtual disks only need to exist on both hosts at the same location to make live migration of VM’s with differencing disks work without the need of copying the parent as well.

But the specific problematic VM’s that would not migrate had their parent virtual disk pointing to a different location. This was because these VM’s were once replica’s. With Hyper-V Replica, the parent virtual disk is also being copied to the target host and the pointer of the differencing disk is being updated to reflect the new location. In this case the parent was located in a deep path. The parent virtual disk was identical to the one I normally use in c:\vm\base. Both VM’s were running and I did not want to change that.

With Windows Server 2008 R2 you would have to shutdown the VM and then reconnect the differencing disk to the one at c:\vm\base. With Windows Server 2012 you don’t. And that is exactly what Live New Parent is.

I only needed to run Set-VHD –Path <path> -ParentPath <parentpath>. In this specific case I ran:

Set-VHD –Path c:\vm\contoso1\disk1.vhdx –ParentPath c:\vm\base\ws8beta.vhdx

This was all there was to it. While the VM’s were running I reattached the original parent virtual disk to my differencing disk. Since both hosts contain this parent at the same location, I could then migrate using Move-VM.

Comments

  • Anonymous
    November 06, 2012
    This article really helps me a lot :) Thank you so much!