Forum Discussion
AVD on Azure Local: Increase memory of Sessionhosts after Hostpool deployment
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.
- mhamApr 07, 2025Copper 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