How to merge vDisk versions using Diskpart

How to merge vDisk versions using Diskpart

book

Article ID: CTX238041

calendar_today

Updated On:

Description

There are times we need to import a vDisk with all the changes stored in different versions while the XML of it is not available.
We can use this method to create a merged base outside PVS before importing it in a farm which will not require XML or PVP files for it.

Resolution

Sample scenario:
We have 10 versions of a vDisk (vhd or vhdx files).
At version 7 we have a merged base and then at version 3 we have another.
We know that version 7 would have all the changes done in versions prior to it. In order to import the disk in a new farm, we would need to merge the versions 10, 9, 8 to version 7.

NOTE: Please backup vDisk files before proceeding further.
To achieve the above mentioned outcome, use commands listed below in administrative command prompt:
(Make sure you have the vDisk files available locally on the machine on which diskpart is used )

diskpart         //To enter the diskpart command line
select vDisk file="Path to the latest version"
merge vdisk depth=3  //As there are 3 hops till we reach version 7

The final vDisk will be version 7 itself which should be renamed to remove the number from its name as PVS would not allow to import with a number after period in it.

 

Additional Information

https://blogs.msdn.microsoft.com/7/2009/10/07/diskpart-exe-and-managing-virtual-hard-disks-vhds-in-windows-7/