Guide | How to Add ESXi Host to vCenter 7 (or Remove It)
vCenter Server enables you to manage multiple hosts (up to 1000) and monitor the physical & virtual infrastructure. Here's how to add host to vCenter for these conveniences.
How Does vCenter Server Manage ESXi Hosts
vCenter Server is a service that works as a central administrator for ESXi hosts connected on a network, and enables you to pool and manage the resources of multiple hosts. A single vCenter Server supports up to 1,000 hosts, 10,000 powered-on virtual machines and 15,000 registered virtual machines.
There are two options to install vCenter Server, the Windows-based installation, or vCenter Server Appliance, a pre-configured Linux version. After that, you can add ESXi host to vCenter 7 (or vCenter 6.7, 8, etc.) to access advanced vSphere features, such as vMotion, Storage vMotion, DRS, Storage DRS, vSphere HA and Fault Tolerance.
Here I will provide a tutorial with screenshots to show you how to add host to vCenter.
How to Add ESXi Host to vCenter 7 (Step by Step)
You can add hosts under a data center, a folder, or a cluster. If a host contains virtual machines, then these will also be added under the hosts in the inventory.
Here I will show you how to add host to vCenter Server (take vCenter 7 as an example). You can also add host to vCenter 6.7 or even vCenter 8 via similar steps.
Prerequisites to Add Host to vCenter
▪ Verify that a data center or a folder exists in the inventory.
▪ Obtain the username and password for the root user account of the host.
▪ Verify that the host behind the firewall can communicate with the vCenter Server system and all other hosts via port 902 or other custom configured ports.
▪ Verify that all NFS mounts on the host are active.
▪ Verify that you have the appropriate permissions. Different sets of privileges apply when you add multiple hosts to a cluster than when you add a single host to a cluster or datacenter.
▪ If you want to add hosts with more than 512 LUNs and 2048 paths to a vCenter Server inventory, verify that the vCenter Server instance is suitable for large or x-large environments.
How to Add ESXi Host to vCenter Step by Step
1. Open VMware vSphere Client, right-click your Datacenter object, select Action menu and then select Add Host.
If there’s no datacenter, right-click the vCenter and choose New Datacenter to create one.
2. Type the name or IP address of your ESXi host and then click NEXT.
3. Type the ESXi 7 host user name (root) and the password, click NEXT to continue.
4. Review the Host Summary and click NEXT to assign an existing or new license. Here let’s keep the default Evaluation License and proceed.
5. Then select whether to enable Lockdown mode or not. When enabled, it prevents remote users from logging into this host directly. Here keep it Disabled and click NEXT.
6. Select VM location, and click NEXT.
7. Review the details and click FINISH if everything is okay. Check the datacenter and you will see the host has been added successfully.
When an ESXi host is added to the vCenter Server, an agent service called vpxa is installed and started on the ESXi host. vpxa acts as an intermediary service between the vpxd service running on the vCenter Server and the hostd service (responsible for managing most operations on the host) running on the ESXi host.
How to Add ESXi Host to vCenter via PowerCLI
It’s not difficult to add a host to vCenter Server via vSphere Client. However, if you have multiple ESXi hosts to add, it will become cumbersome to repeat the operation again and again. You may wonder if there’s a way to deploy multiple hosts to vCenter easily.
In fact, it is possible with PowerShell commands, and here’s a script you can try to add multiple ESXi hosts at once.
Before anything, you need to install VMware PowerCLI module in order to manage VMs on VMware vSphere. Run this command to install it:
Install-Module -Name VMware.PowerCLI
Then you can open Windows PowerShell as administrator to run this script (remember to replace the vCenter name, ESXi name, etc. to yours):
#####################################################################
# Load VMware Plugins and connect to vCenter
#####################################################################
Add-PSSnapin vmware.vimautomation.core
## Enter your vCenter here
connect-viserver -server YOUR VCENTER NAME
########################################################################
# Add Multiple Hosts to vCenter
########################################################################
# Variables
## You can use comma separated names or change to pull from a text file. Your pick.
$ESXiHosts = "HOST NAME 1" , "HOST NAME 2" , "HOST NAME 3"
## Enter the name of a Data Center or Host Cluster
$ESXiLocation = "DATA CENTER OR CLUSTER NAME"
# Start Script
$credentials = Get-Credential -UserName root -Message "Enter the ESXi root password"
Foreach ($ESXiHosts in $ESXiHosts) {
Add-VMHost -Name $ESXiHosts -Location $ESXiLocation -User $credentials.UserName -Password $credentials.GetNetworkCredential().Password -RunAsync -force
Write-Host -ForegroundColor GREEN "Adding ESXi host $ESXiHosts to vCenter"
}
# End Script
A dialog box should pop up requesting the root credentials of the ESXi hosts, enter the ESXi root password and click OK to proceed. When it’s done, you can check vCenter and these ESXi hosts should have been added to the location you specified.
How to Remove ESXi Host from vCenter
You can remove a managed host from vCenter Server to stop monitoring and managing it. But here are 2 tips you should know:
🔹Preferably remove managed hosts while they are connected, because removing a disconnected host does not remove the vCenter Server agent from the managed host.
🔹If the host you want to remove from the cluster is connected to a distributed switch, you need to remove the host from the switch.
Here are the steps to remove from inventory:
1. Launch the vSphere Client home page, and navigate to Home > Hosts and Clusters.
2. Select a host in the inventory. Right-click it and select Remove from Inventory from the pop-up menu.
✍Note:
If the host is part of a cluster, put it in maintenance mode. Right-click the host to select Maintenance Mode > Enter Maintenance Mode from the pop-up menu. Then click Ok in the confirmation dialog box.
*If not all VMs 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 VMs from the host by using vMotion.
*If the host is part of a DRS cluster, you can evacuate powered off or suspended VMs to other hosts within the cluster. Check the Move powered-off and suspended virtual machines to other hosts in the cluster box.
*The host icon changes and the term Maintenance Mode is added to the name in parentheses.
3. In the confirmation dialog box, click Yes and vCenter Server will remove the host and the associated virtual machines from the vCenter Server instance. vCenter Server then returns the status of all associated processor and migration licenses to available.
Tips: Backup ESXi VM Managed by vCenter to Secure Critical Data
After you add ESXi host to vCenter 7, you can manage and monitor respective virtual machines with comprehensive functions. However, there is no real backup solution other than VMware's pre-built snapshot, export & import, etc.
There is a file-based backup option, but it is for VCSA configurations. For virtual machines that are loaded with more important data or business, you still need to use a dedicated VM backup solution for daily protection.
Here I will recommend a reliable VMware VM backup software - AOMEI Cyber Backup. It works with VMware ESXi 6.0 and above versions (free ESXi is also supported), offering you the following in the easiest console to operate:
Backup in batch: You can easily add a standalone ESXi host or vCenter Server, can create a task several clicks to back up all virtual machines managed by it.
Hot backup: Simply backup VMware virtual machines while running. No need to suspend running operations and ongoing access during the process.
Automation: Create VMware backup schedule to automate VM protection daily, weekly, monthly, and enable retention policy to auto delete old backup files.
Restore to new location: Besides in-place recovery, you can restore a VM to new location in the same or another datastore/host/vCenter for migration or cloning.
AOMEI Cyber Backup is not only for VMware virtual machines, but also for Hyper-V backup. Click the button below to enjoy a fully-functional free trial:
*You can choose to install this VM backup software on either Windows or Linux system.
Frequently Asked Questions for Adding Host to vCenter
💬 Can I add ESXi 6.7 to vCenter 7?
Yes. vCenter Server 7.0 can manage ESXi version 6.5 hosts in the same cluster with ESXi 7.0 hosts. vCenter Server 7.0 cannot manage ESXi 6.0 or earlier hosts.
Of course, you can also consider a upgrade from ESXi 6.7 to 7, especially when the general support period for vSphere 6.7 ended on October 15, 2022 and the original End of Technical Guidance (EoTG) on November 15, 2023.
💬 Why I cannot add ESXi host to vCenter 6.7/7?
This is usually due to a problem with network communication between the vCenter Server and the ESXi host added to the inventory.
To troubleshoot it, you can check the following from the vCenter Server machine:
- Ensure you entered correct passwords when adding the ESXi host.
- Ensure that the version of vCenter Server is same or higher than the ESXi host being added.
- Verify the IP of the ESXi host is the one configured for the management vmkernel interface.
- Verify you can connect to the ESXi host using the vSphere Client.
- Verify the DNS records for the ESXi host is configured correctly.
- Verify the ESXi host ports are accessible.
- In addition, this issue can also occur when Lockdown mode is enabled on the ESXi host.
Conclusion
This article presents a step-by-step guide to add ESXi host to vCenter 7, as well as other vCenter versions. After that, you can manage your hosts and respective virtual machines from a centralized location, and with some advanced features only supported by vCenter.
For a complex virtual environment, backups are quite important. In addition to the file-based backup (for vCenter configurations) that comes with VCSA, it is also recommended to use a reliable virtual machine backup solution to secure the data within the virtual machines.