Κοινή χρήση μέσω


az csvmware vm

Note

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

Command group 'csvmware' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage VMware virtual machines.

Commands

Name Description Type Status
az csvmware vm create

Create a VMware virtual machine.

Extension Preview
az csvmware vm delete

Delete a VMware virtual machine.

Extension Preview
az csvmware vm disk

Manage VMware virtual machine's disks.

Extension Preview
az csvmware vm disk add

Add disk to a VMware virtual machine.

Extension Preview
az csvmware vm disk delete

Delete disks from a VM.

Extension Preview
az csvmware vm disk list

List details of disks available on a VMware virtual machine.

Extension Preview
az csvmware vm disk show

Get the details of a VMware virtual machine's disk.

Extension Preview
az csvmware vm list

List details of VMware virtual machines in the current subscription. If resource group is specified, only the details of virtual machines in that resource group would be listed.

Extension Preview
az csvmware vm nic

Manage VMware virtual machine's Network Interface Cards.

Extension Preview
az csvmware vm nic add

Add NIC to a VMware virtual machine.

Extension Preview
az csvmware vm nic delete

Delete NICs from a VM.

Extension Preview
az csvmware vm nic list

List details of NICs available on a VMware virtual machine.

Extension Preview
az csvmware vm nic show

Get the details of a VMware virtual machine's NIC.

Extension Preview
az csvmware vm show

Get the details of a VMware virtual machine.

Extension Preview
az csvmware vm start

Start a VMware virtual machine.

Extension Preview
az csvmware vm stop

Stop/Reboot/Suspend a VMware virtual machine.

Extension Preview
az csvmware vm update

Update the tags field of a VMware virtual machine.

Extension Preview

az csvmware vm create

Preview

Command group 'csvmware' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a VMware virtual machine.

az csvmware vm create --name
                      --private-cloud
                      --resource-group
                      --resource-pool
                      --template
                      [--cores]
                      [--disk]
                      [--expose-to-guest-vm {false, true}]
                      [--location]
                      [--nic]
                      [--ram]

Examples

Creating a VM with default parameters from the vm template.

az csvmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate

Creating a VM and adding an extra nic to the VM with virtual network MyVirtualNetwork, adapter VMXNET3, that power ups on boot. The name entered in the nic is for identification purposes only, to see if such a nic name exists in the vm template, else a nic is created and a new name is assigned. Lets say the vm template contains a nic with name "Network adapter 1".

az csvmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --nic name=NicNameWouldBeAssigned virtual-network=MyVirtualNetwork adapter=VMXNET3 power-on-boot=True

Customizing specific properties of a VM. Changing the number of cores to 2 and adapter of "Network adapter 1" nic to E1000E, from that specified in the template. All other properties would be defaulted from the template.

az csvmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --cores 2 --nic name="Network adapter 1" adapter=E1000E

Customizing specific properties of a VM. Changing the adapter of "Network adapter 1" nic to E1000E, from that specified in the template, and also adding another nic with virtual network MyVirtualNetwork, adapter VMXNET3, that power ups on boot.

az csvmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --nic name="Network adapter 1" adapter=E1000E --nic name=NicNameWouldBeAssigned virtual-network=MyVirtualNetwork adapter=VMXNET3 power-on-boot=True

Creating a VM and adding an extra disk to the VM with SCSI controller 0, persistent mode, and 41943040 KB size. The name entered in the disk is for identification purposes only, to see if such a disk name exists in the vm template, else a disk is created and a new name is assigned. Lets say the vm template contains a disk with name "Hard disk 1".

az csvmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --disk name=DiskNameWouldBeAssigned controller=1000 mode=persistent size=41943040

Customizing specific properties of a VM. Changing the size of "Hard disk 1" disk to 21943040 KB, from that specified in the template, and also adding another disk with SCSI controller 0, persistent mode, and 41943040 KB size.

az csvmware vm create -n MyVm -g MyResourceGroup -p MyPrivateCloud -r MyResourcePool --template MyVmTemplate --disk name="Hard disk 1" size=21943040 --disk name=DiskNameWouldBeAssigned controller=1000 mode=persistent size=41943040

Required Parameters

--name -n

Name of the virtual machine.

--private-cloud -p

Name or ID of the CloudSimple private cloud.

--resource-group -g

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

--resource-pool -r

ID of the VMware resource pool for this virtual machine in your CloudSimple Private Cloud. You can also pass the basename of the ID.

--template

ID of the vSphere template from which this virtual machine will be created. You can also pass the basename of the ID.

Optional Parameters

--cores

The number of CPU cores required. The default is taken from the vSphere VM template specified.

--disk

Add or modify disks.

By default, the disks will be added according to the vSphere VM template. You can add more disks, or modify some properties of a disk specified in the VM template. Multiple disks can be specified by using more than one --disk argument. If a disk name already exists in the VM template, that disk would be modified according to the user input. If a disk name does not exist in the VM template, a new disk would be created and a new name will be assigned to it. Usage: --disk name=MyDiskName controller=SCSIControllerID mode=IndependenceMode size=DiskSizeInKB.

--expose-to-guest-vm

Will expose full CPU virtualization to the guest operating system. The default is taken from the vSphere VM template specified.

Accepted values: false, true
--location -l

Region in which the private cloud is present. If default location is not configured, will default to the resource group's location.

--nic

Add or modify NICs.

By default, the nics will be added according to the vSphere VM template. You can add more nics, or modify some properties of a nic specified in the VM template. Multiple nics can be specified by using more than one --nic argument. If a nic name already exists in the VM template, that nic would be modified according to the user input. If a nic name does not exist in the VM template, a new nic would be created and a new name will be assigned to it. Usage: --nic name=MyNicName virtual-network=MyNetwork adapter=MyAdapter power-on-boot=True/False.

--ram

The amount of memory in MB. The default is taken from the vSphere VM template specified.

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 csvmware vm delete

Preview

Command group 'csvmware' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a VMware virtual machine.

az csvmware vm delete --name
                      --resource-group

Examples

Delete a VMware VM.

az csvmware vm delete -n MyVm -g MyResourceGroup

Required Parameters

--name -n

Name of the virtual machine.

--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 csvmware vm list

Preview

Command group 'csvmware' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List details of VMware virtual machines in the current subscription. If resource group is specified, only the details of virtual machines in that resource group would be listed.

az csvmware vm list [--resource-group]

Examples

List details of VMware VMs in the current subscription.

az csvmware vm list

List details of VMware VMs in a particular resource group.

az csvmware vm list -g MyResourceGroup

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 csvmware vm show

Preview

Command group 'csvmware' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get the details of a VMware virtual machine.

az csvmware vm show --name
                    --resource-group

Examples

Get the details of a VMware VM.

az csvmware vm show -n MyVm -g MyResourceGroup

Required Parameters

--name -n

Name of the virtual machine.

--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 csvmware vm start

Preview

Command group 'csvmware' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Start a VMware virtual machine.

az csvmware vm start --name
                     --resource-group

Examples

Start a VMware VM.

az csvmware vm start -n MyVm -g MyResourceGroup

Required Parameters

--name -n

Name of the virtual machine.

--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 csvmware vm stop

Preview

Command group 'csvmware' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Stop/Reboot/Suspend a VMware virtual machine.

az csvmware vm stop --mode {poweroff, reboot, shutdown, suspend}
                    --name
                    --resource-group

Examples

Power off a VMware VM.

az csvmware vm stop -n MyVm -g MyResourceGroup --mode poweroff

Restart a VMware VM.

az csvmware vm stop -n MyVm -g MyResourceGroup --mode reboot

Required Parameters

--mode

Stop mode.

Accepted values: poweroff, reboot, shutdown, suspend
--name -n

Name of the virtual machine.

--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 csvmware vm update

Preview

Command group 'csvmware' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update the tags field of a VMware virtual machine.

az csvmware vm update --name
                      --resource-group
                      [--add]
                      [--force-string]
                      [--no-wait]
                      [--remove]
                      [--set]

Examples

Add or update a tag.

az csvmware vm update -n MyVm -g MyResourceGroup --set tags.tagName=tagValue

Remove a tag.

az csvmware vm update -n MyVm -g MyResourceGroup --remove tags.tagName

Required Parameters

--name -n

Name of the virtual machine.

--resource-group -g

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

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

Default value: []
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Default value: False
--no-wait

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

Default value: False
--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Default value: []
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Default value: []
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.