Restore Hyper V drive

Russell Ordiz 1 Reputation point
2021-04-19T08:56:50.843+00:00

Help me on restoring the VM drive of our Hyper V

Currently, we have AVHDX file and tried to attach it to the disk on the Hyper V management it can't be attached.

We have a important file on that drive and we need it to restore.

Tried also renaming the file extension but no success at all.

Can you help me on my problem

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,695 questions
{count} votes

7 answers

Sort by: Most helpful
  1. Yuhan Deng 3,766 Reputation points Microsoft Vendor
    2021-04-20T03:09:36.903+00:00

    Hi,
    A .avhdx file is a differencing disk, and to restore the data on it, you need to find its parent disk. Please note that if the parent disk is missing or the chain link between the parent and child disk is broken, the disk cannot be restored.
    Based on your description, we suggest that if you have any back up of this disk, restore the disk from back up. If you don’t have any back up of the disk, try manually merging the .avhdx file back to the .vhdx file.

    To establish the checkpoint structure, take the following steps:

    1. Open Hyper-V Manager.
    2. In the center pane, select the VM whose snapshots you want to be merged.
    3. In the Actions section on the right, click Inspect Disk.
      89296-image.png
    4. Select the .avhdx file and click open.
      89344-image.png
    5. Next, you should see a general overview of the virtual hard disk properties, including its name, location, and the parent’s name. Determine the parent of the selected .avhdx file.
    6. Repeat steps 3-5 for each .avhdx file and identify their order for merging.
      89325-image.png
      After that, you can start the process of merging Hyper-V snapshots. Note that your VM must be turned off to avoid any issues during the merging operation.
      To merge Hyper-V snapshots, do the following:
    7. Open Hyper-V Manager.
    8. Select the required VM.
    9. Click Edit Disk. The Edit Virtual Hard Disk Wizard will open. Click Next.
    10. Click Browse to select the latest .avhdx file. Click Next.
      89326-image.png
    11. Select Merge to merge the changes stored in a differencing disk into the parent or another disk. Click Next.
      89288-image.png
    12. Select to the parent virtual hard disk and click Finish.
      89289-image.png
    13. To fully complete the process of merging Hyper-V snapshots, repeat steps 1-5 for each .avhdx file, until all of the changes have merged into the original parent disk.
    14. The final step is to reboot the VM to adopt the implemented changes.

    Thanks for your time.
    Best regards,
    Danny

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Russell Ordiz 1 Reputation point
    2021-04-26T16:10:07.5+00:00

    hi Sir tried the instruction.

    The first test was successfull and i've merged the VHDX and the AVHDX.
    Then the 2nd VHDX i am trying to merge i've encountered this error.

    91259-error.jpg

    what causes this issue?

    thanks

    0 comments No comments

  3. Yuhan Deng 3,766 Reputation points Microsoft Vendor
    2021-04-27T02:09:54.927+00:00

    Hi,

    Have you created checkpoints for the VM? Edit is not available when checkpoint exists:

    91525-image.png

    Thanks for your time.
    Best regards,
    Danny

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  4. Russell Ordiz 1 Reputation point
    2021-04-27T10:56:15.06+00:00

    91725-image.png

    There's no warning or any prompt when attaching the AVHDX.
    But when you click the edit, this will prompt.

    91731-image.png

    0 comments No comments

  5. Yuhan Deng 3,766 Reputation points Microsoft Vendor
    2021-04-28T02:30:30.603+00:00

    Hi Russell,
    Would you try inspecting this disk? If you can inspect it, go on with merging; if you can’t, please provide us with the error code.

    Thanks for your time.
    Best regards,
    Danny

    -----------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.