Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az vmss deployment failing with "Parameter 'virtualMachineProfile' is not allowed" #27806

Closed
TheOnlyWei opened this issue Nov 9, 2023 · 17 comments · Fixed by #27980
Closed
Assignees
Labels
Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.
Milestone

Comments

@TheOnlyWei
Copy link

TheOnlyWei commented Nov 9, 2023

Describe the bug

az vmss deployment failing with "Parameter 'virtualMachineProfile' is not allowed". We use the Azure CLI 2.54.0 nightly build:
https://aka.ms/InstallAzureCliWindowsEdge
The environment is Azure Stack Hub with 2020-09-01-hybrid API profile. Either VMSS or Resource Deployment is the root cause.

Hi @yanzhudd @Jing-song, was there any change from VM side that could have caused this in the nightly build?
Hi @anthony-c-martin @jeskew, were there any changes from Resource Deployment side that could have caused this in the nightly build?

Related command

az vmss create -g $vmssRgName -n $vmssName --admin-username $vmssAdminUserName --admin-password $vmssAdminPassword --image $imageName --authentication-type password --upgrade-policy-mode $upgradeMode

Errors

Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/vm/custom.py", line 3513, in create_vmss
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1030, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1013, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1000, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 255, in result
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 275, in wait
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 192, in _start
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 535, in run
azure.core.exceptions.HttpResponseError: (DeploymentFailed) At least one resource deployment operation failed. Please list deployment operations for details. Please see 
https://aka.ms/DeployOperations for usage details.
Code: DeploymentFailed
Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
Exception Details:	(BadRequest) {
	  "error": {
	    "code": "InvalidParameter",
	    "message": "Parameter 'virtualMachineProfile' is not allowed.",
	    "target": "virtualMachineProfile"
	  }
	}
	Code: BadRequest
	Message: {
	  "error": {
	    "code": "InvalidParameter",
	    "message": "Parameter 'virtualMachineProfile' is not allowed.",
	    "target": "virtualMachineProfile"
	  }
	}

Issue script & Debug output

Command
az vmss create -g $vmssRgName -n $vmssName --admin-username $vmssAdminUserName --admin-password $vmssAdminPassword --image $imageName --authentication-type password --upgrade-policy-mode $upgradeMode --debug

Debug
I had to truncate to the last part of the debug because I cannot fit the entire message length of characters in this issue post.

...
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.redmond.ext-rm0704.masd.stbtest.microsoft.com/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/
resourcegroups/clivmssrg/providers/Microsoft.Resources/deployments/vmss_deploy_NcKALQtZ1KJQueSjqtB3yyQa1IVfjdGP?api-version=2019-10-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'PUT'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '4912'
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '8e1a46b7-7e8a-11ee-906c-00155d02feed'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'vmss create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g -n --admin-username --admin-password --image --authentication-type --upgrade-policy-mode --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.54.0 (MSI) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.11.5 (Windows-10-10.0.17763-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: {"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 
"contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, 
"resources": [{"name": "testvmssVNET", "type": "Microsoft.Network/virtualNetworks", "location": "redmond", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, 
"properties": {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": "testvmssSubnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, 
{"apiVersion": "2018-11-01", "type": "Microsoft.Network/publicIPAddresses", "name": "testvmssLBPublicIP", "location": "redmond", "tags": {}, "dependsOn": [], 
"properties": {"publicIPAllocationMethod": "Static"}, "sku": {"name": "Standard"}}, {"type": "Microsoft.Network/loadBalancers", "name": "testvmssLB", "location": 
"redmond", "tags": {}, "apiVersion": "2018-11-01", "dependsOn": ["Microsoft.Network/virtualNetworks/testvmssVNET", 
"Microsoft.Network/publicIpAddresses/testvmssLBPublicIP"], "properties": {"backendAddressPools": [{"name": "testvmssLBBEPool"}], "frontendIPConfigurations": [{"name": 
"loadBalancerFrontEnd", "properties": {"publicIPAddress": {"id": 
"/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/publicIPAddresses/testvmssLBPublicIP"}}}], 
"loadBalancingRules": [{"name": "LBRule", "properties": {"frontendIPConfiguration": {"id": "[concat(resourceId('Microsoft.Network/loadBalancers', 'testvmssLB'), 
'/frontendIPConfigurations/', 'loadBalancerFrontEnd')]"}, "backendAddressPool": {"id": "[concat(resourceId('Microsoft.Network/loadBalancers', 'testvmssLB'), 
'/backendAddressPools/', 'testvmssLBBEPool')]"}, "protocol": "tcp", "frontendPort": 80, "backendPort": 80, "enableFloatingIP": false, "idleTimeoutInMinutes": 5}}]}, 
"sku": {"name": "Standard"}}, {"type": "Microsoft.Network/networkSecurityGroups", "name": "testvmssNSG", "apiVersion": "2015-06-15", "location": "redmond", "tags": {}, 
"dependsOn": [], "properties": {"securityRules": [{"name": "default-allow-ssh", "properties": {"protocol": "Tcp", "sourcePortRange": "*", "destinationPortRange": "22", 
"sourceAddressPrefix": "*", "destinationAddressPrefix": "*", "access": "Allow", "priority": 1000, "direction": "Inbound"}}]}}, {"type": 
"Microsoft.Network/loadBalancers/inboundNatRules", "apiVersion": "2018-11-01", "name": "testvmssLB/NatRule", "location": "redmond", "properties": 
{"frontendIPConfiguration": {"id": "[concat(resourceId('Microsoft.Network/loadBalancers', 'testvmssLB'), '/frontendIPConfigurations/', 'loadBalancerFrontEnd')]"}, 
"backendAddressPool": {"id": "[concat(resourceId('Microsoft.Network/loadBalancers', 'testvmssLB'), '/backendAddressPools/', 'testvmssLBBEPool')]"}, "backendPort": 3389, 
"frontendPortRangeStart": "50000", "frontendPortRangeEnd": "50119", "protocol": "tcp", "idleTimeoutInMinutes": 5}, "dependsOn": 
["[concat('Microsoft.Network/loadBalancers/', 'testvmssLB')]"]}, {"type": "Microsoft.Compute/virtualMachineScaleSets", "name": "testvmss", "location": "redmond", "tags": 
{}, "apiVersion": "2020-06-01", "dependsOn": ["Microsoft.Network/virtualNetworks/testvmssVNET", "Microsoft.Network/loadBalancers/testvmssLB", 
"Microsoft.Network/networkSecurityGroups/testvmssNSG"], "properties": {"singlePlacementGroup": null, "platformFaultDomainCount": 1, "virtualMachineProfile": 
{"storageProfile": {"osDisk": {"createOption": "FromImage", "caching": "ReadWrite", "managedDisk": {"storageAccountType": null}}, "imageReference": {"publisher": 
"MicrosoftWindowsServer", "offer": "WindowsServer", "sku": "2016-Datacenter", "version": "latest"}}, "osProfile": {"computerNamePrefix": "testvmss", "adminUsername": 
"CanaryAdmin", "adminPassword": "[parameters('adminPassword')]"}, "networkProfile": {"networkInterfaceConfigurations": [{"name": "testv8c32Nic", "properties": 
{"ipConfigurations": [{"name": "testv8c32IPConfig", "properties": {"subnet": {"id": 
"/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/virtualNetworks/testvmssVNET/subnets/testvmssSubnet"}, 
"loadBalancerBackendAddressPools": [{"id": "/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/loadBalancers/testvms
sLB/backendAddressPools/testvmssLBBEPool"}]}}], "networkSecurityGroup": {"id": "[resourceId('Microsoft.Network/networkSecurityGroups', 'testvmssNSG')]"}, "primary": 
"true"}}]}}, "orchestrationMode": "Flexible"}, "sku": {"name": "Standard_DS1_v2", "capacity": 2}}], "outputs": {"VMSS": {"type": "object", "value": 
"[reference(resourceId('Microsoft.Compute/virtualMachineScaleSets', 'testvmss'),providers('Microsoft.Compute', 'virtualMachineScaleSets').apiVersions[0])]"}}}, 
"parameters": {"adminPassword": {"value": "<redacted password>"}}, "mode": "incremental"}}
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.redmond.ext-rm0704.masd.stbtest.microsoft.com:443
DEBUG: urllib3.connectionpool: https://management.redmond.ext-rm0704.masd.stbtest.microsoft.com:443 "PUT /subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourcegroup
s/clivmssrg/providers/Microsoft.Resources/deployments/vmss_deploy_NcKALQtZ1KJQueSjqtB3yyQa1IVfjdGP?api-version=2019-10-01 HTTP/1.1" 201 3175
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 201
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '3175'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Azure-AsyncOperation': 'https://management.redmond.ext-rm0704.masd.stbtest.microsoft.com/subscriptions/a5145679-8cfa-4cd3-ba3
4-40d13b5de547/resourcegroups/clivmssrg/providers/Microsoft.Resources/deployments/vmss_deploy_NcKALQtZ1KJQueSjqtB3yyQa1IVfjdGP/operationStatuses/08585021224755680311?api-
version=2019-10-01'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '1197'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'a7dcfd2d-ee2e-4356-a7cd-6b06a8c9c367'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'a7dcfd2d-ee2e-4356-a7cd-6b06a8c9c367'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'REDMOND:20231108T230010Z:a7dcfd2d-ee2e-4356-a7cd-6b06a8c9c367'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 08 Nov 2023 23:00:09 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Resources/deployments/vmss
_deploy_NcKALQtZ1KJQueSjqtB3yyQa1IVfjdGP","name":"vmss_deploy_NcKALQtZ1KJQueSjqtB3yyQa1IVfjdGP","type":"Microsoft.Resources/deployments","properties":{"templateHash":"962
5556506124042688","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2023-11-08T23:00:10.0321591Z","d
uration":"PT0.0002319S","correlationId":"a7dcfd2d-ee2e-4356-a7cd-6b06a8c9c367","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetw
orks","locations":["redmond"]},{"resourceType":"publicIPAddresses","locations":["redmond"]},{"resourceType":"loadBalancers","locations":["redmond"]},{"resourceType":"netw
orkSecurityGroups","locations":["redmond"]},{"resourceType":"loadBalancers/inboundNatRules","locations":["redmond"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{
"resourceType":"virtualMachineScaleSets","locations":["redmond"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGrou
ps/clivmssrg/providers/Microsoft.Network/virtualNetworks/testvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"testvmssVNET"},{"id":"/subscript
ions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/publicIPAddresses/testvmssLBPublicIP","resourceType":"Microsoft.Network/pub
licIPAddresses","resourceName":"testvmssLBPublicIP"}],"id":"/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/loadB
alancers/testvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"testvmssLB"},{"dependsOn":[{"id":"/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de54
7/resourceGroups/clivmssrg/providers/Microsoft.Network/loadBalancers/testvmssLB","resourceType":"Microsoft.Network/loadBalancers","resourceName":"testvmssLB"}],"id":"/sub
scriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/loadBalancers/testvmssLB/inboundNatRules/NatRule","resourceType":"Mic
rosoft.Network/loadBalancers/inboundNatRules","resourceName":"testvmssLB/NatRule"},{"dependsOn":[{"id":"/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups
/clivmssrg/providers/Microsoft.Network/virtualNetworks/testvmssVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"testvmssVNET"},{"id":"/subscriptio
ns/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/loadBalancers/testvmssLB","resourceType":"Microsoft.Network/loadBalancers","r
esourceName":"testvmssLB"},{"id":"/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/networkSecurityGroups/testvmssN
SG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"testvmssNSG"}],"id":"/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivm
ssrg/providers/Microsoft.Compute/virtualMachineScaleSets/testvmss","resourceType":"Microsoft.Compute/virtualMachineScaleSets","resourceName":"testvmss"}]}}
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.redmond.ext-rm0704.masd.stbtest.microsoft.com/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/
resourcegroups/clivmssrg/providers/Microsoft.Resources/deployments/vmss_deploy_NcKALQtZ1KJQueSjqtB3yyQa1IVfjdGP/operationStatuses/08585021224755680311?api-version=2019-10
-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '8e1a46b7-7e8a-11ee-906c-00155d02feed'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'vmss create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g -n --admin-username --admin-password --image --authentication-type --upgrade-policy-mode --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.54.0 (MSI) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.11.5 (Windows-10-10.0.17763-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: https://management.redmond.ext-rm0704.masd.stbtest.microsoft.com:443 "GET /subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourcegroup
s/clivmssrg/providers/Microsoft.Resources/deployments/vmss_deploy_NcKALQtZ1KJQueSjqtB3yyQa1IVfjdGP/operationStatuses/08585021224755680311?api-version=2019-10-01 
HTTP/1.1" 200 21
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '14970'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'aab43b18-db73-4264-9dd1-3cece8e6f613'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'aab43b18-db73-4264-9dd1-3cece8e6f613'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'REDMOND:20231108T230010Z:aab43b18-db73-4264-9dd1-3cece8e6f613'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 08 Nov 2023 23:00:09 GMT'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '21'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"status":"Accepted"}
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.redmond.ext-rm0704.masd.stbtest.microsoft.com/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/
resourcegroups/clivmssrg/providers/Microsoft.Resources/deployments/vmss_deploy_NcKALQtZ1KJQueSjqtB3yyQa1IVfjdGP/operationStatuses/08585021224755680311?api-version=2019-10
-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '8e1a46b7-7e8a-11ee-906c-00155d02feed'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'vmss create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g -n --admin-username --admin-password --image --authentication-type --upgrade-policy-mode --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.54.0 (MSI) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.11.5 (Windows-10-10.0.17763-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: https://management.redmond.ext-rm0704.masd.stbtest.microsoft.com:443 "GET /subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourcegroup
s/clivmssrg/providers/Microsoft.Resources/deployments/vmss_deploy_NcKALQtZ1KJQueSjqtB3yyQa1IVfjdGP/operationStatuses/08585021224755680311?api-version=2019-10-01 
HTTP/1.1" 200 464
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '14969'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '2ccea60d-014d-43b7-9370-9e0d4dc561aa'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '2ccea60d-014d-43b7-9370-9e0d4dc561aa'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'REDMOND:20231108T230040Z:2ccea60d-014d-43b7-9370-9e0d4dc561aa'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 08 Nov 2023 23:00:40 GMT'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '464'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list 
deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n  \"error\": {\r\n    
\"code\": \"InvalidParameter\",\r\n    \"message\": \"Parameter 'virtualMachineProfile' is not allowed.\",\r\n    \"target\": \"virtualMachineProfile\"\r\n  }\r\n}"}]}}
DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 517, in run
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 557, in _poll
azure.core.polling.base_polling.OperationFailed: Operation failed or canceled

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/vm/custom.py", line 3513, in create_vmss
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1030, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1013, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1000, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 255, in result
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 275, in wait
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 192, in _start
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 535, in run
azure.core.exceptions.HttpResponseError: (DeploymentFailed) At least one resource deployment operation failed. Please list deployment operations for details. Please see 
https://aka.ms/DeployOperations for usage details.
Code: DeploymentFailed
Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
Exception Details:	(BadRequest) {
	  "error": {
	    "code": "InvalidParameter",
	    "message": "Parameter 'virtualMachineProfile' is not allowed.",
	    "target": "virtualMachineProfile"
	  }
	}
	Code: BadRequest
	Message: {
	  "error": {
	    "code": "InvalidParameter",
	    "message": "Parameter 'virtualMachineProfile' is not allowed.",
	    "target": "virtualMachineProfile"
	  }
	}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/arm.py", line 109, in handle_template_based_exception
AttributeError: 'OperationFailed' object has no attribute 'error'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 718, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/arm.py", line 112, in handle_template_based_exception
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/arm.py", line 104, in raise_subdivision_deployment_error
azure.cli.core.azclierror.DeploymentError: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please 
list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n  \"error\": {\r\n 
   \"code\": \"InvalidParameter\",\r\n    \"message\": \"Parameter 'virtualMachineProfile' is not allowed.\",\r\n    \"target\": \"virtualMachineProfile\"\r\n  
}\r\n}"}]}}

ERROR: cli.azure.cli.core.azclierror: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list 
deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n  \"error\": {\r\n    
\"code\": \"InvalidParameter\",\r\n    \"message\": \"Parameter 'virtualMachineProfile' is not allowed.\",\r\n    \"target\": \"virtualMachineProfile\"\r\n  }\r\n}"}]}}
ERROR: az_command_data_logger: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment 
operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n  \"error\": {\r\n    \"code\": 
\"InvalidParameter\",\r\n    \"message\": \"Parameter 'virtualMachineProfile' is not allowed.\",\r\n    \"target\": \"virtualMachineProfile\"\r\n  }\r\n}"}]}}

Expected behavior

Should have no errors.

Environment Summary

azure-cli                         2.54.0
core                              2.54.0
telemetry                          1.1.0
Dependencies:
msal                            1.24.0b2
azure-mgmt-resource             23.1.0b2
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\Administrator.RM0704-DVM\.azure\cliextensions'
Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:21:31) [MSC v.1936 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.

Additional context

I noticed a breaking change for az vmss create:
https://techcommunity.microsoft.com/t5/azure-compute-blog/breaking-change-for-vmss-powershell-cli-customers/ba-p/3818295
The commit for Azure CLI was 2 days ago from this post: d72b6ce

So, I set the --orchestration-mode to Uniform:

az vmss create -g $vmssRgName -n $vmssName --admin-username $vmssAdminUserName --admin-password $vmssAdminPassword --image $imageName --authentication-type password --upgrade-policy-mode $upgradeMode --orchestration-mode Uniform --debug

but I get a new error:

DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '4f7299f1-7ebf-11ee-b1e5-00155d02feed'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'vmss create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g -n --admin-username --admin-password --image --authentication-type --upgrade-policy-mode 
--orchestration-mode --debug'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.54.0 (MSI) azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.11.5 (Windows-10-10.0.17763-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: https://management.redmond.ext-rm0704.masd.stbtest.microsoft.com:443 "GET /subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourcegroup
s/clivmssrg/providers/Microsoft.Resources/deployments/vmss_deploy_21UgWkB04xXHnz27Hn4NloaXXNBMbXLv/operationStatuses/08585020998164562902?api-version=2019-10-01 
HTTP/1.1" 200 659
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '14997'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '7065e9fe-8051-4658-8406-6a03a5cf5f70'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '7065e9fe-8051-4658-8406-6a03a5cf5f70'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'REDMOND:20231109T051819Z:7065e9fe-8051-4658-8406-6a03a5cf5f70'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Thu, 09 Nov 2023 05:18:19 GMT'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '659'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list 
deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n  \"error\": {\r\n    
\"code\": \"SkuCannotBeChangedOnUpdate\",\r\n    \"message\": \"Sku property is set at creation time and cannot be changed from Standard to Basic on resource update for 
resource /subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/publicIPAddresses/testvmssLBPublicIP.\",\r\n    
\"details\": []\r\n  }\r\n}"}]}}
DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 517, in run
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 557, in _poll
azure.core.polling.base_polling.OperationFailed: Operation failed or canceled

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/vm/custom.py", line 3513, in create_vmss
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1030, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1013, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1000, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 255, in result
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 275, in wait
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 192, in _start
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 535, in run
azure.core.exceptions.HttpResponseError: (DeploymentFailed) At least one resource deployment operation failed. Please list deployment operations for details. Please see 
https://aka.ms/DeployOperations for usage details.
Code: DeploymentFailed
Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
Exception Details:	(BadRequest) {
	  "error": {
	    "code": "SkuCannotBeChangedOnUpdate",
	    "message": "Sku property is set at creation time and cannot be changed from Standard to Basic on resource update for resource 
/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/publicIPAddresses/testvmssLBPublicIP.",
	    "details": []
	  }
	}
	Code: BadRequest
	Message: {
	  "error": {
	    "code": "SkuCannotBeChangedOnUpdate",
	    "message": "Sku property is set at creation time and cannot be changed from Standard to Basic on resource update for resource 
/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/publicIPAddresses/testvmssLBPublicIP.",
	    "details": []
	  }
	}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/arm.py", line 109, in handle_template_based_exception
AttributeError: 'OperationFailed' object has no attribute 'error'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 718, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/arm.py", line 112, in handle_template_based_exception
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/arm.py", line 104, in raise_subdivision_deployment_error
azure.cli.core.azclierror.DeploymentError: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please 
list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n  \"error\": {\r\n 
   \"code\": \"SkuCannotBeChangedOnUpdate\",\r\n    \"message\": \"Sku property is set at creation time and cannot be changed from Standard to Basic on resource update 
for resource /subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/publicIPAddresses/testvmssLBPublicIP.\",\r\n    
\"details\": []\r\n  }\r\n}"}]}}

ERROR: cli.azure.cli.core.azclierror: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list 
deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n  \"error\": {\r\n    
\"code\": \"SkuCannotBeChangedOnUpdate\",\r\n    \"message\": \"Sku property is set at creation time and cannot be changed from Standard to Basic on resource update for 
resource /subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/publicIPAddresses/testvmssLBPublicIP.\",\r\n    
\"details\": []\r\n  }\r\n}"}]}}
ERROR: az_command_data_logger: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment 
operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"BadRequest","message":"{\r\n  \"error\": {\r\n    \"code\": 
\"SkuCannotBeChangedOnUpdate\",\r\n    \"message\": \"Sku property is set at creation time and cannot be changed from Standard to Basic on resource update for resource 
/subscriptions/a5145679-8cfa-4cd3-ba34-40d13b5de547/resourceGroups/clivmssrg/providers/Microsoft.Network/publicIPAddresses/testvmssLBPublicIP.\",\r\n    \"details\": 
[]\r\n  }\r\n}"}]}}
@TheOnlyWei TheOnlyWei added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 9, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Compute az vm/vmss/image/disk/snapshot label Nov 9, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 9, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 9, 2023

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan added this to the Backlog milestone Nov 9, 2023
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Nov 9, 2023
@yanzhudd
Copy link
Contributor

yanzhudd commented Nov 9, 2023

Hi @TheOnlyWei, I cannot repro this issue. Could you please run it again?

@TheOnlyWei
Copy link
Author

TheOnlyWei commented Nov 9, 2023

Hi @TheOnlyWei, I cannot repro this issue. Could you please run it again?

@yanzhudd Did you run it in Azure Stack Hub or Azure Cloud?

@jeskew
Copy link
Contributor

jeskew commented Nov 9, 2023

@TheOnlyWei -- The error message doesn't appear to be related to any changes to the resources module. The only time virtualMachineProfile appears in the template included in the debug output is as a property on a Microsoft.Compute/virtualMachineScaleSets resource:

image

And the error message doesn't match the language used by Azure Resource Manager for unrecognized parameters.

@Jing-song
Copy link
Contributor

Jing-song commented Nov 10, 2023

Hi @TheOnlyWei, Has this issue been solved?

I successfully created the resource using this command with 2020-09-01-hybrid API profile
az vmss create -g $vmssRgName -n $vmssName --admin-username $vmssAdminUserName --admin-password $vmssAdminPassword --image win2016datacenter --authentication-type password --upgrade-policy-mode manual --orchestration-mode Uniform

Sku property is set at creation time and cannot be changed from Standard to Basic on resource update for resource

This error means you need to delete the previous resource or change vmssNmae and recreate it, could you please try again?

@TheOnlyWei
Copy link
Author

TheOnlyWei commented Nov 10, 2023

@Jing-song Strange, I ran the following and got no VMSS:

[DBG]: PS C:\test\Workloads\DeveloperExperience\CLI>> az vmss list
[]

I had to change the name to make it work. So, it still seems like there is an issue because az vmss list returns empty and I still get the following error:

Sku property is set at creation time and cannot be changed from Standard to Basic on resource update for resource

Also, do you know why --orchestration-mode Flexible doesn't work for Azure Stack Hub?

@Jing-song
Copy link
Contributor

Jing-song commented Nov 10, 2023

@TheOnlyWei

I had to change the name to make it works.

Could you please provide the request body and response with --debug when it runs successfully? It is best to check the Sku property in request body at runtime.

do you know why doesn't work for Azure Stack Hub?

The earliest swagger version(#16666) of --orchestration-mode Flexible is 2020-12-01, so 2020-09-01 is not supported

@yanzhudd
Copy link
Contributor

yanzhudd commented Nov 10, 2023

So, it still seems like there is an issue because az vmss list returns empty and I still get the following error

@TheOnlyWei,
it seems to be a service issue. I am not sure if the vmss instance exists in the backend (but not in a successful state), and it would not be returned using GET request (az vmss list).

@yonzhan yonzhan added Service Attention This issue is responsible by Azure service team. and removed Azure CLI Team The command of the issue is owned by Azure CLI team labels Nov 10, 2023
@TheOnlyWei
Copy link
Author

@Jing-song @yanzhudd
Sorry, I was looking at whether the VMSS existed instead of the other resources that were created by the az vmss create command. I assumed that the resources should not exist if the VMSS failed from the first command using default flexible orchestration, but some of the resources like public IP were still created and persisted until the second command. After deleting the resources after the failed default flexible orchestration command, the second command with uniform orchestration mode succeeded.

@TheOnlyWei
Copy link
Author

TheOnlyWei commented Nov 10, 2023

@Jing-song @yanzhudd
This is still an issue for ASH customers since the parameter --orchestration-mode Uniform is now a required parameter for them. But in the MS docs, it is listed as an optional parameter for 2018-03-01-hybrid API:
https://learn.microsoft.com/en-us/cli/azure/vmss?view=azure-cli-2018-03-01-hybrid#az-vmss-create
Also, there seems to be no documentation for 2020-09-01-hybrid API at all, that's why I linked the 2018-03-01-hybrid version above.

Would also be helpful if the error was clearer on requiring --orchestration-mode Uniform parameter if API profile version doesn't support the default Flexible orchestration mode. Right now, as pointed out above, the error just says this when using default Flexible orchestration mode on ASH:

Parameter 'virtualMachineProfile' is not allowed.

@hilaryw29 hilaryw29 self-assigned this Nov 11, 2023
@hilaryw29
Copy link
Member

Hi @TheOnlyWei, thanks for raising this.

To clarify on the issue here:

  • ASH customers will not be able to use --orchestration-mode Flexible because ASH is on an older API version (2020-09-01).
  • If they use --orchestration-mode Flexible today, or do not specify an orchestration mode (CLI defaults to Flex), customers will receive a "Parameter 'virtualMachineProfile' is not allowed." error. The ask is to have a clearer error message asking customers to set "--orchestration-mode Uniform" which is the real issue here.

@Jing-song @yanzhudd

  • Do we know why "--orchestration-mode" is showing up as optional on 2020-09-01-hybrid API profile/2018-03-01-hybrid if Flexible is not supported? Is there any way to prevent customers from setting orchestration mode on these APIs (i.e. only allow "uniform" VMSS creation) if Flexible orchestration will return an error?

Thanks!

@Jing-song
Copy link
Contributor

@hilaryw29 Before the default value is changed, flexible is already displayed as an option in Azure Stack Hub. Do we need to add new logic to make Azure Stack Hub only support uniform?

@hilaryw29
Copy link
Member

@Jing-song Pardon my ignorance, I want to make sure I have a correct understanding of the problem here:

  • Do you know if this issue is specific to Azure Stack Hub or will it affect other customers on API versions before 2020-12-01? For example, if other CLI customers are using 2018-03-01-hybrid or 2020-09-01-hybrid API profiles, will they also get an error if --orchestration-mode Flexible?

If orchestration mode cannot be set to Flex for any customer on 2018-03-01-hybrid, 2020-09-01-hybrid API profiles (i.e. this is not an issue specific to Azure Stack Hub), then we should make sure that there is logic in place to keep --orchestration-mode uniform on those API versions.

@Jing-song
Copy link
Contributor

@hilaryw29
Yes, flexible is not supported for all versions before 2020-12-01, so should we change these versions to only support uniform?

@hilaryw29
Copy link
Member

Hi @Jing-song, before we make any changes, let me reach out to Azure Stack Hub contacts to look into this further. Will let you know once we decide on next steps here. Thanks!

@hilaryw29
Copy link
Member

Hi @Jing-song, based on discussion with Azure Stack Hub in email thread, I believe your proposal above works.

Would it be possible to update CLI behavior such that orchestration-mode can only be set to "uniform" for all API profiles before 2020-12-01? Thanks!

@Jing-song
Copy link
Contributor

@hilaryw29
Yes, I'll fix it as requested, since the latest release is almost over, we need to release it in the next sprint(2024-01-02), thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team.
Projects
None yet
7 participants