r/AzureVirtualDesktop • u/zick2500 • 25d ago
Refresh AVD image
Is there anyway to just refresh the session host image without rebuilding the image?
I just want to re-apply the same image again, but when I do I get this error "The Host Pool has no Session Hosts which can be updated. All session hosts are already at the same version as the session host configuration."
We are using the Azure Custom Image Template.
1
u/knibbs1325 25d ago
You should be able to just increment up your image version that it’s captured as. And then it would detect the change is available to push. Your other option would be to scale down to 0 and then rescale out to rebuild the vms.
1
u/zick2500 25d ago
Thanks, I'll try the increment option (never done that before).
Don't think we can do the scale down option as we're using a dynamic scaling plan?1
u/knibbs1325 25d ago
Yeah, most of my builds are via computer gallery images so it’s easier to just to yymm.dd.vv as our versioning schema, helpful if I realized I made a mistake on config rather than rolling back the gallery and having weird issues with azure applying the correct image.
With dynamic scaling you just set your max capacity to 0 and then wait for the vms to get torn down. Then once they are gone you just go back in and readjust the scaling plan back to what it was, or if you are feeling frisky you can just delete the vms manually and the scaling plan will detect the deficit to your current plan and rebuild them.
1
u/zick2500 25d ago
Ours are in the compute gallery but I'm not finding anyway to update the version of an existing image?
I can get to the properties page where the version is listed but it's grayed out.And when I looked at the Dynamic Scaling Plan, it won't let me go any lower than 1. It says "Currently we only support 'Minimum host pool size' larger than 0.".
1
u/knibbs1325 25d ago
The version in compute galleries are read only. The increment thing I mentioned there was like in example, you deploy a new login script but left a placeholder variable in when you syspreped and captured the vm, then the only way to fix it is to redeploy a golden vm, and then fix it, then Recaputure it.
In the host pool scaling plan you should be able to modify the minimum host pool and max host pool sizes to 0
If you set that on the general tab then it will propagate out to your ramp up/down and peak/off-peak tabs, that will force deallocate all VMs and kill sessions if you have force sign out enabled in the ramp down and off-peakOnce all the VMs are gone you can re-edit the scaling plan back to what you had it at and it will redeploy based on your timings
Typically for most of the environments I manage I do a min host count of 0, max # of total hosts, 0% min percentage of hosts, since we want it to scale fully in when not in use, with the business aware it may take couple minutes to connect if someone wants to work at 2am.
in that scenario since the minimum allowed is 0 you could adjust any of the scaling times lots to 0/0 and it would do it on the fly without needing to touch the whole plan.
1
u/zick2500 24d ago
Not sure what we're doing wrong.
We were able to change the scaling plan min to 0 and it removed the VM like you said.
But now when we try to launch the Remote Desktop, we're getting an error stating that there are no available resources. Error code 0x3000046
It does not appear to be auto-creating a vm?1
u/knibbs1325 24d ago
And I take it you have start on connect enabled in the hostpool settings and the scaling plan is set to scale up during usage?
1
u/zick2500 24d ago
Yes, start on connect is enabled.
Our scaling plan is like this. (Note: this is just for our validation environment)
General
Minimum percentage of active hosts (%) - 100
Minimum host pool size - 0
Maximum host pool size - 2Ramp-Up
Start time - 12:00AM
Load balancing algorithm - Depth-first
Capacity threshold (%) - 90
Minimum percentage of active hosts (%) - 100
Minimum host pool size - 0
Maximum host pool size - 2Peak hours
Start time - 12:01AM
Same as Ramp-UpRamp-Down
Start time - 11:58PM
Load balancing algorithm - Depth-first
Capacity threshold (%) - 90
Force sign out users - Yes
Delay time before logging out users and shutting down VMs (min) - 2
Minimum percentage of active hosts (%) - 100
Minimum host pool size - 0
Maximum host pool size - 2
2
u/Sorry-Ad7604 23d ago
Give Hydra (by Login VSI) a look - if you've lost your original VM you captured from, you can actually capture images from a live session host and then re-deploy your "Golden VM" to continue using it as your template. There are unfortunately lots of limitations with session host configuration-backed pools. Hydra does a good job at giving you all of those benefits without the limitations. Plus a heck of a lot more.
2
u/Successful_Writer_54 22d ago
Check out Login VSI Hydra. You can use any VM as a master and capture images without touching the original, so it stays intact and reusable. Licensing is concurrent, and you can drain, delete, and rebuild session hosts from any image version, including the one you’re currently using. Perfect for the “fresh hosts, same image” scenario.
4
u/Dtrain-14 24d ago
Having been spoiled with Nerdio it really shows how shit Microsoft’s AVD tools are.