Using Azure Virtual Desktop with Spot Instances

CBC 0 Reputation points
2024-04-10T17:23:40.0466667+00:00

Hello,

I am a business owner looking to configure Azure Virtual Desktop (AVD) to access CRM while outside the office. I want to use session hosts on Spot instances since they are cost-effective. However, when configuring it via the AVD portal, the computer doesn't give me any checkbox for Spot instances.

I also tried moving a prebuilt Spot VM, but the system did not allow me to move it, even through PowerShell. Can anyone provide guidance on how I can configure AVD to use Spot instances?

Thank you!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,834 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 20,772 Reputation points Microsoft Employee Moderator
    2024-04-10T19:50:25.47+00:00

    @CBC Spot instances are a bit risky for AVD as you can't make any predictions on their availability. The user might get disconnected and lose any unsaved work.

    Using automatic scaling you can achieve similar cost savings with a better user experience since you can warn the user about his session being disconnected when a scale-down event is happening. I checked with the product team, and they also recommended using our autoscale service to manage costs for AVD. You could also look at various VM types to meet your cost and performance needs.

    In my opinion, VDI is not a valid workload for Azure Spot VMs.  Azure SPOT VM docs say Deploy workloads that can handle interruptions and don't need to be completed within a specific period of time. Run workloads for development, testing, quality assurance, advanced analytics, big data, machine learning and AI, batch jobs, rendering and transcoding of videos, graphics, and images at a very low cost.


    Hope that helps.

    If you have questions, please let me know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    Please don’t forget to "Accept Answer" and hit Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members for remediation for similar issues.

    User's image


  2. TP 124.7K Reputation points Volunteer Moderator
    2024-04-10T20:16:46.27+00:00

    Hi,

    If you want to use Spot VM you can first create it separately and join it to domain/Entra ID. Next you can Generate registration key and register the VM to the host pool. Please see links below for details:

    Generate a registration key

    https://learn.microsoft.com/en-us/azure/virtual-desktop/add-session-hosts-host-pool?tabs=portal%2Cgui#generate-a-registration-key

    Register session hosts to a host pool

    https://learn.microsoft.com/en-us/azure/virtual-desktop/add-session-hosts-host-pool?tabs=portal%2Cgui#register-session-hosts-to-a-host-pool

    You should read above document in its entirety for other key points.

    NOTE: Spot VMs can be evicted at any time, which may result in the user(s) losing data. Recommend you choose VM size with low eviction percentage (0-5%) and keep in mind this percentage will vary over time/days.

    If something is unclear or you need assistance with a specific step, add a comment below.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.