VM instance is deleted from OpenStack, but not from the underlying host causing IP duplication
Problem
VM keeps running on the underlying host causing IP duplication even though VM is completely deleted from OpenStack without showing any traces to OpenStack CLI or UI.
Environment
- Platform9 Managed OpenStack - v4.0 and Higher
The culprit VM name and at least one mac address should be known to execute this workaround.
Procedure
- Search Nova DB using VM name to get the details of all hosts on which the VM was running previously.
- Check for domain mac addresses using “virsh domiflist“ command on all possible hosts (which we get from nova DB).
# domname=`virsh list --all | awk '{print $2}'`
# for val in $domname; do virsh domiflist $val; done
- Search for the culprit MAC address associated with which VM uuid and use “virsh undefine” command to delete culprit VM as below:
# virsh undefine <culprit-VM-uuid>
Using above procedure we can find VM which is causing the IP duplication and running orphaned on the host.
Was this page helpful?