Azure / Azure/azure-cli

--vm-size is not applied to a virtual machine on AzsHCI

Open
#20,526 1 comment 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
AzureStackHCI customer-reported feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

I created a VM to AzsHCI with the following command. I set Standard_A2_v2 in --vm-size.

```
az azurestackhci virtualmachine create --resource-group $resource_group --extended-location name=$customloc_id type="CustomLocation" --location $Location --vm-size Standard_A2_v2 --nic-id "/subscriptions//resourceGroups/azshci-eu/providers/Microsoft.AzureStackHCI/networkinterfaces/vmfromazclinic22" --os-profile '{\"adminPassword\":\"P@ssw0rd00000000\",\"adminUsername\":\"aimless\",\"computerName\":\"vmfromazcli22\"}' --image-reference "2019-datacenter-core-smalldisk-g2" --virtualmachines-name "vmfromazcli22"
```

But the hardwareProfile of this VM is custom, not Standard_A2_v2.

```
{
"extendedLocation": {
"name": "/subscriptions//resourceGroups/azshci-eu/providers/Microsoft.ExtendedLocation/customLocations/nestedHci",
"type": "CustomLocation"
},
"id": "/subscriptions//resourceGroups/azshci-eu/providers/Microsoft.AzureStackHCI/virtualmachines/vmfromazcli22",
"location": "eastus",
"name": "vmfromazcli22",
"properties": {
"hardwareProfile": {
"dynamicMemoryConfig": null,
"memoryGb": 4,
"processors": 4,
"vmSize": "Custom"
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions//resourceGroups/azshci-eu/providers/Microsoft.AzureStackHCI/networkinterfaces/vmfromazclinic22",
"resourceGroup": "azshci-eu"
}
]
},
"osProfile": {
"adminPassword": null,
"adminUsername": "aimless",
"computerName": "vmfromazcli22",
"linuxConfiguration": null,
"osType": null,
"windowsConfiguration": null
},
"provisioningState": "Succeeded",
"resourceName": "vmfromazcli22",
"securityProfile": null,
"status": {
"errorCode": "Timeout",
"errorMessage": "Timed out while waiting for kubernetes resource 'mocvirtualmachines' to be created: The operation has timed out",
"powerState": "Running"
},
"storageProfile": {
"dataDisks": null,
"imageReference": {
"name": "2019-datacenter-core-smalldisk-g2"
}
}
},
"resourceGroup": "azshci-eu",
},
"tags": null,
"type": "microsoft.azurestackhci/virtualmachines"
}
```

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 93b53420-a497-1584-8289-7a92a4e0138b
* Version Independent ID: 8fc77c99-bfee-b25c-8e52-e495bcf4e834
* Content: [az azurestackhci](https://docs.microsoft.com/en-us/cli/azure/azurestackhci?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/azurestackhci.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/latest/docs-ref-autogen/azurestackhci.yml)
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.