How to Remove VM from Inventory or Delete from Disk

How to remove a virtual machine or its files correctly? Many users are confused by the difference between removing from inventory and deleting from disk. Today I will give a specific explanation and the steps to do so.

Crystal

By Crystal / Updated on March 8, 2023

Share this: instagram reddit

VMware remove from inventory vs delete from disk

What confuses many users is that why the virtual machine files are still retained in datastore when they deleted a VM in VMware ESXi. How to remove a VM completely? The main reason for this problem is the difference between deleting from inventory and deleting from disk. Next, we will describe the specific differences and steps.

Remove from Inventory – This option unregisters the VM from the host and the vCenter Server inventory, but the VM's files remain on the datastore. So it means that you can still access the VM directly and access its data if you wish. It will not show up under vCenter, and therefore it is not possible to manage isolated virtual machines from vCenter.

Delete from Disk – This option in VMware removes the VM from the inventory and delete its files from the datastore. In other words, this option is permanent and non-reversible deletion of the VM and its constituent datastore from the ESXi Host. It means that you will not able to recover either the VM or the data once this option has been exercised.

remove from inventory vmware

If you want to delete the virtual machine and its files permanently, you should select "delete from disk". If you want to just remove the virtual machine under vCenter and keep the files for future re-registration, it is recommended that you select “remove from inventory” in VMware.

How to remove a virtual machine from vCenter inventory

Next, I will introduce how to remove a virtual machine in the VMware vSphere web interface.

1. In the web interface of VMware vSphere Client, select Hosts and Clusters under Navigator panel.

2. Select the virtual machine you want to remove.

Tips: Power off the virtual machine first. Right-click the VM, then select Power >> Shut Down Guest OS.

3. In the drop-down list, select remove from Inventory / delete from disk. If you select “delete from disk”, you'll get a prompt asking if you are sure, and if you are it will remove VM from inventory and delete all the files associated with that VM.

remove vm from inventory

Then VM will be removed and no longer be displayed in the list of virtual machines.

Updated: Remove a host from vCenter inventory

If you want to take a host out of vCenter Server monitoring and management, you can follow the steps to remove a managed host from vCenter Server.

1. In the vSphere Client, navigate to Home >> Hosts and Clusters.

2. Right-click the host in the inventory, and select Remove from Inventory from the pop-up menu.

3. (Optional) If the host is part of a cluster, put it in maintenance mode.

  • Right-click the host and select Maintenance Mode >> Enter Maintenance Mode.
  • Click OK.

Note: If not all virtual machines on the host are powered off, the host does not enter maintenance mode.
If the host is part of a DRS cluster, when the host enters maintenance mode, DRS attempts to evacuate powered on virtual machines from the host by using vMotion.

4. Click Yes in the confirmation dialog box.

By using these methods above, you can easily remove VM from inventory or delete VM from disk. But you need to be extra careful when handling it in case of misoperation. For example, if you meant to remove a VM from inventory but accidentally deleted it from disk, you could face serious data loss.

To prevent this, and the VM loss or corruption caused some other reasons, pre-backup is still the safest way to go. When using virtual machines on a daily basis, it's always recommended to adopt a reliable VMware backup solution. Next, I will show you how to back up VMware ESXi virtual machines via a free VM backup software.

Important: Backup VMware VMs to prevent accidental deletion

VMware built-in features are commonly used for VM backup, in these ways you can manually back up VMs one by one. However, enterprise requires a more efficient and convenient way to centrally backup multiple VMware ESXi virtual machines. For example, a free VMware backup tool – AOMEI Cyber Backup offers centralized VM backup for VMware VMs, which saves you a lot of time and reduces business downtime.

With the reliable backup solution, you can enjoy the following features:

Support Free ESXi: support both paid and free versions of VMware ESXi.
Easy-to-use: backup and restore multiple virtual machines via central console without complicated configuration and reinstallation.
Automated VM Backup: schedule flexible backup strategies to automate backups daily, weekly, monthly.
Role Assignment: allows one administrator to create subaccounts with limited privileges.
Instant Restore: restore immediately available VMs from any selected restore points.

Please hit the button below to download and use AOMEI Cyber Backup for free:

Download FreewareVMware ESXi & Hyper-V
Secure Download

*You can choose to install this VM backup software on either Windows or Linux system.

1. Bind Devices: Access to AOMEI Cyber Backup web client, navigate to Source Device >> VMware >> Add VMware Device to Add vCenter or Standalone ESXi.

add VMware ESXi

2. Create Backup Task: Navigate to Backup Task >> Create New Task, and then configure Backup Type, Device, Target, and Schedule.

Device: Cover multiple VMs on the host within one backup task.

select VMware ESXi VMs

Target: Select to back up to a local path, or to a network path.

select backup target

Schedule: Choose to perform the full, differential or incremental backup, and automate execution according to the frequency you specified.

schedule VMware VM backup

3. Run Backup: Click Start Backup and select Add the schedule and start backup now, or Add the schedule only.

✍ While the Free Edition covers most of VM backup needs, you can also upgrade to enjoy advanced features:
Backup Cleanup: Configure retention policy to auto delete the old backup files and save storage space.
Restore to new location: Easily make a clone of a virtual machine in the same or another datastore/host, without reinstalling or configuring a new VM.

Summary

In this article, I have introduced how to remove VM from inventory and how to delete the virtual machine files completely. You could figure out the difference between delete from disk and remove from inventory in VMware ESXi.

In short, if you need to keep VM files and re-register virtual machine, you are supposed to remove from inventory, moreover, if you want to delete VM and its files from datastore, you should select delete from disk.

Meanwhile, some users reported that when removing a VMware datastore, it may trigger an error “unable to unmount/delete vmfs datastore: the resource is in use”.

Crystal
Crystal · Editor
Crystal is an editor from AOMEI Technology. She mainly writes articles about virtual machine. She is a positive young lady likes to share articles with peolpe. Off work she loves travelling and cooking which is wonderful for life.