Hyper-v how to merge vhd/vhdx files(merge data from snapshots to parent disks)

    I have on vm and its running on a sanpshot.


    After several months accidentally I have applied to this snapshot. Than how I can recover this data?

    1. First I verified the vdh and vhdx structure
    2. Take the full backup of the vm/folder


    1. Then I verified the avh/avhdx and vhd/vhdx relationship

    (Go to the settings of the vm >Select the hard disk > Click on inspect)


    1. Shut down the vm
    2. Go to the settings of the vm and select hard disk which we going to merge the data


    1. Browse and select the parent this as the default hard disk


    1. Click on “open”
    2. Click on “apply” and contine(Don’t create checkpoint)


    1. Rename avhd/x file to vhd/vhdx



    1. Click on the vm and select edit disk on your right hand side


    1. Click on “next”


    1. Select the snapshot file(which we have renamed)


    1. Click on “Next” and select “Merge”


    1. Select the “To a new virtual hard disk” and click give a path to new disk and click on “Finish”(ensure that there is enough space in the disk to keep the virtual disk/s)


    1. Mount new vhd/x to vm and power on the vm

    Note(Before doing any changes to your vm I’m recommend to take the full backup of vm/vms)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: