Deleting VMs and VMDKs
When you no longer need a VM created by a restore, clean it up. Cleaning up means deleting the VM and removing the LUN mapping and the LUNs. Deleting LUNs frees up disk space on the storage system. If you delete VMs without removing the LUNs, significant space on the secondary storage becomes unavailable over time.
For VMs created with Instant Virtualization or Instant VM Restore, deleting the VM through DPX also deletes the associated LUN mapping and LUNs, freeing up disk space on the secondary volume.
Deleting a VM or a VMDK cannot be undone. Confirm the selection before you start.
You can delete VMs in either of the following ways:
- The Delete VM/VMDK Wizard – the standard method. It deletes either an entire VM or selected VMDKs. Beyond removing the VM or the disks, it cleans up the LUN relationships, reclaims the LUN space on secondary storage, and removes temporary FlexClone volumes.
- The DeleteVM utility – a command-driven method you can use to include VM deletion in a script. It deletes only an entire VM, not specific VMDKs.
Considerations for Deleting VMs
- Successful agent-based RRP and Full Virtualization, as well as agentless Full Restore, release the LUNs automatically, so no cleanup is needed.
- If VMs or VMDKs are deleted with vSphere Client, Catalogic DPX cannot remove the LUNs.
- You can delete any VM or VMDK, not only those created by Catalogic DPX.
- The wizard handles one VM per run. To delete additional VMs, or VMDKs on a different VM, run it again.
- Deleting requires a vCenter user name and password, which you supply in the last step of the wizard.
- The ESXi server or vCenter hosting the VM or VMDK to be deleted must be a node in the Catalogic DPX Enterprise. See Adding Other Node Types to the Master Server.
- Avoid using Storage vMotion to migrate VMs created with Instant Virtualization or Instant VM Restore. In such cases, Catalogic DPX does not track the LUNs and cannot remove them when it deletes the VM or VMDK.
Delete VM/VMDK Wizard
To open the Delete VM/VMDK Wizard from Agentless VMware Restore:
- On the Function Tab Bar, click Restore.
- On the task panel, click Agentless VMware, then click Delete VM/VMDK Wizard.
To open the Delete VM/VMDK Wizard from agent-based virtualization:
- On the Function Tab Bar, click Restore, then click Block.
- Click Next, then on the task panel, click Delete VM/VMDK Wizard.
To use the Delete VM/VMDK Wizard:
-
On the Welcome page, click Next.
-
The Select Virtual Machine page displays a source tree. Expand the datacenter to display the VMs and select one. Click Next.
-
On the Select VMDKs page, choose what to delete:
- To delete the entire VM selected on the previous page, click Next. To see the VMDKs first, wait for the VMDK Information list to populate before clicking Next.
- To delete selected VMDKs, select the Select VMDKs to delete check box. When the VMDK Information list is populated, select the VMDKs to delete, then click Next.
-
The Confirm page displays the name of the VM selected for deletion, and the VM host name in the vCenter Authentication section. Enter a valid user name and password for the vCenter, then click Authenticate. After a message confirms that vCenter authentication succeeded, click Delete.
DeleteVM Utility
Use the DeleteVM command to include VM deletion in a script.
To run the DeleteVM utility:
- Open the Catalogic DPX command prompt (Start > Programs > DPX > DPX Command Prompt).
- Enter
DeleteVMfollowed by its parameters:
DeleteVM <virtual-controller-name-IP> <virtual-controller-username> <virtual-controller-password> <vm-datacenter> <vm-pathname> <secondary-name-IP> <secondary-username> <secondary-password>
An explanation of each parameter follows:
| virtual-controller-name-IP | The IP address or resolvable name of the ESXi server or vCenter Server. |
| virtual-controller-username | The user name to log on to the ESXi server or vCenter Server. |
| virtual-controller-password | The password to log on to the ESXi server or vCenter Server. |
| vm-datacenter | The datacenter to which the VM belongs. |
| vm-pathname | The full VM pathname in VM View of the VM to be deleted. |
| secondary-name-IP | The IP address or resolvable name of the secondary storage holding the snapshot used for virtualization. |
| secondary-username | The user name to log on to the secondary storage. |
| secondary-password | The password to log on to the secondary storage. |
Enclose any parameter that contains spaces in quotation marks, and write the full VM pathname with forward slashes, as VMware requires.
If an agentless backup job is no longer needed, first remove the associated DPX backup instances to reclaim secondary storage space, and then delete the job to clean up the Catalog.