Recently one story had happened to me: my PC had crushed and all my Hyper-V VMs are gone. Annoying when the project is important and dead line is in 4 days. The complication of restore process is that my VMs had also checkpoint created and restore had to be done with checkpoints as the state of the VM was in them. Otherwise, attach the VHD(x) disk to new created VM is enough.
After difficult and interesting post searches here are some tips for you how be able minimally to restore your VMs before crush state.
Firstly, you should check if the state of all you files is good and the chain of disks is not lost. To do this:
- Go to Hyper-V manager and inspect the disk which was crushed
- To do this:
- Go to Hyper-V manager
- Click “Inspect disk”
- Select “.avhd(x)” disk of the last(!) checkpoint. You can order by last edit date.
- If the check shows “information” only, this means that the the chain is not broken. In this case there is “check (show) parent” button shown…
- In case there is “Repair” button shown, you should repair the chain which was broken. (Note, that in my case there was no broken links between parent and checkpoint files as after some important PC crushes I’m storing VMs on several HDDs as export files (Hyper-V manager – > Export option) and working files (holding VM files on other than OS disk)) so the process of repair was not required for me.
- Import previous exported VM (in my case -> so this holds configuration of your VMs) or create new VM. Do not attach disk or copy disk to TEMP folder when import and remove this one after VM definition is restored / created.
- Rename the last checkpoint “avhd(x)” file to vhd(x). This will have “Name of the VM_GUID.avhd(x)” format. To ease the process order by modified date.
- Attach “the renamed” file to created/imported VM.
- This should start normally without any problems.
- Do this for all requried VMs
- Reconfigure VMs as needed
- Do not forget to export new configured VM somewhere. This will help to stay updated when PC new crushes
Hope this helps,