Delete Orphaned Virtual Machine Entries
Root Cause
Resolution
1
2
4
Last updated
Was this helpful?
When a virtual machine is deleted / migrated / evacuated, sometimes its corresponding allocation on the source hypervisor host is not deleted from the PCD database.
If the compute service on the source hypervisor host is stopped abruptly while a VM is being deleted / migrated / evacuated, then the records for the VM in the PCD management database may not be deleted fully.
As a result, the host-side service cannot communicate with nova-conductor on the controller, so details are not shared and nova-compute may remain under the impression it still holds the virtual machine.
Use the following steps to locate and remove orphaned allocations. Run the commands from a hypervisor host.
Run nova-manage placement audit to list allocations for virtual machines that are either deleted or moved to other hypervisor hosts.
kubectl exec -it deploy/nova_api_osapi -n <NS> -- bash
nova-manage placement audit --verboseVerify the output to identify suspected orphaned allocations.
After validating the allocation is stale and the instance is deleted or moved to another compute node, delete the orphaned allocation.
kubectl exec -it <nova_api_osapi-pod_name> -n <NS> -- bash
nova-manage placement audit --verbose --delete <instance-ID>Last updated
Was this helpful?
Was this helpful?
