question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az vm create fails with error VMCustomization is not enabled

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:22 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
bertneefcommented, Feb 11, 2022

2.33.0 is currently the active version in azure cloud shell as well, hope the upcoming hotfix will be pushed there as well.

3reactions
gjollycommented, Feb 9, 2022

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 downgrade apt install azure-cli=$VERSION.

They can also pin this version for now:

cat << EOF > /etc/apt/preferences.d/99-azure-cli
Package: azure-cli
Pin: version $VERSION
Pin-Priority: 999
EOF

But they will have to remove this file when a fixed package gets released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'VMCustomization' is not enabled for the Subscription. Error ...
Error trying to create vm from command line. C:\WINDOWS\system32>az vm create --resource-group "psdemo-rg" --name "psdemo-win-cli" ...
Read more >
Pavan Gudiwada on Twitter: " If you are trying to create a VM ...
If you are trying to create a VM from azure-cli and get an error saying "'VMCustomization' is not enabled for the Subscription", ...
Read more >
Microsoft Azure Resource Manager cloud environments
The Azure portal does not show a VM until Citrix Virtual Apps and Desktops ... is not enabled, MCS throws an error during...
Read more >
Azure DevOps agents are using AZ CLI version 2.33.0 which ...
With Azure CLI 2.33.0, I get the error message 'VMCustomization' is not enabled for the Subscription. Please register the Subscription for ...
Read more >
How to see logs for failure reason when creating VM
I want to see the failure reason, How can I get job logs using PowerShell? PS az204_prep> New-AzVM ` >> -ResourceGroupName 'psdemo-rg' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found