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.