How to Remove Host from vCenter [2 Ways]

When decommissioning a host or when it is no longer required, it is essential to remove the host from vCenter. Next this article will provide you with the steps to successfully remove host from vCenter without any issues.

Crystal

By Crystal / Updated on February 28, 2023

Share this: instagram reddit

Case: How to remove host from vCenter?

 

How do I remove ESXi hosts from the vCenter? I have a couple ESXi hosts that were previously connected to a vCenter. Some unfortunate incidents happened and now we need to set up a new vCenter on a new machine. How to remove host from vCenter and add to this new vCenter?

- Question from www.reddit.com/r/vmware

VMware vCenter Server is a centralized management tool used to manage the vSphere environment. It helps administrators to manage multiple VMware ESXi hosts from a single location.

However, sometimes an ESXi host may not be available or you no longer require it, then you may need to decommission it. Next, this article will show you how to remove host from vCenter Server.

How to remove host from vCenter Server

How to remove host from vCenter Server

Removing an ESXi host from vCenter Server is a common task for administration. Thus, VMware provides multiple methods to implement it.

Next, this part will show you the steps on how to remove host from vCenter via vSphere Client and PowerCLI.

How to remove host from vCenter via vSphere Client

1. From vSphere web client, log in to vCenter Server as root.

2. Navigate to Home > Hosts and Clusters, and select the host you want to remove. And power off all running VMs on the host you want to remove.

Hosts and Clusters

3. Right-click on the host name and select Maintenance Mode > Enter Maintenance Mode.

Note:
1. If not all virtual machines on the host are powered off, the host does not enter maintenance mode.
2. If the host is inside a DRS-enabled cluster, entering maintenance mode causes DRS to attempt to evacuate powered-on virtual machines from the host using vMotion.
3. If the host is connected to a distributed switch, first you must remove the host from the switch.

Maintenance Mode

4. Click OK in the confirmation dialog box.

If you want those VMs to remain registered to a host within the cluster, you can select to evacuate them.

Enter Maintenance Mode

5. Right-click on the host and select Remove from Inventory. Click Yes to confirm.

Note: You can also select Connect > Disconnect, or Move to… option according to your needs.

Remove from Inventory

vCenter Server removes the host and associated virtual machines from the vCenter Server environment. vCenter Server then returns the status of all associated processor and migration licenses to available.

How to remove host from vCenter via PowerCLI command line

You can use the Remove-VMHost cmdlet to remove host from vCenter Server inventory. The Remove-VMHost cmdlet has the following syntax:

Remove-VMHost [-VMHost] [-Server ] [-WhatIf] [-Confirm] []

But before you could remove it, you still need to put the host into maintenance mode or a disconnected state, or this operation may fail.

remove host failed

1. Connect to your vCenter, and run the following command to put the host in maintenance mode:

Get-VMHost -Name <hostname> | Set-VMHost -State Maintenance

2. Then you can run the following command to remove host from vCenter Server:

Get-VMHost -Name | Remove-VMHost -Confirm:$false

The vCenter Server will not manage and monitor the removed the host and associated virtual machines once you remove them from the vCenter Server instance.

Batch backup VMs managed by vCenter Server to avoid accidental loss

You may already know that it is necessary to perform image-based backup of large amounts of VMs managed by vCenter Server, however, vCenter Server does not provide the feature of virtual machine backup. And that makes backup software a commonly accepted choice.

Here I introduce you to a VMware backup software AOMEI Cyber Backup, it enables you to backup multiple VMs either managed by vCenter Server, or on a standalone ESXi host.

Agentless Backup: create complete and independent image-level backup for VMware ESXi and Hyper-V VMs.
Flexible vSphere Backup: batch backup large numbers of VMs managed by vCenter Server, or multiple VMs on a standalone ESXi host.
Multiple Storage Destinations: backup to local drive, or network destinations like NAS.
Automated Execution: create backup schedules to automate backups daily, weekly, monthly.
Restore Entire VM: restore instant available VMs from any selected restore points to an original or new location.

AOMEI Cyber Backup supports both paid and free versions of VMware ESXi 6.0 and later versions. Next, I will show you how to batch backup VMs managed by vCenter Server with AOMEI Cyber Backup in 4 simple steps.

You can click the following button to download the 30-day free trial.

Download Free trialVMware ESXi & Hyper-V
Secure Download

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

4 Steps to batch backup VMs managed by vCenter Server

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

Add VMware ESXi host

2. Create Backup Task: Navigate to Backup Task > + Create New Task, and select VMware ESXi Backup as the Backup Type.

3. Set the Task Name, Device, Target, Schedule and Cleanup as needed.

  • Task Name: you can change the task name or use the default name with an ordinal.
  • Device: batch select large numbers of VMs managed by vCenter Server for centralized backup.

Select virtual machines vCenter

  • Target: select to back up to a local path, or to a network path like NAS.
  • Schedule (optional): perform full, differential, or incremental backup, and automate execution according to the frequency you specified.
  • Cleanup (optional): automatically delete the old backup copies that exceed the retention period you specified.

4. Run Backup: Now you can click Start Backup and select Add the schedule and start backup now, or Add the schedule only.

Start Backup

Created backup tasks will be listed and monitored separately for restoring, progress checking and schedule changing.

When restoring, you can also restore to new location to create a new VM in the same or another datastore/host directly from the backup, saving the trouble of re-configuring the new VM.

Summary

vCenter Server is an efficient tool to help administrators managing multiple ESXi hosts. However, when a host is no longer required, it is essential to remove the host from vCenter.

This article provides you with 2 different ways to remove host from vCenter. You can choose either to remove ESXi host from vCenter via command line, or do it via vSphere Client. No matter which way you choose, please remember to backup the data before you start to avoid accidental loss.

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.