Removing and deleting a VM are two different but straightforward procedures that lead to different results. Removing a VM from the inventory doesn't delete the VM (the files remain in the same location in storage), but removes its view from the inventory, and it won't be listed anymore. Removing a VM from the inventory can be useful if you want to remove a no-longer-used VM, but you want to keep the data.
To remove a VM, the VM must be powered off. The procedure is quite simple:
- Right-click on the VM to remove and select the Remove from Inventory option.
- Click YES to confirm the removal:
When you delete a VM instead, all VM files are removed from the datastore with no way to recover them if the deletion is done by mistake. How do we recover a VM that has been deleted accidentally? From the backup.
The deletion procedure is similar to what we just saw:
- Right-click the powered-off VM (this option will be grayed out if the VM is still running) to delete and select the Delete from Disk option.
- Click YES to confirm the deletion: