Hyper-V 2012 - avhdx is corrupt or unreadable

Last night we had a power outage that lasted long enough that the UPS failed and the server lost power.

The server was running Windows Server 2012 R2 with the Hyper-V role.

The power outage happened in the middle of the night, and at that time the server was in the middle of doing backups (using Macrium Reflect). So there were a number of VMs that had "avhdx" files associated which I'm assuming were related to the macrium reflect backups (because I don't have any checkpoints in Hyper-V that would explain the avhdx files). I'm assuming that the avhdx files were the snapshots that Macrium created to do the backup.

Well, when I turned the server back on and tried to start the VMs, I got errors saying the avhdx file was "corrupted or unreadable". I was unable to recover from this.  

When I tried to restore from backup, Hyper-V management console would say "Error  applying hard drive changes - cannot change disk since a disk merging is pending".

In the end, I deleted the avhdx files, removed the disk from the VM, and then re-added the original VHD files to the VM. I was able to boot after that.

The question:   is there anything I can do to make the server more resilient to power failure? I'll try to avoid outages as much as possible but I can't have the whole server go down for half a day while I fiddle with all of the VMs just because of an unexpected loss of power.
LVL 31
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Either purchase more runtime for your UPS, or instruct the UPS to shutdown the VMs, and Shutdown the Host, and make sure you have enough runtime on the UPS to allow this.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.