Перейти к содержимому

Remove from inventory vmware что это

  • автор:

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.

By Crystal / Last Updated December 2, 2022

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:

Perpetual Free: you can use AOMEI Cyber Backup Free Edition with no time limit.
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:

*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 (free up to 10 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”.

Manage vCenter Inventory

Lost or out-of-inventory VMs, virtual services and unlinked or orphaned files can use up the storage available on your datastores. Lost and out-of-inventory VMs and virtual services are those that are still on disk but are not registered in the cloud account. This situation can occur when a VM or virtual service is removed from inventory and the files are not deleted from disk, or are cloned or deployed without proper controls. Unlinked or orphaned files can remain after VMs or other objects are deleted from disk.

You can generate a report to help you determine which files aren’t linked to a VM. For more information, see Unlinked Files Report.

View in-inventory and out-of-inventory VMs

You can view a summary of what’s contained in your vCenter datastores for both in-inventory and out-of-inventory VMs.

  • In-inventory VMs are virtual machines that exist on a datastore and are displayed in the cloud account’s inventory.
  • Out-of-inventory VMs are virtual machines that exist on a datastore but are not displayed in your inventory.

The inventory concept is vCenter-specific, so viewing out-of-inventory VMs and removing VMs from inventory are supported for vCenter only.

There are three ways to view in-inventory and out-of-inventory VMs:

  • Through the Storage view tree.
  • Through the Virtual Machines tab of the Storage view.
  • Through the Offline VM Aging Costs Report and the Offline VM Aging Savings Report

View your inventory through the tree

Views > Inventory > Storage

Available to:

All Access Rights Levels

To view the VMs that are in inventory and out of inventory, go to the Storage View and expand the Managed folder or the Unmanaged folder in the tree.

View your inventory through the Virtual Machines tab

Use the search function in Commander to display in-inventory and out-of-inventory VMs. The following figure shows the search function using Advanced Filters. This search will find VMs that are in inventory. If you change the value after the is operator to No , the search will find VMs that are out of inventory

Virtual Machines tab in the Storage view displays both in-inventory and out-of-inventory VMs. The Virtual Machines tab in the Infrastructure view or the Applications view and Applications views displays in-inventory VMs only.

Search-Inventory

Views > Inventory > Infrastructure, Applications, or Storage > Virtual Machines tab

Available to:

All Access Rights Levels

Remove VMs or virtual services from inventory

You can use Commander to remove a VM or virtual service from inventory. When you complete this task, the files for the VM or virtual service remain on the disk and the service is considered to be «out of inventory». Removing from inventory is different from deleting from disk; a VM or virtual service that’s out of inventory can be placed in inventory at another time, while a VM or virtual service deleted from disk is permanently removed, along with all its associated files.

Removing from inventory is supported only for vCenter.

Views > Inventory > Infrastructure, Applications, or Storage

Available to:

Administrator and All Operator Levels of Access Rights

To remove a VM or virtual service and its files from inventory, the VM or virtual service must be powered off. You can then select the VM or virtual service you want to remove, and do the following:

  • For a VM, select the VM, then select Actions > Configuration Management > Remove from Inventory.
  • For a virtual service, select the virtual service, then select Actions > Remove from Inventory and confirm the removal.

Determine when VMs were removed from inventory

Every time a VM is removed from inventory, the date and time at which this event occurs is recorded. You can view this information if you add the Last in Inventory column to the Virtual Machines tab. After you add the Last in Inventory column to the Virtual Machines table, you won’t have to re-add it again to view when VMs were removed.

Views > Inventory > Storage

Available to:

All Access Rights Levels

To view when VMs were removed from inventory:

  1. Click the Storage tab.
  2. On the Storage page, click the Virtual Machines tab.
  3. To display the Last in Inventory column, right-click anywhere in the Virtual Machines table, choose Pick Columns > Lifecycle > Last in Inventory and click Add.

Manage other files on disk

On datastores, many files can accumulate as VMs and other objects are added. Most of these files are valid, but occasionally, orphaned or unlinked files remain as VMs are deleted from inventory. See also the Unlinked Files Report.

Views > Inventory > Storage

Available to:

Administrator and All Operator Levels of Access Rights

  1. Click the Storage tab, then click the Summary tab.
  2. Select a datastore.
  3. In the General section for the datastore, click the number for Other Files as displayed in the following figure.

Remove from inventory vmware что это

You are using an outdated browser. Please upgrade your browser to improve your experience.

You can remove VMs and VM templates from the vCenter Server inventory or delete them from a disk. If you only removed the VM from the inventory, you can add it back from the datastore.

Adding Existing Virtual Machines to vCenter Server

When you add a host to vCenter Server , it discovers all the virtual machines on that managed host and adds them to the vCenter Server inventory.

If a managed host is disconnected, the already discovered virtual machines continue to be listed in the inventory.

If a managed host is disconnected and reconnected, any changes to the virtual machines on that managed host are identified, and the vSphere Client updates the list of virtual machines. For example, if node3 is removed and node4 is added, the new list of virtual machines adds node4 and shows node3 as orphaned.

Remove VMs or VM Templates from vCenter Server or from the Datastore

You can temporarily remove a virtual machine or a VM template from vCenter Server or you can permanently delete it from the datastore.

  • When you remove a virtual machine from the inventory, you unregister it from the host and vCenter Server , you do not delete it from the datastore. Virtual machine files remain at the same storage location and you can later re-register the virtual machine by using the datastore browser. This helps if you want to edit the virtual machine configuration file. It is also useful to temporarily remove a virtual machine when you have reached the maximum number of virtual machines that your license or hardware allows.
  • If you no longer need a virtual machine and want to free up space on the datastore, you can remove the virtual machine from vCenter Server and delete all virtual machine files from the datastore, including the configuration file and virtual disk files.

Prerequisites

Power off the virtual machine.

Procedure

Register a VM or VM Template with vCenter Server

If you removed a VM or VM template from vCenter Server but did not delete it from disk, you can return it to the vCenter Server inventory by registering it with the vCenter Server .

Remove virtual machine

Two options are available to remove a virtual machine in vSphere:

  • 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. You can later re-register the VM to the inventory.
  • Delete from Disk – this option removes the VM from the inventory and delete its files from the datastore.

Here is how you can remove a VM from the inventory using vSphere Web Client:

1. To only remove a VM from the inventory, right-click the VM and select All vCenter Actions > Remove from Inventory:

remove from inventory

2. Click Yes to confirm the removal:

confirm vm removal

3. The VM will no longer be present in the inventory:

remove vm

You can re-register the VM back to the inventory:

1. Browse to the location of the VM’s .vmx file on the datastore. Right-click the file and select the Register VM option.

2. The Register Virtual Machine wizard opens. Select the inventory location:

register vm inventory location

3. Select the ESXi host on which the VM should run:

register vm host

4. Review the settings and click Finish:

register vm finish

5. The VM should be back in the inventory:

register vm inventory

You can also delete a VM from the inventory and delete its files from the datastore:

1. Right-click the VM and select All vCenter Actions > Delete from Disk:

delete from disk

2. Click Yes to confirm the deletion:

delete from disk confirm

3. The VM will no longer be present in the inventory or on the datastore. Note that this action is irreversible.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

https://alkogolizm.vyvod-iz-zapoya-v-stacionare-samara11.ru/