VM Unavailable with Active Session

%3CLINGO-SUB%20id%3D%22lingo-sub-2841782%22%20slang%3D%22en-US%22%3EVM%20Unavailable%20with%20Active%20Session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2841782%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20Host%20Pool%20with%204%20VMs%2C%20all%20set%20to%20auto%20shutdown%20at%2010%20PM.%26nbsp%3B%20The%20Host%20Pool%20is%20configured%20to%20allow%20start%20on%20Connect.%26nbsp%3B%20I%20am%20also%20using%20FSLogix.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EToday%20I%20noticed%20that%203%20of%20the%204%20VMs%20were%20unavailable.%26nbsp%3B%20Normal%20since%20it%20is%20only%208%20am.%26nbsp%3B%20The%20odd%20thing%20is%20one%20of%20the%20unavailable%20VM's%20show%201%20active%20session.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20verified%20the%20VM%20is%20shutdown.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20is%20that%20possible%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2841799%22%20slang%3D%22en-US%22%3ERe%3A%20VM%20Unavailable%20with%20Active%20Session%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2841799%22%20slang%3D%22en-US%22%3EI%20manually%20turned%20on%20the%20VM%20and%20the%20active%20session%20disappeared.%3CBR%20%2F%3E%3CBR%20%2F%3EStrange.%20I%20am%20guessing%20this%20person%20was%20still%20logged%20in%20to%20that%20VM%20when%20it%20shutdown%20last%20night.%3C%2FLINGO-BODY%3E
Occasional Contributor

I have a Host Pool with 4 VMs, all set to auto shutdown at 10 PM.  The Host Pool is configured to allow start on Connect.  I am also using FSLogix.

 

Today I noticed that 3 of the 4 VMs were unavailable.  Normal since it is only 8 am.  The odd thing is one of the unavailable VM's show 1 active session.

 

I verified the VM is shutdown.  

 

How is that possible?

3 Replies
I manually turned on the VM and the active session disappeared.

Strange. I am guessing this person was still logged in to that VM when it shutdown last night.
I've seen that too. Until the VM reconnects whoever was connected at the time of shutdown will show as still connected.

@Michael Fulton - Hi,

 

I think it's called "Stale session" the AVD database stores this session as "Active" however, the machine will be in shutdown state.

 

Solution- to update the permissions of "StartVMonConnect" role.

  • Microsoft.Compute/virtualMachines/start/action
  • Microsoft.Compute/virtualMachines/read
  • Microsoft.Compute/virtualMachines/instanceView/read

https://docs.microsoft.com/en-us/azure/virtual-desktop/start-virtual-machine-connect 

This should fix the issue.