(gentle music)
- Today, I'll walk you through what you need to know
for running your Azure Virtual Desktop
infrastructure efficiently,
including scaling plans to drive up utilization
and save costs, how to create and manage images,
as well as your options for monitoring
and gaining insights on the service to take action.
This is part four in our series on the service,
which you can find at aka.ms/AVDMechanicsSeries.
Let's start with making the service as efficient
as possible using auto scaling.
Scaling plans are one of the primary ways
to configure Azure Virtual Desktop for cost savings.
This capability is most effective
when using multi-session versions of Windows client
and Windows Server,
with several users simultaneously signed into the same host.
Now using scaling plans, you can scale your session host VMs
in a host pool up or down automatically,
so that you aren't paying for idle resources.
To create and configure scaling plans,
you'll start in the Azure Virtual Desktop Scaling plans page
and hit create scaling plan.
In basics, you'll define the normal Azure parameters
with subscription and resource group, a name, location,
and importantly because these are triggered on schedules,
you'll confirm your time zone for this scaling plan.
Next, in schedules you'll define the timing
for scaling plan actions.
Here you can define multiple schedules.
For example, if you want different scaling rules
in place for weekdays versus weekends.
So I'll add a schedule for weekdays
and as I expand the repeat on control,
you'll see I can select which days of the week.
I'll stick with the default Monday to Friday range.
Then in ramp-up this is where you define
when hosts start up.
For example, if people start to sign in
at 9:00 a.m. local time,
I can keep this value of 8:00 a.m.
to ensure hosts are started and warm
just prior to them signing in.
In the load balancing algorithm,
I can choose from two options.
If I select breadth, it will evenly distribute users
across available session host VMs,
or conversely depth first will assign users to the host
with the highest number of active user sessions
until it reaches the max session limit.
Next, you'll define the minimum percentage of hosts.
So this represents how many at a minimum
will be available or warm at any time.
Then the capacity threshold which determines
when additional hosts will be allocated
once the threshold is reached.
For example, if a host pool supports
100 active user sessions,
and you've set your threshold to 60%,
once the 61st user signs in
another session host will be turned on,
so it can be ready for additional users
to be allocated to it.
In peak hours, you'll define your peak start time,
so I'll keep 9:00 a.m.
And I have the flexibility to change
the load balancing algorithm here as well
during operational run state,
and I'll share a tip on that in the next tab.
Then in ramp-down, you'll reverse your steps from before,
except here, you can also force logoff
to drain your host VMs and shut them down to save costs
as the schedule comes to a close.
And a tip here is to change the load balancing algorithm
from breadth first to depth first.
You may begin the day using breadth first to make sure hosts
are ready to be signed into in the morning
and keep that option during peak usage.
Then move to depth first for ramp-down
and off-peak hours to reduce costs
in low utilization periods.
Here you can also define the delay time
before logging out users,
and the notification message
that's displayed to your users prior to logging them out.
And finally, in Off-peak hours, you'll specify the timing
and load balancing algorithm there as well.
Now, we're also rolling out a new option
that allows personal dedicated hosts to use scaling plans.
These are also configured as part of scaling plan creation
and you'll add schedules in the same way too.
Personal scaling plans allow VMs to start up automatically
on a schedule so the user can sign into a warm
and running host.
Optionally, if a user tries to access a personal host
that is not already up and running,
if you've enabled Start VM on Connect,
the user can still sign in,
but it's going to take a little bit more time
to get to a session,
since it will need to start the VM first.
And importantly, you can automatically shut down
and deallocate VMs on a schedule when not in use,
or based on the parameters you set.
And beyond scaling, you can also take advantage
of the Azure Savings Plan,
as well as reserved VM instances
where committing to long-term use
can bring you further cost reductions.
Now, one more related pro tip here is to apply tagging
as you create resources
and even apply them against running resources using policy,
in order to easily track your related spend
in Microsoft Cost Management.
Now, another primary consideration when operating
your Azure Virtual Desktop infrastructure
is how you keep your VM images current
with required software and configurations,
in addition to Windows updates.
Here the best practice is to have a monthly process
to layer on your customizations
in a repeatable and templated way
using a new fully up-to-date Windows VM image.
In Azure Virtual Desktop, you'll start by using
a custom image template that defines your image.
In basics, you'll add the usual parameters
and your managed identity.
In source image, you can choose a platform image
from the marketplace, a managed image,
or one from the Azure Compute Gallery.
So I'll choose a platform image in my case,
supporting multi-session and including Microsoft 365 apps.
In distribution targets you can manage
where the resulting image will be saved to,
either as a managed image,
or you have the option to specify Azure Compute Gallery,
where you can also determine the location
where images are replicated globally.
So here you'll also define image and output names,
which will help you later as you search for images.
In build properties, you can define the timeout,
VM size, disk, group, and network configs.
Then in customizations,
there are a number of built-in options you can leverage,
including installing language packs,
where there are a dozens to choose from.
And here I'll add Dutch and there we go.
Next, I'll define my FSLogix installation
and configuration for user profile management.
So I'll choose my version.
I'll choose a few more scripts here,
one for RDP Shortpath
and another for Screen Capture Protection.
Then you'll see Microsoft Teams optimizations
with client, as well as WebRTC,
and Visual C++ Redistributable requirements
to improve voice and video in remote sessions.
There are also options for session timeouts,
or configure time limits for disconnected sessions,
idle sessions, active sessions, and time to log off.
And I'll add multimedia redirect configurations
with all of their prerequisites in these dropdowns.
Also, if you want to, you can define application scripts
for Appx packages and Office.
In addition to options for timezone redirection
and installation of any out of band windows updates
not already in the monthly image.
Then beyond what's built-in,
you can optionally include your own
custom PowerShell scripts that can run
on top of the base image with your app installations
and other configurations, like the one I'm choosing here.
It just needs a reachable URI path for your script.
And as usual, you can add tags.
And then you can make sure everything looks good
and create your template.
Once configured, you'll see your template here.
And by selecting the template,
you'll be able to start the image build,
which sends it to the Azure Image Builder for completion.
The Azure Image Builder service then distributes
the resulting image with everything specified in your build
to the locations defined in the template.
So now with best practices in place
for scaling and image management,
let's take a look at how you can get an end-to-end view
of how your services are running
using Azure Virtual Desktop Insights at scale.
We've recently added the capability
to see all of your host pools and subscriptions
in one view.
You can find an entire dashboard
of built-in Azure Monitor Workbooks,
which starts with an overview of your environment
with its total capacity to view all services deployed.
Connection diagnostics to see whether users
can connect easily to resources.
Connection performance, to monitor time
to connect in near real-time.
And utilization, which is key to keeping control
over costs and helping avoid idle resources.
And you can drill into these areas for even more fidelity.
For example, in Connection Diagnostics,
you can quickly see the volume of connections to your hosts.
And by toggling focus on failures,
you get a nice view to help troubleshoot by session hosts,
corresponding users, resources, or apps,
and even RDP client types to help pinpoint issues.
Then in Connection Performance,
you'll see one of the most important proof points
for quality of service, the round trip times,
which are a great measure of network latency for users
as they interact with hosts.
Typically, a good round trip time
is under about 140 milliseconds.
So identifying higher round trip times
and fixing them is key to better user satisfaction
and making remote sessions feel local.
Now, another key metric to focus on
and a big part of keeping costs under control
is utilization.
Here you can see a summary of sessions to host pools
to see how they're being used, time of day usage patterns,
the max number of users per core,
available sessions over time,
your active session host count, along with idle hosts,
and finally, monthly active user information.
Now, if we bring this back to scaling plans,
there are a few specific things you can do
with utilization insights to inform them.
So here you can see the session history chart.
You'll use this view, for example, to identify peaks
in session count and also the times these peaks occur.
And if you spot repeated patterns,
you can use these values as you create minimum
and maximum thresholds in your scaling plans,
and determine when to turn off idle resources.
The blue line represents the total number
of active sessions,
and the red line is a subset of that with idle sessions.
So here you can see that idle sessions
are proportionally high,
so you might want to enforce log offs
using policy to reduce this proportion of idle sessions.
Something else to adjust for if you see it
are sustained peaks in idle session hosts
in the session host count charts.
This means that they're not being utilized
and some can be turned off during these times.
So here you're seeing one on a weekend
when we can ramp-down.
Taking a data-driven approach to scaling
will ultimately optimize your costs
and help achieve the most efficient resource utilization
with Azure Virtual Desktop.
So these are just a few best practice recommendations
for operating and keeping your Azure Virtual Desktop
optimized, up-to-date, and well utilized.
And again, this is the fourth in our series on mechanics
for Azure Virtual Desktop.
So check out the complete playlist where we cover setup
and your configuration options
at aka.ms/AVDMechanicsSeries.
Be sure to subscribe to our channel for future updates.
And thanks for watching.
(gentle music)