Previous Topic: dpmhyperv CreateVMFromTemplate Command--Create a VM from a TemplateNext Topic: dpmhyperv ExpandVirtDisk Command--Expand the Size of a Virtual Disk


dpmhyperv DeleteVM Command--Delete a VM

The dpmhyperv DeleteVM command deletes a VM on a Hyper-V host. This command also deletes virtual disks, virtual floppy drives, and ISO images assigned to a VM.

This command has the following format:

dpmhyperv DeleteVM 
[-ws_user username] 
[-ws_password password] 
[-ws_encrypted_password] -hypervHost hostname 
-vm vm_name|-vguid vm_ID 
[-delvhd] 
[-delvfd] 
[-deliso] 
[-pre] 
[-post]
[-locale iso639value]
-ws_user username

(Optional) Specifies the CA Virtual Assurance user name.

-ws_password password

(Optional) Specifies the CA Virtual Assurance user password.

-ws_encrypted_password

(Optional) Indicates whether the CA Virtual Assurance password is encrypted.

-hypervHost hostname

Specifies the name of the Hyper-V host.

-vm vm_name

Specifies the VM name.

-vmguid vm_ID

Specifies the unique GUID of the VM.

-delvhd

(Optional) Indicates whether to delete virtual hard drives.

-delvfd

(Optional) Indicates whether to delete virtual floppy disk images associated with the VM.

-deliso

(Optional) Indicates whether to delete virtual CD/DVD images associated with the VM.

-pre

(Optional) Generates an event before the operation is complete.

-post

(Optional) Generates an event after the operation is complete.

-locale iso639value

(Optional) Specifies an IS0 639_3166 combination to override the default English output, for example, fr_FR for French. To use the locale of the command prompt, specify "native".

Example: Delete a VM from a Hyper-V Host

This example deletes the VM with the GUID, "346597794004894538F29B6A-8CE2-42" from the Hyper-V host, "hserver". This command also deletes virtual disks images, virtual floppy drives, and CD/DVD ISO images assigned to the VM.

dpmhyperv DeleteVM -ws_user admin -ws_password #test# -hypervHost hserver -vmguid 38F29B6A-8CE2-42D2-8269-BFED14644376 -delvhd -delvfd -deliso