Loss of consistency with IDE-attached virtual hard disks when a Hyper-V host server experiences an unplanned restart

Symptoms

If a Windows Server 2012 or Windows Server 2008 R2-based Hyper-V host experiences an unplanned restart, and if volumes on virtual hard disks connected to a virtual IDE controller are being used by virtual machines, the virtual hard disks on that server may no longer be consistent.

For example, assume that you have a virtualized domain controller on a Hyper-V host server. When the Hyper-V host server crashes or encounters a power outage, the Active Directory database may become corrupted, or the virtual machine fails to start, and you may receive an error message that resembles the following:
c00002e2 Directory Services could not start because of the following error: %hs Error Status: 0x%x. Please shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information.

Cause

This issue occurs because the Hyper-V virtual IDE controller erroneously reports success if an operating system on the guest requests to disable the disk cache. This might result in an application issuing I/O operations that it believes are persisted to disk that are actually being allowed to reside in the disk cache, which would not be persisted across power failures of the Hyper-V host.

Go to the More information section for more background information.

Resolution

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix Download Available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website: Note The "Hotfix Download Available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must be running Windows Server 2012.

Registry information

To apply this hotfix, you do not have to make any changes to the registry.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.
File information
Note After you install this update, requests to disable the disk cache in the Hyper-V virtual IDE controller will fail. This is the expected behavior. You may receive a warning message generated by Active Directory in the guest machine operating system. This event 1539 warning message states that "Active Directory Domain Services could not disable the software-based disk write cache on the following hard disk," followed by the drive letter of the hard disk. This warning message is generated when the Hyper-V virtual IDE controller correctly refuses the request to disable the disk cache. However, Active Directory requests all database updates be completed without caching, which the Hyper-V storage subsystem ensures in order to prevent data loss from a power failure or other unexpected reboot.

Update information

Windows Server 2012

Install update rollup 2855336 on the Windows Server 2012-based Hyper-V host.

Windows Server 2008 R2

Install update 2853952 on the Windows Server 2008 R2-based Hyper-V host. Also, install update 2853952 on the guest if the guest is running Windows Server 2008 R2 or Windows 7.

This update is available from Windows Update and the Microsoft Download Center.
Operating systemUpdate
All supported x86-based versions of Windows7Download Download the update package now.
All supported x64-based versions of Windows7Download Download the update package now.
All supported x64-based versions of Windows Server 2008 R2Download Download the update package now.
All supported IA64-based versions of Windows Server 2008 R2Download Download the update package now.
For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

Restart requirement

A restart is required for the update to resolve this issue.

File information

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More Information

There are various caching layers in the virtualization stack that affect consistency semantics of applications running on the virtual machines. For more information about this, refer to KB 2801713 .

Virtual hard disks report to a guest operating system that write-caching is enabled, and disks reject requests to disable write-caching that are made by the guest operating system. This behavior is necessary for the following reasons:
  • The underlying storage might have an always-on write cache that cannot be disabled. This is because the virtual disk might be migrated to a different disk on the same host (live storage migration), or to a different host (live migration).
  • Hyper-V cannot assume that all virtual machines that are running on the same disk will have the same disk cache settings.
Applications that require data integrity semantics across a power failure must ensure that writes are committed to non-volatile storage. One method to accomplish this is to disable the disk cache so that that all writes are committed to the hard disk before reporting success. If the request to disable the disk cache is refused, the application must take additional steps to ensure consistency.

Before the update is installed, when Active Directory would try to disable the disk cache, Hyper-V would incorrectly report that this operation was successful. Then, Active Directory would perform file operations under the assumption that no caching was occurring, even though caching was occurring.

After you install this update, Active Directory will try to disable the disk cache, and Hyper-V will correctly report that this is not possible. Then, Active Directory will enable FUA (Force Unit Access) to make sure the data is not cached.

When Active Directory tries to disable the disk cache, event ID 1539 is logged.

References

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
Egenskaper

Artikkel-ID: 2853952 – Forrige gjennomgang: 24. jul. 2014 – Revisjon: 1

Tilbakemelding