Share via


az scvmm vm

Note

This reference is part of the scvmm extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az scvmm vm command. Learn more about extensions.

Manage Arc for SCVMM Virtual Machine resources.

Commands

Name Description Type Status
az scvmm vm create

Create VM resource.

Extension GA
az scvmm vm create-checkpoint

Create a VM checkpoint.

Extension GA
az scvmm vm delete

Delete VM resource.

Extension GA
az scvmm vm delete-checkpoint

Delete the specified VM checkpoint.

Extension GA
az scvmm vm disk

Managing the Disks of Arc for SCVMM Virtual Machine.

Extension GA
az scvmm vm disk add

Add a virtual disk to a virtual machine.

Extension GA
az scvmm vm disk delete

Delete disks of a virtual machine.

Extension GA
az scvmm vm disk list

Retrieve the list of disks present in a VM.

Extension GA
az scvmm vm disk show

Get the details of a disk present in a VM.

Extension GA
az scvmm vm disk update

Update a disk of a VM.

Extension GA
az scvmm vm disk wait

Place the CLI in a waiting state until a condition of the vm disk is met.

Extension GA
az scvmm vm extension

Manage vm extension with scvmm.

Extension GA
az scvmm vm extension create

The operation to create the extension.

Extension GA
az scvmm vm extension delete

The operation to delete the extension.

Extension GA
az scvmm vm extension list

The operation to get all extensions of a non-Azure vm.

Extension GA
az scvmm vm extension show

The operation to get the extension.

Extension GA
az scvmm vm extension update

The operation to update the extension.

Extension GA
az scvmm vm guest-agent

Vm guest agent.

Extension GA
az scvmm vm guest-agent enable

Enable guest agent on the vm.

Extension GA
az scvmm vm guest-agent show

Get details of a guest agent by guest agent name, resource-group and vm name.

Extension GA
az scvmm vm list

Retrieve a list of VMs.

Extension Deprecated
az scvmm vm nic

Managing the NICs of Arc for SCVMM Virtual Machine.

Extension GA
az scvmm vm nic add

Add a network interface card to a virtual machine.

Extension GA
az scvmm vm nic delete

Delete NICs of a virtual machine.

Extension GA
az scvmm vm nic list

Retrieve the list of NICs present in a VM.

Extension GA
az scvmm vm nic show

Get the details of a NIC present in a VM.

Extension GA
az scvmm vm nic update

Update a NIC of a VM.

Extension GA
az scvmm vm nic wait

Place the CLI in a waiting state until a condition of the vm nic is met.

Extension GA
az scvmm vm restart

Restart a VM.

Extension GA
az scvmm vm restore-checkpoint

Restore VM checkpoint.

Extension GA
az scvmm vm show

Get details of an VM.

Extension GA
az scvmm vm start

Start a VM.

Extension GA
az scvmm vm stop

Stop a VM.

Extension GA
az scvmm vm update

Update a VM. Management of VM disks and NICs are not using this subcommand. There are separate subcommands for the same.

Extension GA
az scvmm vm wait

Place the CLI in a waiting state until a condition of the vm is met.

Extension GA

az scvmm vm create

Create VM resource.

az scvmm vm create --custom-location
                   --name
                   --resource-group
                   [--admin-password]
                   [--availability-sets]
                   [--cloud]
                   [--cpu-count]
                   [--disk]
                   [--dynamic-memory-enabled {false, true}]
                   [--dynamic-memory-max]
                   [--dynamic-memory-min]
                   [--inventory-item]
                   [--location]
                   [--memory-size]
                   [--nic]
                   [--no-wait]
                   [--tags]
                   [--vm-template]
                   [--vmmserver]

Examples

Enable an exiting VM to azure.

az scvmm vm create --subscription contoso-sub --resource-group contoso-rg --location eastus --custom-location contoso-cl --inventory-item 01234567-0123-0123-0123-0123456789ab --name contoso-vm

Create a new VM in vmmserver using a VM Template

az scvmm vm create --subscription contoso-sub --resource-group contoso-rg --location eastus --custom-location contoso-cl --vm-template contoso-vmtemplate --cloud contoso-cloud --name contoso-vm

Create a new VM specifying some template overrides

az scvmm vm create --subscription contoso-sub --resource-group contoso-rg --location eastus --custom-location contoso-cl --vm-template contoso-vmtemplate --cloud contoso-cloud --name contoso-vm --cpu-count 2 --memory-size 2048 --dynamic-memory-enabled true --disk name=disk_1 disk-size=2 bus=0 --nic name=nic_1 network=contoso-vnet

Required Parameters

--custom-location

Name or ID of the custom location that will manage this resource.

--name -n

Name of the resource.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--admin-password

Admin password for the vm.

--availability-sets -a

List of the name or the ID of the availability sets for the vm.

--cloud -c

Name or ID of the cloud for deploying the vm.

--cpu-count

Number of desired vCPUs for the vm.

--disk

Disk overrides for the vm.Usage: --disk name=<> disk-size=<> template-disk-id=<> bus-type=<> bus=<> lun=<> vhd-type=<> qos-name=<> qos-id=<>.

--dynamic-memory-enabled

If dynamic memory should be enabled.

Accepted values: false, true
--dynamic-memory-max

DynamicMemoryMax in MBs for the vm.

--dynamic-memory-min

DynamicMemoryMin in MBs for the vm.

--inventory-item -i

Name or ID of the inventory item.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--memory-size

Desired memory size in MBs for the vm.

--nic

Network overrides for the vm.Usage: --nic name=<> network=<> ipv4-address-type=<> ipv6-address-type=<> mac-address-type=<> mac-address=<>.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--vm-template -t

Name or ID of the vm template for deploying the vm.

--vmmserver -v

Name or ID of the vmmserver that is managing this resource.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm create-checkpoint

Create a VM checkpoint.

az scvmm vm create-checkpoint --checkpoint-description
                              --checkpoint-name
                              [--ids]
                              [--name]
                              [--no-wait]
                              [--resource-group]
                              [--subscription]

Examples

Create VM checkpoint

az scvmm vm create-checkpoint --subscription contoso-sub --resource-group contoso-rg --name contoso-vm --checkpoint-name contoso-chkpt-name --checkpoint-description contoso-chkpt-description

Required Parameters

--checkpoint-description

Description of the checkpoint to be created.

--checkpoint-name

Name of the checkpoint to be created.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the resource.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm delete

Delete VM resource.

az scvmm vm delete [--delete-from-host]
                   [--delete-machine]
                   [--deleteFromHost]
                   [--force]
                   [--ids]
                   [--name]
                   [--no-wait]
                   [--resource-group]
                   [--retain]
                   [--subscription]
                   [--yes]

Examples

Delete a VM by ARM ID from both azure and VMM

az scvmm vm delete --ids /subscriptions/01234567-0123-0123-0123-0123456789ab/resourceGroups/contoso-rg/providers/Microsoft.ScVmm/virtualMachines/contoso-vm

Delete a VM by name from both azure and VMM

az scvmm vm delete --subscription contoso-sub --resource-group contoso-rg --name contoso-avset

Disable a VM from azure retaining the actual VM in the VMM infra

az scvmm vm delete --subscription contoso-sub --resource-group contoso-rg --name contoso-avset --retain

Force delete the VM ARM resource

az scvmm vm delete --subscription contoso-sub --resource-group contoso-rg --name contoso-avset --force

Delete the VM from SCVMM

az scvmm vm delete --subscription contoso-sub --resource-group contoso-rg --name contoso-avset --deleteFromHost

Optional Parameters

--delete-from-host

Delete the VM from the VMware host.

--delete-machine

Delete the parent Microsoft.HybridCompute Machine resource.

--deleteFromHost
Deprecated

Argument 'deletefromhost' has been deprecated and will be removed in a future release. Use '--delete-from-host' instead.

Delete the VM from the SCVMM.

--force

Force delete the azure resource.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the resource.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--retain
Deprecated

Argument 'retain' has been deprecated and will be removed in a future release.

Disable the VM from azure but retain the VM in VMM.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm delete-checkpoint

Delete the specified VM checkpoint.

az scvmm vm delete-checkpoint --checkpoint-id
                              [--ids]
                              [--name]
                              [--no-wait]
                              [--resource-group]
                              [--subscription]

Examples

Delete VM checkpoint

az scvmm vm delete-checkpoint --subscription contoso-sub --resource-group contoso-rg --name contoso-vm --checkpoint-id checkpoint-guid

Required Parameters

--checkpoint-id

Checkpoint UUID.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the resource.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm list

Deprecated

This command has been deprecated and will be removed in a future release. Use 'scvmm vm show' instead.

Retrieve a list of VMs.

az scvmm vm list [--resource-group]

Examples

Retrieve a list of VMs present in a resource group

az scvmm vm list --subscription contoso-sub --resource-group contoso-rg

Retrieve a list of VMs present in a subscription

az scvmm vm list --subscription contoso-sub

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm restart

Restart a VM.

az scvmm vm restart [--ids]
                    [--name]
                    [--no-wait]
                    [--resource-group]
                    [--subscription]

Examples

Restart a vm

az scvmm vm restart --subscription contoso-sub --resource-group contoso-rg --name contoso-vm

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the resource.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm restore-checkpoint

Restore VM checkpoint.

az scvmm vm restore-checkpoint --checkpoint-id
                               [--ids]
                               [--name]
                               [--no-wait]
                               [--resource-group]
                               [--subscription]

Examples

Restore VM checkpoint

az scvmm vm restore-checkpoint --subscription contoso-sub --resource-group contoso-rg --name contoso-vm --checkpoint-id checkpoint-guid

Required Parameters

--checkpoint-id

Checkpoint UUID.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the resource.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm show

Get details of an VM.

az scvmm vm show [--ids]
                 [--name]
                 [--resource-group]
                 [--subscription]

Examples

Get details of an VM by ARM ID

az scvmm vm show --ids /subscriptions/01234567-0123-0123-0123-0123456789ab/resourceGroups/contoso-rg/providers/Microsoft.ScVmm/virtualMachines/contoso-vm

Get details of an VM by name

az scvmm vm show --subscription contoso-sub --resource-group contoso-rg --name contoso-vm

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the resource.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm start

Start a VM.

az scvmm vm start [--ids]
                  [--name]
                  [--no-wait]
                  [--resource-group]
                  [--subscription]

Examples

Start a vm

az scvmm vm start --subscription contoso-sub --resource-group contoso-rg --name contoso-vm

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the resource.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm stop

Stop a VM.

az scvmm vm stop [--ids]
                 [--name]
                 [--no-wait]
                 [--resource-group]
                 [--skip-shutdown {false, true}]
                 [--subscription]

Examples

Shut down the VM gracefully

az scvmm vm stop --subscription contoso-sub --resource-group contoso-rg --name contoso-vm

Power off the VM

az scvmm vm stop --subscription contoso-sub --resource-group contoso-rg --name contoso-vm --skip-shutdown

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the resource.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--skip-shutdown

Skip shutdown and power-off immediately.

Accepted values: false, true
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm update

Update a VM. Management of VM disks and NICs are not using this subcommand. There are separate subcommands for the same.

az scvmm vm update [--availability-sets]
                   [--cpu-count]
                   [--dynamic-memory-enabled {false, true}]
                   [--dynamic-memory-max]
                   [--dynamic-memory-min]
                   [--ids]
                   [--memory-size]
                   [--name]
                   [--no-wait]
                   [--resource-group]
                   [--subscription]
                   [--tags]

Examples

Update a VM to have 2 vCPUs and 4GB Memory.

az scvmm vm update --subscription contoso-sub --resource-group contoso-rg --name contoso-vm --cpu-count 2 --memory-size 4096 --tags department=Sales

Optional Parameters

--availability-sets -a

List of the name or the ID of the availability sets for the vm.

--cpu-count

Number of desired vCPUs for the vm.

--dynamic-memory-enabled

If dynamic memory should be enabled.

Accepted values: false, true
--dynamic-memory-max

DynamicMemoryMax in MBs for the vm.

--dynamic-memory-min

DynamicMemoryMin in MBs for the vm.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--memory-size

Desired memory size in MBs for the vm.

--name -n

Name of the resource.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az scvmm vm wait

Place the CLI in a waiting state until a condition of the vm is met.

az scvmm vm wait --resource-group
                 --virtual-machine-name
                 [--created]
                 [--custom]
                 [--deleted]
                 [--exists]
                 [--interval]
                 [--timeout]
                 [--updated]

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--virtual-machine-name

Name of the VirtualMachine.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--interval

Polling interval in seconds.

Default value: 30
--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.