Forum Discussion

Michael Fulton's avatar
Michael Fulton
Brass Contributor
Oct 13, 2021

VM Unavailable with Active Session

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?

  • 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.
  • jasonhand's avatar
    jasonhand
    Brass Contributor
    I've seen that too. Until the VM reconnects whoever was connected at the time of shutdown will show as still connected.
  • NKC25's avatar
    NKC25
    Brass Contributor

    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.

     

     

Resources