Forum Discussion
Get-AzWvdSessionHost returns Status of "Shutdown" instead of "Unavailable" when VM's are powered off
- Nov 15, 2020
garymansell I modified the script to include the status of "Unavailable" and "Shutdown" to include VM's in the start function. Testing shows it's now starting VM's in either state.
Hi Hussayn thanks for confirmation that others are seeing this.
I am using the (popular & useful) Travis Roberts scaling script (https://www.ciraltos.com/auto-start-and-stop-session-hosts-in-windows-virtual-desktop-spring-update-arm-edition-with-an-azure-function/) which checks for hosts in the "Unavailable" state to start, so the new hosts being in "Shutdown" state breaks the script.
I could probably modify the script, but I wanted to understand what this (new?) "Shutdown" state was all about first as my old hosts are all still showing state "Unavailable" even when running the same latest agent version as the newly added VM's.
I would very much appreciate some light shedding from @Christiaan_Brinkhoff or @Dean Cefola if they knew what this was about?
garymansell I modified the script to include the status of "Unavailable" and "Shutdown" to include VM's in the start function. Testing shows it's now starting VM's in either state.
- VenkataKrishnamurtiMar 11, 2021Copper Contributor
TravisRoberts Thanks for posting the script and its helpful, however I am getting the below error
: Host pool not set to Depth-First load balancing. This script requires Depth-First load balancing to execute
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptionI have set the host pool to depth first and using Get-AzWvdHostPool I can see the loadbalance type is set to Depth First
- Mar 11, 2021
VenkataKrishnamurti Can you verify you are using the WVDARM_ScaleHostPoolVMs.ps1 script with the newer, Spring update of WVD? Based on that error, you may be using the older version for the WVD Clasic.
Thanks
- garymansellNov 16, 2020Brass Contributor
TravisRobertsThis is excellent news - thanks for your speedy resolution. I made the same change myself last week and confirm that it works.
If anyone from the WVD Product Team is on here, though, it would be nice to understand why the change in Status for powered off machines? Is this a permanent change, will we no longer see VM's as "Unavailable"? If both states are still possible - what exactly do they mean>
Might be nice to add some descriptions to the online doc's too...