How to Force Remove offline host from PCD Using API call?

Problem

API-driven forced removal of an offline host in PCD.

Environment

  • Private Cloud Director - v2025.4 and Higher
  • Self-Hosted Private Cloud Director Virtualization – v2025.4 and Higher

Procedure

  1. Obtain an API token using the OpenStack CLI:
Openstack Command
Copy
  1. Identify the Host ID of the offline host from the UI or using below api call:
API Request
Copy

Sample Output:

API Request
Copy
  1. Force Remove the Host:

The DELETE API operation can be perfomed by Admin users only.

Also invoke the DELETE API for hosts that are already offline or permanently unrecoverable and have no VMs or images tied to them. Deleting a live host can create system inconsistencies—placing it in a limbo deauthorized state, causing it to re‑appear in inventory, corrupting metadata, or triggering erratic resource behavior.

For active hosts, use deauthorize and decommission operations instead to ensure safe and consistent removal.

API Request
Copy
  1. Once the Host is removed, the associated compute service and network agents must be deleted.
    1. Note the ID of compute service and network agents.
    2. Delete the compute service and network agents associated to Host.

Delete all the network agents configured for the affected host in this case <HOST_ID_2> , listed in the output of command openstack network agent list -c ID -c Agent_Type -c Host | grep <HOST_ID_2>

Openstack Command
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard