az csvmware vm

Manage VMware virtual machines.

Commands

az csvmware vm create

Create a VMware virtual machine.

az csvmware vm delete

Delete a VMware virtual machine.

az csvmware vm disk

Manage VMware virtual machine's disks.

az csvmware vm disk add

Add disk to a VMware virtual machine.

az csvmware vm disk delete

Delete disks from a VM.

az csvmware vm disk list

List details of disks available on a VMware virtual machine.

az csvmware vm disk show

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

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.

az csvmware vm nic

Manage VMware virtual machine's Network Interface Cards.

az csvmware vm nic add

Add NIC to a VMware virtual machine.

az csvmware vm nic delete

Delete NICs from a VM.

az csvmware vm nic list

List details of NICs available on a VMware virtual machine.

az csvmware vm nic show

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

az csvmware vm show

Get the details of a VMware virtual machine.

az csvmware vm start

Start a VMware virtual machine.

az csvmware vm stop

Stop/Reboot/Suspend a VMware virtual machine.

az csvmware vm update

Update the tags field of a VMware virtual machine.

az csvmware vm create

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.

--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.

--ram

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

az csvmware vm delete

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>.

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.

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>.

az csvmware vm show

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>.

az csvmware vm start

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>.

az csvmware vm stop

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>.

az csvmware vm update

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>.

--force-string

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

--no-wait

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

--remove

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

--set

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