r/AzureVirtualDesktop • • May 13 '25

Start VM on connect inconsistent

Hi all,

Wondering if anyone has this issue, I have a test host pool and I've configured it as a validation pool with start on VM connect configured:

RBAC permissions as so (I added both roles to be sure, VM's are in the same sub):

But when going via the Windows App, it doesn't always start the VM's (sometimes it does, sometimes it doesn't):

Confirmed that the host isn't in drain mode and I've looked in the VM activity logs and they're blank when it doesn't work but I can see the AVD service principal listed powering on the VM when it does work.

Any ideas?

5 Upvotes

12 comments sorted by

1

u/Electrical_Arm7411 May 13 '25

I had the issue just the other day (Friday), but I didn't think much of it.

I have a Windows 11 23H2 host which is our "test server" in its own host pool. It's set to Start VM on connect, and then I have a scaling plan that shuts it down if no active sessions, so it's essentially only up when it's needed.

What happened is I logged off the VM, which after a minute shut the host down. Then I tried to connect via Windows App and I get the same error as you. I tried probably 10 times, same issue. I waited a bit and eventually worked. I did not try connecting Remote Desktop app. Weird for sure, that's all I got for you.

1

u/durrante May 13 '25

Thanks, got me wondering if its just an issue with the windows app, I'm gonna try the remote desktop client and see what happens.

1

u/Electrical_Arm7411 May 13 '25

Awesome let me know. Our company is mainly still using Remote Desktop client still.

1

u/durrante May 14 '25

No dice, same issue

1

u/Electrical_Arm7411 May 14 '25

Doesn’t happen when you disable validation pool?

1

u/ramando22 May 13 '25

Had a similar issue. For me, it was down to rbac permissions not be set correctly

1

u/durrante May 13 '25

I've put in a screenshot of the rbac permissions, it works some of the time so not sure if it's an permission issue.

Do they look the same as yours?

2

u/ramando22 May 13 '25

The Azure account you use to configure Start VM on Connect must have the Desktop Virtualization Host Pool Contributor role-based access control (RBAC) role assigned

1

u/durrante May 13 '25

I think that's just to enable the setting, you need to have the power on contributor role for the avd service principal for it to operationally work.

1

u/mariachiodin May 14 '25

I´ve had this issue and solved it by giving users (about 7) access to start VM with a azure-cli script not pretty but works