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.

    clip_image001

    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

    clip_image002

    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)

    clip_image003

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

    clip_image004

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

    clip_image005

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

    clip_image006

    1. Rename avhd/x file to vhd/vhdx

    clip_image007

    clip_image008

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

    clip_image009

    1. Click on “next”

    clip_image010

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

    clip_image011

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

    clip_image012

    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)

    clip_image013

    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)

Advertisement

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: