Microsoft has released “Start VM on Connect” feature for personal desktops. What does this mean to users and administrators?. The Personal desktop will automatically start once user initiates a connection to the VM which means you don’t want to configure power management to adjust the user’s login time.
This feature is currently available only on Webclient and Windows Remote desktop Client
Let us see how we can configure this feature in personal host pool.
The process involves two steps:-
- Enable the feature on your Personal desktop hostpool
- Create a custom role which can Read and start the VM and assign it to the WVD SPN.
Enable the feature on Hostpool
Open Cloud shell, and execute the below command to enable startvmonconnect feature on your PD host pool.
|Update-azwvdhostpool -resourcegroupname <RGname> -hostpoolname <hostpool> -startvmonconnect:$true|
Create a Custom Role
The second thing we need to do is to create a custom role with permissions to start the Virtual machine.
Go to subscriptions–>IAM. Click on “+Add” and from the drop down, select “Add custom Role”
Provide name for your role and Click Next
Select the permissions shown in the screenshot and Click Next
By default the scope is on whole subscription, please modify it if you want to target this role for specific Resource groups. Click on review and Create.
The JSON file is uploaded in the Repo and can be downloaded from here.
Add Role Assignment
Go to subscriptions–>IAM. Click on “+Add” and from the drop down, select “Add role assignment”
Select the role you created in the previous step from the drop down, and type “Windows virtual desktop” to get the SPN for WVD . Select the WVD SPN and click on Add role.
Test the functionality
You are all set to test the “VMStartOnConnect” feature. Access the personal desktop from Remote Desktop Client and you can see the dialogue that “Starting Remote PC” if your PD WVD is in shutdown state.
Please let me know if you have any questions or queries.