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.

The process is the same for a virtual machine or a VM template:
  • 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

  • Log in to the vSphere Client and perform the task:
    Option Description
    Temporarily remove the virtual machine or VM template
    1. Right-click the virtual machine.
    2. Select Remove From Inventory and click Yes.
    Permanently delete the virtual machine or VM template
    1. Right-click the virtual machine.
    2. Select Delete from Disk and click Yes.

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.

Procedure

  1. In the vSphere Client inventory, right-click the datastore on which the virtual machine configuration file is stored and select Register VM.
  2. Browse to, select the virtual machine configuration (.vmx) file or the VM template configuration file ( .vmtx file) and click OK.
    The Register Virtual Machine wizard opens.
  3. On the Select a name and folder page, use the existing name or type a new name, select a datacenter or folder location and click Next.
  4. Select a host or cluster on which to run the new virtual machine.
    Option Action
    Run the virtual machine on a standalone host. Select the host and click Next.
    Run the virtual machine in a cluster with DRS automatic placement. Select the cluster and click Next.
    Run the virtual machine in a cluster without DRS automatic placement.
    1. Select the cluster and click Next.
    2. Select a host within the cluster and click Next.
  5. Select a resource pool in which to run the virtual machine and click Next.
  6. On the Ready to complete page, review your selections and click Finish.