question

HimanshuNankani-3787 avatar image
0 Votes"
HimanshuNankani-3787 asked vipullag-MSFT edited

How to create session hosts using Rest API in AVD (Azure Virtual Desktop)?

The Desktop Virtualisation Rest API does not create session hosts. Also Session Host related API is missing the create API. Why is that? And how does one create SH from API without going to portal?

Ref. https://docs.microsoft.com/en-us/rest/api/desktopvirtualization/

azure-virtual-desktop
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

vipullag-MSFT avatar image
0 Votes"
vipullag-MSFT answered vipullag-MSFT edited

@HimanshuNankani-3787

Welcome to Microsoft Q&A Platform, thanks for posting your query here.

Yes, you are correct, there is currently no AVD REST API for creating session hosts. You can create AVD session hosts either using the portal, the GitHub ARM templates, or by using some external script/automation to create Compute VMs and join them to host pools.

Session Hosts creations are VM's that have a DSC extension that sets up the agents. For that extension to be able to add hosts to the hostpool you need to be able to pass a valid hostpool token to the extension. Session Hosts is just hostpool metadata information linking to real virtual machines. The agent does the job of 'linking' the VM to the hostpool.

You can also check this AVD dedicated forum here for AVD related discussions here.

Please feel free to drop a feedback on this feature request of getting direct API here, Product team will check and prioritize this.


Hope that helps.
Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.