none
Native Boot from Differencing VHDX gets corrupted on power failure

    Question

  • I have a Native VHDX boot setup with a dynamic vhdx image of max size 100GB as a parent and a child differencing vhdx as my boot image. I'm using WDS to deploy these images and after deployment it boots up and everything works fine. Problems start when I do a hard reboot (I'm using this in a mfg test environment so hard reboots are unavoidable) when the system is still on. After powering on the system, it gets stuck at the windows logo splash screen. Sometimes it just sits there for a while and eventually finishes booting, but others it just never boots. I've noticed that I can ping the system while it's at the logo splash screen, but it still never completes booting. 

    I found another thread where someone suggests running a trace with xbootmgr, this is not possible in my case though because the only way to trigger the failure is a hard power cycle. Xbootmgr reboots immediately. I believe xbootmgr also requires the boot to complete before it finishes writing the trace to disk. 

    So it is my understanding that the VHDX format was supposed to be resilient against power failure corruption. There have been reports of similar behavior on hyper-v, but this is native boot and there is no hyper-v involved. I've tried replacing my child VHDX differencing disk with a blank new image and it boots fine. So it's definitely something in the vhdx image that is the problem (nothing to do with the BCD or bootmgr).

    Can anyone provide me with some info or suggestions for debugging this? 

    Thursday, November 21, 2013 12:00 AM

All replies

  • Tuesday, November 26, 2013 10:36 AM
    Moderator
  • I've already verified I'm using the right chipset and storage driver for Ivybridge. I have noticed some weird behavior that I think might be the cause of this issue. When I do a hard power cycle or there is a power loss, the VHDX does not get unmounted. As a result, the file size is still the max VHDX partition size. When the system reboots the next time, it checks to see if there is enough remaining space on the disk to mount the image. My drive is 180GB but my image was 100GB max size. Since the image is mounted, there is less than 60GB of remaining space. So the system thinks that there is not enough space to mount a 100GB image. 

    To test this theory, I resized my image down to 75GB, causing there to be enough space on the disk to have the image mounted twice. Since doing this, I have not had any issues booting. It should be noted, this is NOT correct behavior by windows and I'd consider it a bug. The OS should be smart enough to see that the image was not cleanly unmounted before doing its check for free space. This behavior limits the VHDX image to 50% of the total free space on the drive.
    Friday, December 06, 2013 5:15 PM