Cleanup ESXi host in VCF

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.

  1. Identify the ESXi hosts that have been decommissioned and need a cleanup.
  2. SSH to the SDDC Manager and log in as the vcf user.
  3. Use su to switch to the root user.
  4. From the /opt/vmware/sddc-support/ directory, run the SoS utility with the --cleanup-host switch and IP address of the ESXi host. See the screenshot for an example.
  5. Optionally, you can specify multiple host separated by a comma.
  6. You can also use the --cleanup-host ALL switch 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

  1. Open the Web Client of the ESXi host by navigating to its FQDN or IP address and log in with the root user.
  2. Select if you want to participate in the CEIP or not and click OK.
  3. Verify the NTP server, start the service and set the policy to start and stop with the host if it is not already configured.
  4. Verify if SSH service is running. Start it if it doesn’t.
  5. Set the correct VLAN ID on the default VM Network portgroup (must match the management network VLAN ID).
  6. If you are using jumbo frames, make sure you change the MTU setting on the vSwitch0 and the vmk0 interface.
  7. Log off.

The host is cleaned up and can be used in another workload domain.

Cheers!

– Marek.Z

Be the first to comment

Leave a reply...