In one of my previous blogs about commissioning and decommissioning ESXi hosts in VMware Cloud Foundation, I’ve included a procedure how to cleanup ESXI host that has been decommissioned so it can be used again in another workload domain. There has been some changes that make this process much easier in VCF 3.5 and later so it is time for an update.
Note: the old procedure using the DCUI is still supported.
Cleanup ESXi Host
You can now use the SoS utility to automatically clean up a decommissioned ESXi host.
- Identify the ESXi hosts that have been decommissioned and need a cleanup.
- SSH to the SDDC Manager and log in as the vcf user.
- Use su to switch to the root user.
- From the
/opt/vmware/sddc-support/directory, run the SoS utility with the
--cleanup-hostswitch and IP address of the ESXi host. See the screenshot for an example.
- Optionally, you can specify multiple host separated by a comma.
- You can also use the
--cleanup-host ALLswitch which will cleanup all hosts in the SDDC Manager inventory marked as “Need Cleanup”.
Additionally, the SoS utility also offers a command (
--cleanup-decommissioned-host) that uses a json file to cleanup a large amount of ESXi hosts.
Post Cleanup Action
- Open the Web Client of the ESXi host by navigating to its FQDN or IP address and log in with the root user.
- Select if you want to participate in the CEIP or not and click OK.
- Verify the NTP server, start the service and set the policy to start and stop with the host if it is not already configured.
- Verify if SSH service is running. Start it if it doesn’t.
- Set the correct VLAN ID on the default VM Network portgroup (must match the management network VLAN ID).
- If you are using jumbo frames, make sure you change the MTU setting on the vSwitch0 and the vmk0 interface.
- Log off.
The host is cleaned up and can be used in another workload domain.