The host decommissioning task remains in a Deactivating state.
SDDC Manager UI displays the following error:
In /var/log/vmware/vcf/domainmanager/domainmanager.log, the following snippets are observed:YYYY-MM-DDTHH:MM:SS DEBUG [vcf_dm] [c.v.e.s.c.c.v.vsphere.VcManagerBase] Task: (MOR:task-######) (Name:enterMaintenanceMode) Entity: (MOR:host-##) (Name:<esxi hostname>) status: running. Waiting for its completeYYYY-MM-DDTHH:MM:SS INFO [vcf_dm] [c.v.e.s.c.c.v.vsphere.VcManagerBase] Getting status of task Task: (MOR:task-######) (Name:unknown)YYYY-MM-DDTHH:MM:SS WARN [vcf_dm] [c.v.v.v.c.h.i.HttpProtocolBindingBase] Asynch
The domain manager log may also contain this information:
"Host [UUID-REDACTED] is in DEACTIVATING status and it's not ACTIVE. Skip adding this resource to the inventory."
To resolve this issue, you must manually clear the stuck task from the SDDC Manager database and re-initiate the decommission process.
vcf user.suplatform database:psql -h localhost -U postgres -d platformSELECT HOSTNAME, ID FROM HOST WHERE STATUS='DEACTIVATING';platform=# SELECT HOSTNAME, ID FROM HOST WHERE STATUS='DEACTIVATING'; hostname | id----------------------+-------------------------------------- esxi.example.com | ########-####-####-####-##########(1 row)UPDATE HOST SET STATUS='ACTIVE' WHERE ID='<InsertID from previous step>';platform=# UPDATE HOST SET STATUS='ACTIVE' WHERE ID='########-####-####-####-########';UPDATE 1Exit from the Database\q
Log back into the SDDC Manager UI.
Navigate to Inventory > click on the required Domain > select the Host(s) and click on REMOVE SELECTED HOSTS