az connectedvmware vm
Note
This reference is part of the connectedvmware extension for the Azure CLI (version 2.0.67 or higher). The extension will automatically install the first time you run an az connectedvmware vm command. Learn more about extensions.
Vm resource.
Commands
Name | Description | Type | Status |
---|---|---|---|
az connectedvmware vm create |
Create VMInstance resource. |
Extension | GA |
az connectedvmware vm create-from-machines |
Create VMInstance resource(s) from existing Microsoft.HybridCompute machines. |
Extension | GA |
az connectedvmware vm delete |
Delete vm resource. |
Extension | GA |
az connectedvmware vm disk |
Vm disk. |
Extension | GA |
az connectedvmware vm disk add |
Add virtual disk to a virtual machine. |
Extension | GA |
az connectedvmware vm disk delete |
Delete virtual disks to a virtual machine. |
Extension | GA |
az connectedvmware vm disk list |
Retrieve a list of vm disk from given resource group name and vm name. |
Extension | GA |
az connectedvmware vm disk show |
Get details of a vm disk by it's name, resource-group and vm name. |
Extension | GA |
az connectedvmware vm disk update |
Update virtual disk to a virtual machine. |
Extension | GA |
az connectedvmware vm extension |
Manage vm extension with connectedvmware. |
Extension | GA |
az connectedvmware vm extension create |
The operation to create the extension. |
Extension | GA |
az connectedvmware vm extension delete |
The operation to delete the extension. |
Extension | GA |
az connectedvmware vm extension list |
The operation to get all extensions of a non-Azure vm. |
Extension | GA |
az connectedvmware vm extension show |
The operation to get the extension. |
Extension | GA |
az connectedvmware vm extension update |
The operation to update the extension. |
Extension | GA |
az connectedvmware vm guest-agent |
Vm guest agent. |
Extension | GA |
az connectedvmware vm guest-agent enable |
Enable guest agent on the vm. |
Extension | GA |
az connectedvmware vm guest-agent show |
Get details of a guest agent by guest agent name, resource-group and vm name. |
Extension | GA |
az connectedvmware vm list |
Retrieve a list of vm of given resource group. |
Extension | Deprecated |
az connectedvmware vm nic |
Vm nic. |
Extension | GA |
az connectedvmware vm nic add |
Add virtual nic to a virtual machine. |
Extension | GA |
az connectedvmware vm nic delete |
Delete virtual nic to a virtual machine. |
Extension | GA |
az connectedvmware vm nic list |
Retrieve a list of vm nic from given resource group name and vm name. |
Extension | GA |
az connectedvmware vm nic show |
Get details of a vm nic by it's name, resource-group and vm name. |
Extension | GA |
az connectedvmware vm nic update |
Update virtual network interface of a virtual machine. |
Extension | GA |
az connectedvmware vm restart |
Restart vm resource. |
Extension | GA |
az connectedvmware vm show |
Get details of a vm by id, resource-group, reource pool name or subscription. |
Extension | GA |
az connectedvmware vm start |
Start vm resource. |
Extension | GA |
az connectedvmware vm stop |
Stop vm resource. |
Extension | GA |
az connectedvmware vm update |
Update vm resource. |
Extension | GA |
az connectedvmware vm create
Create VMInstance resource.
az connectedvmware vm create [--admin-password]
[--admin-username]
[--cluster]
[--custom-location]
[--datastore]
[--disk]
[--host]
[--inventory-item]
[--location]
[--machine-id]
[--memory-size]
[--mo-name]
[--name]
[--nic]
[--no-wait]
[--num-CPUs]
[--num-cores-per-socket]
[--resource-group]
[--resource-pool]
[--tags]
[--vcenter]
[--vm-template]
Examples
Create vm
az connectedvmware vm create --inventory-item "name or id of the inventory item" --name "virtual machine name" --resource-group "resource group name" --vcenter "name or id of the vcenter"
Enable an exiting VM to azure.
az connectedvmware vm create --subscription contoso-sub --resource-group contoso-rg --inventory-item /subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/contoso-rg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/contoso-vc/InventoryItems/vm-123456 --name contoso-vm
Enable an exiting VM using moName.
az connectedvmware vm create --subscription contoso-sub --resource-group contoso-rg --vcenter contoso-vcenter --mo-name contoso-moname --name contoso-vm
Link an HCRP Machine to a vCenter in another subscription using the machine id.
az connectedvmware vm create --machine-id /subscriptions/01234567-0123-0123-0123-0123456789ab/resourceGroups/contoso-rg/providers/Microsoft.HybridCompute/machines/contoso-vm --vcenter /subscriptions/fedcba98-7654-3210-0123-456789abcdef/resourceGroups/contoso-rg/providers/Microsoft.ConnectedVMwareVsphere/vcenters/contoso-vcenter
Link an HCRP Machine to a vCenter in another subscription using the machine name.
az connectedvmware vm create --resource-group contoso-rg --name hcrp-contoso-machine --vcenter /subscriptions/fedcba98-7654-3210-0123-456789abcdef/resourceGroups/contoso-rg/providers/Microsoft.ConnectedVMwareVsphere/vcenters/contoso-vcenter
Link an HCRP Machine to a vCenter in the same subscription and resource group.
az connectedvmware vm create --resource-group contoso-rg --name hcrp-contoso-machine --vcenter contoso-vcenter
Optional Parameters
Admin password for the vm.
Admin username for the vm.
Name or ID of the cluster for deploying the VM.
Name or ID of the custom location that will manage this resource.
Name or ID of the datastore for deploying the VM.
Disk overrides for the vm. Usage: --disk name=<> disk-size=<> disk-mode=<> controller-key=<> device-key=<> unit-number=<>.
Name or ID of the host for deploying the VM.
Name or ID of the inventory item.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
ARM ID of the Microsoft.HybridCompute Machine resource which you want to link to vCenter.
Desired memory size in MBs for the vm.
Name of the resource in the VCenter.
Name of the HCRP Machine resource.
Network overrides for the vm. Usage: --nic name=<> network=<> nic-type=<> power-on-boot=<> allocation-method=<> ip-address=<> subnet-mask=<> device-key=<> gateway=.
Do not wait for the long-running operation to finish.
Number of desired vCPUs for the vm.
Number of desired cores per socket for the vm.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of the resource pool for deploying the vm.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Name or ID of the vCenter that is managing this resource.
Name or ID of the vm template for deploying the vm.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az connectedvmware vm create-from-machines
Create VMInstance resource(s) from existing Microsoft.HybridCompute machines.
az connectedvmware vm create-from-machines --vcenter-id
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Create VMware resources from the specified Arc for Servers machine in the vCenter
az connectedvmware vm create-from-machines --resource-group contoso-rg --name contoso-vm --vcenter-id /subscriptions/fedcba98-7654-3210-0123-456789abcdef/resourceGroups/contoso-rg-2/providers/Microsoft.ConnectedVMwareVsphere/vcenters/contoso-vcenter
Creates VMware resources from all Arc for Servers machines in the specified resource group belonging to that vCenter
az connectedvmware vm create-from-machines --resource-group contoso-rg --vcenter-id /subscriptions/fedcba98-7654-3210-0123-456789abcdef/resourceGroups/contoso-rg-2/providers/Microsoft.ConnectedVMwareVsphere/vcenters/contoso-vcenter
Create VMware resources from all Arc for Servers machines in the specified subscription belonging to that vCenter
az connectedvmware vm create-from-machines --subscription contoso-sub --vcenter-id /subscriptions/fedcba98-7654-3210-0123-456789abcdef/resourceGroups/contoso-rg-2/providers/Microsoft.ConnectedVMwareVsphere/vcenters/contoso-vcenter
Required Parameters
ARM ID of the vCenter to which the machines will be linked.
Optional Parameters
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 of the Microsoft.HybridCompute Machine resource. Provide this parameter if you want to convert a single machine to VMware VM.
Name of the resource group which will be scanned for HCRP machines. NOTE: The default group configured using 'az configure --defaults group=' is not used, and it must be specified explicitly.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az connectedvmware vm delete
Delete vm resource.
az connectedvmware vm delete [--delete-from-host]
[--delete-machine]
[--force]
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--retain]
[--retain-machine]
[--subscription]
[--yes]
Examples
Delete vm
az connectedvmware vm delete --ids "resource id" --name "virtual machine name" --resource-group "resource group name" --subscription "Name or ID of subscription"
Optional Parameters
Delete the VM from the VMware host.
Argument 'delete_machine' has been deprecated and will be removed in a future release.
Delete the parent Microsoft.HybridCompute Machine resource.
Whether force delete or not.
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 of the resource.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Argument 'retain' has been deprecated and will be removed in a future release.
Retain the VM in the VMWare host.
Retain the parent Microsoft.HybridCompute Machine resource.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az connectedvmware vm list
This command has been deprecated and will be removed in a future release. Use 'az connectedvmware vm show' instead.
Retrieve a list of vm of given resource group.
az connectedvmware vm list [--resource-group]
Examples
Retrieve a list of vm resource
az connectedvmware vm list --resource-group "resource group name"
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az connectedvmware vm restart
Restart vm resource.
az connectedvmware vm restart [--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Examples
Restart vm
az connectedvmware vm restart --ids "resource id" --name "virtual machine name" --resource-group "resource group name" --subscription "Name or ID of subscription"
Optional Parameters
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 of the resource.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az connectedvmware vm show
Get details of a vm by id, resource-group, reource pool name or subscription.
az connectedvmware vm show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Get details of a vm resource
az connectedvmware vm show --ids "resource id" --name "vm template name" --resource-group "resource group name" --subscription "Name or ID of subscription"
Optional Parameters
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 of the resource.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az connectedvmware vm start
Start vm resource.
az connectedvmware vm start [--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Examples
Start vm
az connectedvmware vm start --ids "resource id" --name "virtual machine name" --resource-group "resource group name" --subscription "Name or ID of subscription"
Optional Parameters
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 of the resource.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az connectedvmware vm stop
Stop vm resource.
az connectedvmware vm stop [--ids]
[--name]
[--no-wait]
[--resource-group]
[--skip-shutdown]
[--subscription]
Examples
Stop vm
az connectedvmware vm stop --ids "resource id" --name "virtual machine name" --resource-group "resource group name" --subscription "Name or ID of subscription"
Optional Parameters
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 of the resource.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Skips shutdown and power-off immediately.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az connectedvmware vm update
Update vm resource.
az connectedvmware vm update [--ids]
[--memory-size]
[--name]
[--no-wait]
[--num-CPUs]
[--num-cores-per-socket]
[--resource-group]
[--subscription]
[--tags]
Examples
Update vm
az connectedvmware vm update --ids "resource id" --name "virtual machine name" --resource-group "resource group name" --subscription "Name or ID of subscription" --memory-size "vm memory size in MB" --num-CPUs "no. of CPUs"
Optional Parameters
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.
Desired memory size in MBs for the vm.
Name of the resource.
Do not wait for the long-running operation to finish.
Number of desired vCPUs for the vm.
Number of desired cores per socket for the vm.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.