Irremovable VMs in RHEV-Manager

Latest response

Hello people,


During the course of my playing around with rhev I have accumilated a number of virtual machines that are stuck in a limbo state and cannot be removed. This happened when either the Manager had to be rebooted, or network connection between hosts and manager was lost due to an overwize unrelated matter.



I have tried putting the hosts into maintenance, rebooting them and then activating them before attempting to remove the vm's but their question-mark status does not change and the problem remains.


Two of these irremovable machines are in pools (thus- 'Fish', badoom-tish...) but attempting to remove the pools results in error message:

•    Cannot remove VM Pool. Detach VMs from VM Pool first


Attempting to remove non-active vm's that are simply stopped results in error message:

•    Cannot remove VM. VM is attached to a VM Pool.


So it seems to be a kind of Catch 22 situation.


The vm called Hatest (as in HA test, didn't work but that's another matter) has 20GB tied up in it and is not part of a pool. Any suggestions how I can resolve this problem?


Many thanks.


Go to Pools -> Virtual Machines sub tab -> select virtual machine and detach it.


In Virtual Machine tab, does the first field show a question mark for the vm and status field Unknown?

Hi Sadique,


Correct, there's a question mark and Status is Unknown. I was able to remove the other vms in the same pool.

This unknown status happens when the hypervisor that runs the vm goes Non-Responsive. When the REHV-M loses access to the a hypervisor which has running vms, then it status will be changed to Unknown. The presence of Vns/Spice in the Display status clearly shows this guest was running when it lost access to hypervisor.


If you identify the hypervisor these guests were running, Reboot it and click "Confirm Host has been rebooted" (Available in the right click menu of the hypervisor), the guest status will be reset to Down.


If the above does not resolve this, I adivse you file a support case to investigate this further.

Yes I have done that and it didn't work. I don't have any support so I guess that's that.

Actually, might it be possible to remove a virtual machine manually via the command line? Could I go into the /data directory (in this case /home/rhev/data) and just rm -rf ./the/vm somehow?

No, it will only remove the storage for the vm, but not the vm from the database on the RHEV-M. If if you remove the vm from /data, it should still be visible as Unknown in RHEV-M.


What you have to do is to change the status of the vm manually in the db to Down and remove the vm from GUI if needed if all the above steps have failed. If you know how to deal with a postgres database, you can inspect vm_static and vm_dynamic table to change the values in db.


We do not recommend doing the above on production systems without help from Support as a simple mistake can lead to a unexpectd problems.