Forum Discussion
AVD on Azure Local: Increase memory of Sessionhosts after Hostpool deployment
Hi there,
Is there a best practice for increasing the RAM of the session hosts in an Azure Virtual Desktop host pool?
We are using the autoscaler to start and stop VMs on demand. Since this is an automated process, all the settings changed via HyperV-Manager get overwritten, presumably by the host pool template.
Can someone confirm that I am on the right track and maybe give me a hint or a how-to on how to change the RAM for my session hosts?
Hostpool Type: Pooled
Uses Session Host Config: No
Thanks in Advance,
Maik
2 Replies
Considering the below and the best practice:
- Update the VM Size in Azure:
- In the Azure portal, navigate to the Virtual Machines section.
- Locate the session hosts in your host pool.
- Stop the VM, change its size to one with the desired RAM, and restart it. This ensures the new configuration is applied.
- Modify the Host Pool Template:
- If you're using a template for deploying session hosts, update the template to reflect the new VM size. This prevents future deployments from reverting to the old configuration.
- Autoscaler Considerations:
- If you're using an autoscaler, ensure that its configuration aligns with the updated VM size. Some autoscalers might have predefined settings that need adjustment.
- Automation with PowerShell:
- You can use Azure PowerShell to automate the process of resizing VMs:
$ResourceGroup = "YourResourceGroupName" $VMName = "YourVMName" $NewSize = "Standard_D4s_v3" # Replace with your desired size Stop-AzVM -ResourceGroupName $ResourceGroup -Name $VMName -Force Update-AzVM -ResourceGroupName $ResourceGroup -VMName $VMName -Size $NewSize Start-AzVM -ResourceGroupName $ResourceGroup -Name $VMName
Replace the placeholders with your actual resource group, VM name, and desired size.
Best Practices:
-
- Test the changes on a single session host before applying them to the entire pool.
- Monitor performance after the update to ensure the new configuration meets your needs.
- mhamCopper Contributor
Hi Kidd_Ip,
thanks for your quick reply.
This seems like the approach for AVD in Azure. However, I am hosting AVD on Azure Local. That's why I am able to change the VMs' RAM, CPU, etc., as I please via Hyper-V Manager.
The only problem I have is when the autoscaler starts stopped VMs, they lose these settings. So, I think I need to export the host pool template, adjust it, and deploy it. But that's just what I think could work—I don't know. Is this the way?
Host Pool -> Automation -> "Export template" -> modify RAM via editor -> save ARM Template JSON
Host Pool -> Automation -> "Export template" -> "Deploy" saved ARM Template JSON