Unable to create a VM with hibernation enabled
If you encounter difficulties creating a VM with hibernation enabled, verify the Error Code and the Message.
The most common Errors are listed below
Result Code | Error Message | Action |
OperationNotAllowed
| OS disk should support hibernation for a VM with hibernation capability. | Please ensure that the OS disk has hibernation support enabled. |
Platform image should support hibernation for a VM with hibernation capability. | Please use a platform image that supports hibernation. | |
The shared gallery image should support hibernation for a VM with hibernation capability. | Please validate that the Shared Gallery Image Definition has hibernation support enabled. | |
Hibernation capability is not supported for Spot VMs. |
| |
User VM Image is not supported for a VM with Hibernation capability. | Please use a platform image or Shared Gallery Image if you want to use the hibernation feature. | |
Enabling/disabling hibernation on an existing VM requires the VM to be stopped (deallocated) first. | Stop-deallocate the VM, patch with VM to enable hibernation, and then start the VM | |
Hibernation cannot be enabled on a Virtual Machine since the OS Disk Size ({0} bytes) should at least be greater than the VM memory ({1} bytes). | Please ensure the OS disk has enough space to be able to persist the RAM contents once the VM is hibernated. | |
|
| |
|
|
Unable to Hibernate a VM
If you are unable to hibernate a VM, start by verifying whether hibernation is enabled on the VM. Additionally, check the status of the Hibernation extension to determine if it successfully configured the guest OS for hibernation.
If the extension is in a failed state, you will not be able to hibernate the VM. Check for the Status Message to identify the possible cause.
Common issues that can cause the extension to fail
Issue | Action |
The page file is in a temp disk. Please move it to the OS disk to enable hibernation. | Move the page file to the C: drive and trigger reapply on the VM to rerun the extension. |
Windows failed to configure hibernation due to insufficient space for the hiberfile | Ensure that C: drive has sufficient space. You can try expanding your OS disk, and your C: partition size to overcome this issue. Once you have sufficient space, trigger the Reapply operation so that the extension can retry enabling hibernation in the guest and succeeds. |
Extension error message: “A device attached to the system is not functioning” | Ensure that C: drive has sufficient space. You can try expanding your OS disk, and your C: partition size to overcome this issue. Once you have sufficient space, trigger the Reapply operation so that the extension can retry enabling hibernation in the guest and succeeds. |
Hibernation is no longer supported after Virtualization Based Security (VBS) was enabled inside the guest. | Enable Virtualization at the OS level to get VBS capabilities along with the ability to hibernate the guest. To enable virtualization in the guest, refer to this document: https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v#enable-hyper-v-using-powershell |
Enabling hibernate failed. Response from the powercfg command. Exit Code: 1. Error message: Hibernation failed with the following error: The request is not supported. The following items are preventing hibernation on this system. The current Device Guard configuration has disabled hibernation. An internal system component has disabled hibernation. Hypervisor | Enable Virtualization in the guest to get VBS capabilities along with the ability to hibernate the guest. To enable virtualization in the guest, refer to this document: https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v#enable-hyper-v-using-powershell |
Hibernate Issues in Azure Windows 11 (23H2 Version)
Issue: The Windows 11 23H2 virtual machine utilizing the A10 SKU is experiencing failures when attempting to Hibernate with the error “The current Device Guard configuration has disabled hibernation. An internal system component has disabled hibernation”, accompanied by the error indicating that the AzureHibernateExtension is in a failed provisioning state.
Errors:
VM Hibernation failed with an error on Azure:
AzureHibernateExtension status:
The Workspot Watch monitoring tool helps identify VMs that fail to pause. It raises alerts for VMs encountering issues during hibernation or pausing and displays them on the Alarms page.
Resolution: Microsoft suggests enabling Virtualization (Hyper-V) within the guest operating system as a potential solution for this error. For further details, please refer to the following link: https://learn.microsoft.com/en-us/azure/virtual-machines/windows/hibernate-resume-troubleshooting-windows However, this solution has not resolved the issue in Windows 11 23H2 version. As an alternative resolution, Microsoft recommends upgrading Windows 11 from version 23H2 to 24H2. This solution has been tested and successfully resolves the VM hibernation issue caused by the Extension failure status. Note: Microsoft is still working on fixing the Hibernate failure within version 23H2 and we have no ETA.
Steps to upgrade Windows 11 version 23H2 to version 24H2:
VM Backup:
Access the Azure console and create a snapshot of the VM’s disk. (This backup allows us to restore the previous state in the event that the VM fails to boot following the upgrade.) https://learn.microsoft.com/en-us/azure/virtual-machines/snapshot-copy-managed-disk?tabs=portal
Pre-checks and Installation process.
Log into the VM and verify the VM name and the current Windows version.
On the VM, Download the Windows 11 Installation Assistant from the following link:
https://www.microsoft.com/en-us/software-download/windows11?msockid=091b3b5fc475689b092a2e19c5b269d4
Execute the Windows 11 Installation Assistant.
As a preliminary check, it will prompt you to run the PC Health Check; click on the provided link to download it.
Step 6: Proceed to install the Windows PC Health Check setup that has been downloaded.
Conduct the pre-checks within the Windows PC Health Check application.
Return to the Windows 11 Installation Assistant and select the Refresh option.
Click on "Accept and Install" to start the installation process.
You will observe automated steps that include Downloading, Verifying, and Installing.
Upon completion, the Windows 11 Installation Assistant will automatically schedule a restart in 30 minutes to finalize the upgrade. Alternatively, you may choose ‘Restart Now’ to immediately restart the VM.
Note: In this phase, if the process page disappears, the process will continue to run in the background. Allow it to run and monitor whether the VM restarts automatically. If it does not, please restart the VM after waiting approximately one hour.)
After the VM is ready, reconnect to it and confirm that the Windows version displayed is Windows 24H2. If the Windows version of the VM continues to display as 23H2, re-run the steps again from Step 4.
Uninstall the Windows 11 Installation Assistant & Windows PC Health checkup apps from the VM which were installed previously, as it is no longer required.
Validating the VM Pause operation: Go to Control >Resources> Desktop pool and from the Action tab of the VM initiate Pause.
Ensure that the VM has been successfully paused. When checking the VM status in Azure, it should be displayed as Hibernated (deallocated).
Snapshot Cleanup. Once the user validates the VM access and confirms that there is no data loss we can proceed to delete the snapshot that is taken at Step 1.