Best way to delete VM from database if it is already deleted from computing node [closed]
Hello all,
have some old virtual machines (VMs) that are in an ERROR state because there was some error during their deletion. If I want to delete them, the machine stays in ERROR state. When I had a look on the compute node, on which it should run, I saw that it was already deleted from libvirt. Thus, there is only the entry in the mysql database remaining.
Deleting this entry via the OpenStack Dashboard, nova delete or nova force-delete results in an error. What is the best way to remove this entry from the database? (I use OpenStack Juno.)
- Create a VM manually that fits to the data in the database and then try to delete it with nova.
- Change the database manually.
Can you provide me with the required commands for any of both alternatives or a better solution?
Just a remark: If I create new VMs, they are deleted without any errors, now.
Regards,
Daniel
Can you still see the VMs in error state in the horizon dashboard?
Yes, the horizon dashboard shows the VMs in error state. And it also shows that they are in error state.
I have tried to manually recreate the VM. Therefore, I used
virsh dumpxml
for a different instance on the same compute node. Then, I adapted its configuration to the values of the VM in EROR state. I had to outcomment the network interface. Then I started the instance. (to be continued)(continued) Then, I reset its state to active with nova. But when I tried to terminate it again, the VM was deleted from the compute node but in nova the VM returned into an error state.