Forum Discussion
Bas van der Kruijssen
Jul 02, 2020Copper Contributor
Trying to change the default VM size on a host pool
Hello all, I'm looking for a way to change the default VM size for a host pool. When I first created a hostpool I used the Standard_E2as_v4 size never realizing this size would be the default for...
Bas van der Kruijssen
Jul 02, 2020Copper Contributor
SteveMiles70 Missed that note on the docs page, thanks for the link 🙂
I understand the importance of VM sizes to be equal for all VM's in a hostpool. However, it's still possible to change the VM size from the virtual machine blade without problems. So this would be a deploy-time setting which can be altered outside of the WVD environment post deployment and cause strange issues.
There's also the case of new insights into the usage of your WVD environment over time. How can we change the VM size for the hostpool if the initial sizing was incorrect?
AliAsghar600
Jan 09, 2023Copper Contributor
I am trying to create a HostPool Via restapi and within Hostpool I want to create hostpool So I am finding difficulty to set Vmtemplate for HostPool.I am using this request body
{
"name": "POOL4",
"id": "/subscriptions/SubsID
/resourcegroups/MyAzureGroupRestApi/providers/Microsoft.DesktopVirtualization/hostpools/POOL4",
"type": "Microsoft.DesktopVirtualization/hostpools",
"location": "westus",
"kind": null,
"systemData": {
"createdBy": "email address removed for privacy reasons",
"createdByType": "User",
"createdAt": "2023-01-04T20:06:35.83Z",
"lastModifiedBy": "email address removed for privacy reasons",
"lastModifiedByType": "User",
"lastModifiedAt": "2023-01-04T20:06:35.83Z"
},
"properties": {
"friendlyName": null,
"description": "Created through the Azure Virtual Desktop extension",
"hostPoolType": "Pooled",
"personalDesktopAssignmentType": null,
"applicationGroupReferences": [
"/subscriptions/SusID/resourcegroups/MyAzureGroupRestApi/providers/Microsoft.DesktopVirtualization/applicationgroups/POOL3-DAG"
],
"customRdpProperty": "drivestoredirect:s:*;audiomode:i:0;videoplaybackmode:i:1;redirectclipboard:i:1;redirectprinters:i:1;devicestoredirect:s:*;redirectcomports:i:1;redirectsmartcards:i:1;usbdevicestoredirect:s:*;enablecredsspsupport:i:1;redirectwebauthn:i:1;use multimon:i:1;",
"maxSessionLimit": 99999,
"loadBalancerType": "BreadthFirst",
"validationEnvironment": false,
"preferredAppGroupType": "Desktop",
"migrationRequest": null,
"cloudPcResource": false,
"startVMOnConnect": false,
"ssoadfsAuthority": null,
"ssoClientId": null,
"ssoClientSecretKeyVaultPath": null,
"ssoSecretType": null,
"vmTemplate": {
"location": "westus",
"name": "myVM",
"properties": {
"hardwareProfile": {
"vmSize": "Standard_DS1_v2"
},
"storageProfile": {
"imageReference": {
"sku": "18.04-LTS",
"publisher": "Canonical",
"version": "latest",
"offer": "UbuntuServer"
},
"osDisk": {
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Premium_LRS"
},
"name": "myVMosdisk",
"createOption": "FromImage"
}
},
"osProfile": {
"adminUsername": "email address removed for privacy reasons",
"computerName": "myVM",
"linuxConfiguration": {
"ssh": {
"publicKeys": [
{
"path": "/home/ali/.ssh/id_rsa.pub",
"keyData": "ssh-rsa AAAAB3NzaC1{snip}mf69/J1"
}
]
},
"disablePasswordAuthentication": true
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/SubsID/resourceGroups/MyAzureGroupRestApi/providers/Microsoft.Network/networkInterfaces/MyVmVNET",
"properties": {
"primary": true
}
}
]
}
}
}
}
}
And the Endpoint is https://management.azure.com/subscriptions/a8e67b63-6936-46ca-9c44-bd8acac3e7ca/resourceGroups/MyAzureGroupRestApi/providers/Microsoft.DesktopVirtualization/hostpools/POOL4?api-version=2019-12-10-preview
After send the request I am getting this error at VmTemplate
{
"error": {
"code": "400",
"message": "Unexpected character encountered while parsing value: {. Path 'properties.vmTemplate', line 35, position 23."
}
}