-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Compute] az vm create
: Fix the bug when creating Flex VMSS without SKU and VM profile
#22016
Conversation
'--ppg {ppg} --platform-fault-domain-count 3 --admin-username vmtest', | ||
'--ppg {ppg} --platform-fault-domain-count 3', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the following errors:
{"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": "BadRequest",\r\n "message": "Virtual Machine Scale Set with orchestration mode 'Flexible' and a Virtual Machine profile must use managed disks."\r\n }\r\n}"}]}}
--admin-username vmtest
was added from PR #21761 by mistake. It will result in adding redundant VM profile when creating an empty VMSS
Compute |
Just to be clear, with vmss flex, either:
* no sku object AND no virtualMachineProfile object
* sku object AND virtualMachineProfile object
You can have neither, or both.
AzCli has required customer enter the image parameter, but provided reasonable defaults for all the other parameters. I would expect that same behavior to continue. So in this example, customer picked a sku but not an image. That should fail on any vmss create, since image is required. If customer only picks an image, we should have the same experience as vmss uniform where AzCli has a reasonable default.
Sent from my T-Mobile 5G Device
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Yu Chen ***@***.***>
Sent: Tuesday, April 12, 2022 8:08:36 PM
To: Azure/azure-cli ***@***.***>
Cc: Jerry Steele ***@***.***>; Mention ***@***.***>
Subject: Re: [Azure/azure-cli] [Compute] `az vm create`: Fix the bug when creating Flex VMSS without SKU and VM profile (PR #22016)
@jsntcy approved this pull request.
—
Reply to this email directly, view it on GitHub<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-cli%2Fpull%2F22016%23pullrequestreview-940354938&data=05%7C01%7Cjerry.steele%40microsoft.com%7C4d09c85487754d3209a908da1cfae6de%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637854161192740084%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=CtWSfzNrRuif6zRZBR528DLXufiAfvdXM0yACXuo9vk%3D&reserved=0>, or unsubscribe<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAABGQSDG64NRTR6OVRUO7L3VEY3DJANCNFSM5TCMRR5A&data=05%7C01%7Cjerry.steele%40microsoft.com%7C4d09c85487754d3209a908da1cfae6de%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637854161192740084%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vy7bqltZFTEd7b5pRiiQFP02Q8ELt943QhLtoIadJH8%3D&reserved=0>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Can we also check that just specifying --image still works? If that still works, then the other fixes look good to me! |
Yes, we have run relevant tests in |
Description
This problem comes from ICM. Just as communicating with @fitzgeraldsteele on Teams, CLI needs to fix the following problems:
'NoneType' object has no attribute 'lower'
when creating Flex VMSS without--vm-sku
parameter--location
, the location from resource group can be used by default (there is already this logic, but it is not triggered due to this bug)--vm-sku
parameter, CLI needs to verify that users must also pass in the--image
parameterTesting Guide
Because if the

--zone
parameter is added in the test, the recorded file will be very large. Therefore, instead of adding the corresponding test case, upload the screenshot of this caseHistory Notes
[Compute]
az vm create
: Fix the bug of "NoneType object has no attribute lower" when creating Flex VMSS without--vm-sku
parameterThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
[x ] I adhere to the Error Handling Guidelines.