Skip to content

VM security type not set in ARM when specifying enable-secure-boot #30210

Description

@vanzod

Describe the bug

In Azure CLI v2.65.0 (and previous versions as well) it is not possible to create a VM where the following two options are defined:

--security-type Standard --enable-secure-boot false

This is identical to the issue reported in #28397

Related command

az vm create --name myvm --resource-group myrg --location westus --image Canonical:0001-com-ubuntu-server-jammy:22_04-lts-gen2:22.04.202410020 --size Standard_ND96isr_MI300X_v5 --accelerated-networking true --nics myNIC --security-type Standard --enable-secure-boot false --admin-username vmadm --ssh-key-values .ssh/id_rsa.pub

Errors

{"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/XXXXXXXX/providers/Microsoft.Resources/deployments/vm_deploy_CT7FgluRoxTA0XFr7KpJ0kMt8W9wnZZx","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"BadRequest","message":"Use of UEFI settings is not supported when security type is ''."}]}}

Issue script & Debug output

None

Expected behavior

Successful creation of VM

Environment Summary

azure-cli 2.65.0

core 2.65.0
telemetry 1.1.0

Extensions:
amg 2.4.0
bastion 1.3.1
ssh 2.0.6

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location '/opt/az/bin/python3'
Extensions directory '/home/davide/.azure/cliextensions'

Python (Linux) 3.11.8 (main, Sep 25 2024, 11:34:44) [GCC 12.2.0]

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotSimilar-Issueact-observability-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions