Skip to content

az vm create --computer-name did not set Virtual machine's Computer name #23171

@suntong

Description

@suntong

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

az vm create --computer-name my-vm-name

Describe the bug

I use
az vm create --computer-name my-vm-name
to give my Virtual machine a different Computer name, however, after creation, I saw from the portal that the Virtual machine's
Computer name is still the same as the name where the snapshot is taken.

To Reproduce

  • take a snapshot of an existing VM
  • create a new VM using the created snapshot via az vm create --computer-name other-name --attach-os-disk $osDiskName ...
  • check the Virtual machine's Computer name from the portal

Expected behavior

The Virtual machine's Computer name from the portal should be named as 'other-name', and should not be the same as the VM's name where the snapshot is taken.

Environment summary

Under WSL Debian 11:

$ az --version
extension image-copy-extension contains invalid metadata for Python Package
azure-cli                         2.36.0 *

core                              2.36.0 *
telemetry                          1.0.6

Extensions:
image-copy-extension             Unknown

Dependencies:
msal                              1.17.0
azure-mgmt-resource               21.0.0

Python location '/usr/bin/python3'
Extensions directory '/home/foo/.azure/cliextensions'

Python (Linux) 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110]

Additional context

N.A.

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotOKR CandidateThis label is used to track how many GitHub issues we have resolved for OKR purpose.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-author-feedbackMore information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions