Sometimes we can mount a VHDX that had its checkpoints saved on another location. When trying to boot the VM we will have a “Property ‘MaxInternalSize’ does not exist in class ‘Msvm_VirtualHardDiskSettingData’.”
This is because the disk properties have changed and the VM is linking the checkpoint back to its parent, making the chain corrupted.
To remediate this, we will use the Set-VHD powershell snippet
Set-VHD "D:\path\Disk_CHECK2.avhdx" -ParentPath "D:\path\Disk_CHECK1.avhdx" Set-VHD "D:\path\Disk_CHECK1.avhdx" -ParentPath "D:\path\Disk.vhdx"
Here we are stitching the newest checkpoint (Disk_CHECK2) to (Disk_CHECK1); then Disk_CHECK1 to the main Disk.VHDX.
Now, its very likely that you will receive a mismatch error:
“There exists ID mismatch between the differencing virtual hard disk and the parent disk. “
For this we will use the –
Set-VHD "D:\path\Disk_CHECK1.avhdx" -ParentPath "D:\path\Disk.vhdx" –ignoreidmismatch
And now you will have a booting VM again!
Just wanted to let you know, you post 100% saved me from a ton of work needed to rebuild a production VM with a corrupted virtual hard disk (my fault). Thank you so much for taking the time to post this with such clean and concise detail.
Cheers!
Thanks bro, your tutorial saved one issue with corporate business database for one of our client.
Thank you!
Thank you for this manual! You saved me lot of time
Thank you so much for this. You saved me hours of frustration and a lot of stress.
Hi Sebastián
Great post, thank you very much, you just saved my life !!
Thank you!!! Saved me a ton of work!!!
“It just works”. Thank you so much kind sir, you are a gentleman and a scholar.
Thank You !
“It just works”. Thank you so much bro, you are a hero
Thanks! I just stumbled across this error and your posts helped me fix it.
Cheers, Pierre
You are the MAN!!!
How do you know which one is the latest AVHDX and what it’s linked to?
I restored an entire folder so they all have the same date.
You can use the inspect disk feature on Hyper-V to see who’s the parent:
https://social.technet.microsoft.com/Forums/en-US/b65b8e87-7534-41dc-8e88-49cb31408aa0/hyperv-broken-parent-chain
You just saved my day! I was looking at two days work down the drain since I had mounted a drive with checkpoints…
NO idea how it got messed in in the first place but this saved the day!
Thanks!
Worked great, power outage killed it, this fixed it in seconds, thanks.
Great Job, your post save my night…Thank You
thank you … it worked for me too.. My VM’s had k8s test setup and all worker nodes disks were corrupted ..
Thanks bro
very detailed instructions, thank you very much, I read many articles, but none was as detailed as yours, I spent the whole day, I coped with your article in 15 minutes. I have a big chain snapshot
Thanks a lot
Helped me keep my job!
Thought my VM was toast, this got me back up in no time. Thanks!
Thnx a million… your knowledge allowed me to sleep tonight 🙂
Thank you!
I have similar error when importing old virtual WinXP .VHD file. But there I do not have any parent VHD file. So what to do there?
Are all disks inside the same folder?
Wow!
You saved me bro. Thank you so so much.
Trillian Thanks buddy
Thank you for the article. It saved me from rebuilding a VM from scratch 🙂
you’re my Hero. you save me, thanks a lot
I had no hope after a crash from my server, after nights you give me the solution.
Thanks for these instructions, it helped us advanced some, but now some of our VHDX files are telling us “Failed to set new parent for the virtual disk.
At line:1 char1.”
And so far we haven’t been able to locate any solution for when ignoreidmismatch FAILS to make a parent.
Straight to the fix and worked perfectly. Thank you!!
Thanks man