Previous Topic: dpmvc-removedatastore Command--Remove a Datastore (Funclet)Next Topic: dpmvc-removevmvnic Command--Remove Virtual NIC (Funclet)


dpmvc-removevmvdisk Command--Remove Virtual Disk (Funclet)

The dpmvc-removevmvdisk command removes a virtual disk from a VM.

This command has the following format:

dpmvc-removevmvdisk 
[-datacenter_name datacentername]
-vm_name vmname
-vc_server vcservername
-disk_device_key diskdevicekey
-delete_data {yes | no}
-datacenter_name datacentername

(Optional) Specifies the data center where the VM is located.

-vm_name vmname

Specifies the VM.

-vc_server vcservername

Specifies the vCenter Server to access when you have multiple vCenter Servers. Optional for single vCenter Server environments.

-disk_device_key diskdevicekey

Integer that specifies the device key of the disk, for example, 2000.

-delete_data {yes | no}

Indicates whether to delete data while deleting a disk.

Example: Remove a Virtual Disk

This example removes virtual disk with the device key of 2000 from the myvm VM.

dpmvc-removevmvdisk -vm_name myvm -vc_server myvcserver -disk_device_key 2000
-delete_data yes