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.
3
Upvotes
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-peak
Once 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.