A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
Hello azadm Ravi Shankar,
I would like to share a quick fix for scenarios where the Host Pool session hosts appear in a "Shutdown" state, even though the Azure VMs are running and administrators are able to access them successfully via RDP or remote access tools.
Recommended remediation steps:
- Uninstall the Azure Virtual Desktop Agent, Boot Loader, and AVD Stack components from the affected VM.
- Remove the session host from the Host Pool.
- Generate a new registration key for the session host.
- Reinstall the latest Azure Virtual Desktop Agent and Boot Loader components, then re-register the VM with the Host Pool.
This process typically helps resolve stale registration or agent communication issues between the session host and the Azure Virtual Desktop service. Please refer to this link- https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-desktop/troubleshoot-agent#step-1-uninstall-all-agent-boot-loader-and-stack-component-programs
Once vm is back to healthy state, ensure enable the role for the user with the Virtual Machine User Login.
To troubleshoot AVD VM that are in a Running state but report a Shutdown health status, begin by restarting the VM from the Azure portal to resolve any potential state inconsistencies. Additionally, verify the Azure VM Agent status to ensure it is running and up to date. If issues persist, consider resetting or upgrading the agent following the recommended steps provided in the Azure documentation.
Please follow the below given steps-
- Navigate to the VM\Extensions + applications
- Note the Version, for Win11ms, I would expect 2.2.0.0.
- Click the Uninstall button.
- Reboot the VM
- Once the VM is back online after reboot, open Cloud Shell
- Run the following in Cloud Shell substituting in your Resource Group name, VM name, and Location.
Azure PowerShell
PowerShell
Set-AzVMExtension -ResourceGroupName "<RESOURCE GROUP NAME>" -VMName "<VM NAME>" -Name "AADLoginForWindows" -Location "<LOCATION>" -Publisher "Microsoft.Azure.ActiveDirectory" -Type "AADLoginForWindows" -TypeHandlerVersion "2.2"
In the Azure portal, go to AVD VM > Select Access Control (IAM) > Select Role Assignments > Confirm that the user account has been granted either the Virtual Machine User Login or Virtual Machine Administrator Login role.
Ensure that the RDP property targetisaadjoined:i:1 was added to the AVD host pool. To do this, navigate to the Azure portal > Select the host pool configured for Azure AD Join > Select the RDP Properties blade > Select the Advanced Tab > Add targetisaadjoined:i:1.
Disable security defaults by navigating to Entra ID > Manage > Properties > Manage Security Defaults > Disable.
Add Conditional Access policies to exclude the VM from MFA by adding the user.
Enable Conditional Access policies and exclude the users and groups as needed.,