There are two types of costs associated with a VM: compute costs and storage costs. Compute costs are incurred only when the VM is in use, while storage costs are incurred even when the VM is stopped.
The Running OS disk and Stopped OS disk type settings (along with other auto-scale settings) provide up to 75% storage cost savings. The auto-scale logic can automatically change the OS disk type of VMs in both pooled and personal host pools to a cheaper storage tier (for example, from Premium SSD to Standard HDD) while the host VM is powered off, and back to the higher performance tier immediately before it is started.
Important
Azure limits how often a managed disk can change type (see Azure disk type change restrictions below). In host pools where session hosts start and stop several times a day, review the best practices in this article before you enable storage optimization.
To configure Running OS disk and Stopped OS disk type settings on your session hosts:
-
Locate the host pool you wish to work with.
-
From the action menu, select Auto-scale > Configure.
-
In the Auto-scale area, configure the following:
-
Running OS Disk (Template): From the drop-down list, select the running disk type.
-
Stopped OS Disk Type: From the drop-down list, select the stopped disk type.
-
-
Once you have changed the parameters above, select Save & close.
Note
With Azure's Start VM on Connect feature, VMs can be powered on outside of Nerdio Manager and may override the Running OS disk and Stopped OS disk type settings. That is, a VM powered on by Start VM on Connect cannot change the disk performance. Instead, we recommend configuring Pre-stage to enable Set all hosts to running OS disk type if Start VM on Connect is enabled with storage scaling.
For a single-user host pool that has schedule-based auto-scaling, you can configure the Host OS disks in and out of working hours. For example, you can specify Premium SSD when the VM is running and Standard SSD when the VM is stopped, thus saving on Azure storage costs.
To configure Host OS disks:
-
Navigate to Cloud Desktops > Azure Virtual Desktop > Workspaces > Host Pools.
-
Locate the single-user host pool you wish to change.
-
From the action menu, select Auto-scale > Configure.
-
In the Host OS Disks area, configure the following:
-
Running: From the drop-down list, select the disk type when the VM is running.
-
Stopped: From the drop-down list, select the disk type when the VM is stopped.
-
-
Once you have changed the parameters above, select Save & close.
For a multi-user host pool that has its Minimum Active Host Capacity set to 0, you can configure the system so that all stopped VM OS disks are automatically converted to the Running OS disk type during the pre-staging hours. This is necessary to ensure that if a VM is started via Azure Start VM on Connect, it has the proper high-performance disk type.
When pre-staging OS disk type is enabled, auto-scale converts the disks of stopped hosts in the background and skips any disk that has already changed type twice in the last 24 hours. This is the only path in Nerdio Manager that checks a disk's change history before converting it.
To configure the pre-staging OS disk type conversion:
-
Locate the multi-user host pool you wish to work with.
-
From the action menu, select Auto-scale > Configure.
-
In the Pre-stage Hosts area, configure the following:
-
If necessary, enable Pre-stage hosts.
-
Set all hosts to running OS disk type: Select this option.
-
Set the pre-stage time as desired.
-
-
Once you have entered all the desired information, select Save & close.
Azure allows the type of a managed disk to be changed only twice per day (see Microsoft's documentation on managed disk limits). Once a disk reaches this limit, Azure refuses any further type change until the 24-hour window allows it again.
With storage optimization enabled, a typical day already uses both changes for a host:
-
Stop (scale in): Premium SSD to Standard HDD.
-
Start (scale out): Standard HDD to Premium SSD.
Any additional stop/start cycle on the same day, for example during a maintenance window, a manual restart, or a scale-in followed by a scale-out, can exceed the limit. Pre-stage OS disk conversion also counts toward it.
What Nerdio Manager does when Azure refuses a disk type change depends on the task, what started it, and whether the disk type restrictions feature is enabled.
|
# |
Task |
Started by |
Disk optimization feature |
Task state |
VM / disk after task |
|---|---|---|---|---|---|
|
1 |
Start VM |
UI or Auto-scale |
Enabled |
Success [1] |
VM started on Standard HDD |
|
2 |
Start VM |
UI or Auto-scale |
Disabled |
Fail |
VM stays stopped |
|
3 |
Stop VM |
UI or Auto-scale |
Enabled |
Success [1] |
VM stopped, disk stays Premium SSD |
|
4 |
Stop VM |
UI or Auto-scale |
Disabled |
Fail |
VM stopped, disk stays Premium SSD |
|
5 |
Re-size |
UI |
Enabled |
Fail |
VM stopped [2], disk unchanged |
|
6 |
Re-size |
UI |
Disabled |
Fail |
VM stopped [2], disk unchanged |
|
7 |
Re-size [3] |
Auto-scale |
Enabled |
No task, or Fail |
Disk at the limit is skipped; otherwise VM stays stopped, disk unchanged |
|
8 |
Re-size [3] |
Auto-scale |
Disabled |
Fail |
VM stays stopped, disk unchanged |
[1] The task shows as successful. The disk error is visible only in the task details, in the Change OS disk storage type step.
[2] If the VM was running, it is stopped before the disk change and is not started again. The VM size is still changed if it was requested.
[3] Stopped hosts only. With the feature enabled, this is the only path that checks the disk change history (2 changes in the last 24 hours).
Note
Start VM and Stop VM change the disk type only if auto-scale is enabled on the host pool and the current disk type differs from the target type (the Running OS disk type on Start, the Stopped OS disk type on Stop).
-
Respected: Pre-stage OS disk conversion (auto-scale re-size of stopped hosts, row 7). A disk that already changed type twice in the last 24 hours is skipped.
-
Not respected: Start VM, Stop VM, Re-size from the UI, and Re-image. These tasks attempt the change and handle the Azure error as shown in the table above.
A host can start on Standard HDD when the disk type restrictions feature is enabled and Azure refuses the conversion back to Premium SSD (row 1 of the table above). Users who connect to that host may experience degraded performance. There is no automatic safeguard that keeps users off these hosts.
To find these hosts:
-
Navigate to the host pool and open its session host list.
-
Look for the warning icon next to OS disk with the tip Current running disk differs from configured policy. This indicator appears only if auto-scale is enabled on the host pool.
-
To confirm the cause, open the host's Start VM task details and review the Change OS disk storage type step.
Nerdio Manager never converts the disk of a running host automatically. The host stays on Standard HDD until it is stopped and started again within the Azure limit. If performance is a concern, exclude the session host from auto-scale and place the session host in drain mode until it can be cycled.
In host pools where hosts may scale in and out several times a day, or where hosts are started for patching and software updates, use the following practices to stay within the Azure limit:
-
Restrict scale-in to non-working hours. In auto-scale, set Stop or remove (scale in) hosts only from to your non-working hours. Hosts are then not stopped during the day, so each host has at most one start and one stop per day, and the disk type changes stay within the limit.
-
Turn off auto-scale on the host pool during maintenance. With auto-scale off, Start VM and Stop VM do not change the disk type and do not use up the daily limit.
-
Power off the hosts you started after maintenance. Nerdio Manager never converts the disk of a running host automatically, so a host left running on Standard HDD stays there until its next stop and start.
-
Set the Stopped OS disk type to the same type as the Running OS disk if hosts must cycle many times a day. The disk type then never changes, at the cost of the storage savings.
-
Check for the disk warning icon after maintenance and before business hours, as described in Session hosts running on Standard HDD.
-
Before maintenance is started, turn off auto-scale on the host pool.
-
Start the hosts and perform patching and software updates. Disk types are not changed.
-
After maintenance is complete, stop the hosts you started.
-
Turn auto-scale back on. Session hosts scale out on user demand and convert to the Running OS disk type within the daily limit.
What does Nerdio Manager do once the Azure disk conversion limit is reached for a host? It depends on the task and on whether the disk type restrictions feature is enabled. See How Nerdio Manager handles a refused disk type change.
Does Nerdio Manager track and respect Azure's disk type conversion limit? Partially. Only pre-stage OS disk conversion checks the disk change history and skips disks that changed type twice in the last 24 hours. Start VM, Stop VM, Re-size from the UI, and Re-image do not check the limit.
Can a host be powered on while still on Standard HDD? Yes. With the disk type restrictions feature enabled, Nerdio Manager ignores the Azure error and starts the host on Standard HDD. With the feature disabled, the host is not started.
How do I prevent users from landing on a host that is still on Standard HDD? There is no automatic safeguard. Find affected hosts by the OS disk warning icon in the session host list, and follow the best practices below to avoid exceeding the limit.
Are there best practices for host pools that scale in and out several times a day? Yes. Restrict scale-in to non-working hours, turn off auto-scale during maintenance, and power off hosts started for maintenance. If hosts must cycle often, set the Stopped OS disk type to match the Running OS disk.
Comments (0 comments)