azure-cli: az vm create fails with error VMCustomization is not enabled
This is autogenerated. Please review and update as needed.
Describe the bug
Following basic how to on creating vms from command line doesn’t work, and preview feature doesn’t appear in azure. https://app.pluralsight.com/course-player?clipId=4924ba21-099c-42e1-8683-a131b1f5e442
Closest thing I found is this signup page, which doesn’t really help much: https://forms.office.com/pages/responsepage.aspx?id=v4j5cvGGr0GRqy180BHbR3_Cn0JTTIxChanY12UDdkpUMDNRRFdHSTRUMU1OUjBTSkw0MFFIRThFRi4u&web=1&wdLOR=c82F6F682-783D-477D-B824-BF81D3A7C7D3
Command Name
az vm create
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\": \"'VMCustomization' is not enabled for the Subscription. Please register the Subscription for 'Microsoft.Compute/VMCustomizationPreview' to use the feature.\"\r\n }\r\n}"}]}}
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az login az group create az vm create --resource-group “psdemo-rg-2” --name “psdemo-win-cli” --image “win2019datacenter” --admin-username “demoadmin” --admin-password “<snip>” --public-ip-sku Standard
Expected Behavior
creates a vm
Environment Summary
Windows-10-10.0.19041-SP0
Python 3.8.9
Installer: MSI
azure-cli 2.33.0
Additional Context
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 8
- Comments: 22 (6 by maintainers)
2.33.0 is currently the active version in azure cloud shell as well, hope the upcoming hotfix will be pushed there as well.
The easiest workaround is to downgrade to the previous version. On Ubuntu/Debian, users can check what the previous version was with
apt-cache policy azure-cli
and downgradeapt install azure-cli=$VERSION
.They can also pin this version for now:
But they will have to remove this file when a fixed package gets released.
Cloud Shell is showing the 2.33.1 update now.
@Azure:~$ az --version azure-cli 2.33.1
On WSL2 Ubuntu this worked for me:
@j5awry @ozzy92 OK, we will solve this issue as soon as possible, and we plan to release the hotfix next Monday (02-14).
For reference, I’ve submitted an issue to the Azure CloudShell repo as well, linking back to this issue. Thanks to the CLI team for the rapid fix, look forward to seeing it also in CloudShell!
https://github.com/Azure/CloudShell/issues/145
@zhoxing-ms : I’d kindly request that this move faster. This currently affects all new installs, as well as anyone upgrading on Windows or from the latest Linux distro PPAs (for Ubuntu, the
hirsute
PPA). For my team, this breaks some integrations, as well as members of my team. A workaround for Debian based distros is below. Something similar will probably work for RHEL based (untested).Minimally, please document the workaround for the broken Windows versions (at least noting the broken version and pointing to the docs to pinning to a version)
For those coming from Debian or Ubuntu: the Microsoft PPAs have past versions, so you can look up the version previous to this push, pin to that version, and force a downgrade. For those on Ubuntu non-LTS > Focal, you can also “fallback” to the Focal PPA as that version (
2.27.2-1~focal
) is operating as expected. NOTE: I’m running Ubuntu Impish (21.10) desktop with the Focal package, and it’s operating fine.