AVD Hibernate Device Guard configuration has disabled hibernation.

Device Guard and Credential Guard require virtualization-based security (VBS) and are only supported with hibernation when Trusted Launch is enabled on the virtual machine and Nested Virtualization is enabled in the guest OS. Hibernation is supported with Nested Virtualization only when Trusted Launch is enabled on the virtual machine.

  “innererror”: {
    “internalErrorCode”: “HibernateOperationNotAllowedOnVMWithFailedHibernateExtension”
  “code”: “OperationNotAllowed”,
  “message”: “The Hibernate-Deallocate Operation cannot be performed on a VM that has extension ‘AzureHibernateExtension’ in failed state. For more information, see https://aka.ms/hibernate-resume/errors. Error details from the extension : Enabling hibernate failed. Response from the powercfg command. Exit Code: 1. Error message:\nHibernation failed with the following error: The request is not supported.\r\r\n\r\nThe following items are preventing hibernation on this system.\r\n\tThe current Device Guard configuration has disabled hibernation.\r\n\tAn internal system component has disabled hibernation.\r\n\t\tHypervisor”

To fix you can either install the Hyper-V manually by going to Control Panel, Programs and Features and the click on Turn Windows Features on or off. Then select Hyper-V Platform.

Another option is to turn on the feature remotely by running a script.

# Define the VM name
$vmname = "AVD-3928"

# Construct the fully qualified domain name (FQDN) of the VM
$fqdn = "$vmname.Domain.com" # Replace 'domain.com' with your actual domain

# Get credentials or leave commented out to use current user
#$creds = Get-Credential

# Script block to enable Hyper-V
$scriptToRun = {
# Install the Hyper-V feature
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart
#Remove Tools or Comment Out to leave tools installed.
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Tools-All -NoRestart
#Additionally, make sure Power is Running and set to Automatic.
Set-Service -Name POWER -StartupType Automatic
Start-Service -Name POWER

# Execute the script on the target VM using PowerShell Remoting
$session = New-PSSession -ComputerName $fqdn
Invoke-Command -Session $session -ScriptBlock $scriptToRun -ArgumentList $fqdn
Remove-PSSession -Session $session
Share or Save this: