Solved

Prism lists a VM that does not exist

  • 13 February 2020
  • 6 replies
  • 3316 views

Hi,
I am dealing with an EOL cluster (3060). I am facing recently a case where the prism element does list a vm which does not exist on the AHV. It is a fake vm. 

There is no active support to ask them. Any help?

 

 

icon

Best answer by JeremyJ 25 February 2020, 17:20

View original

This topic has been closed for comments

6 replies

Userlevel 3
Badge +3

Hello, 

If you connect to the CVM of host NTNX-3/AHV and run “ncli vm list”, can you see the VM? If yes then the VM is still on the AHV

If you deleted it from the cli there is a chance that prism was not updated. 

You can find the prism leader by running this on any CVM:

curl localhost:2019/prism/leader && echo

and then SSH to the IP received from the command above (to the prism leader CVM) and run: 

allssh cluster stop prism; cluster start

If after this you still see the VM in Prism but not in AHV, consider opening a case with us through the portal or give us a call, the deletion task could be stuck and might need cancellation. 

Badge

Hi @ajeidani - If the VMs are still available on Prism UI post restarting Prism, then the issue could be that the entry for that VM still lies in IDF. The entity would be corrupt and needs to be removed from the database itself.

However, to remove this from the database, you would need to open a support case as this involves using a script which is INTERNAL. Kindly let us know if you have tried the above procedure and still no luck.

Userlevel 7
Badge +34

Hi @ajeidani 

Did the replies here help any? Let us know and mark the one that helped as a ‘best answer’

Thanks all

I actually did restart the Prism from the leader as mentioned. But that fake vm still there.

Unfortunately, the cluster is EOL and no active support is applicable. So no hope to call the support.

If there is no solution I can do it myself; I can leave this vm as is.

 

Thanks

Userlevel 3
Badge +4

Hello ajeidani,

I think the fault is not with Prism. The vm name shown there is a VM UUID.

Please check if the VM exists on the host in a powered off state. SSH to the AHV host NTNX-3 and run “virsh list --all” and see if you find the VM there in a “shut off” state. 
If so, this is why Prism displays it. 

Under normal circumstances, a user VM will not exist in a powered off state on an AHV host. When the VM is powered off the configuration only exists in AOS. In your case I think there is some persisting information about this VM defined at the host even though the VM was powered off. Only the CVM has configuration built persistently at the host because it must be able to start before AOS services can start. No other UVM should continue to exist at the host when powered off. 
If you are seeing the VM in a “shut off” state at the host, it isn’t a matter of Prism displaying something that doesn’t exist. It’s a problem of a powered off user VM existing at the host.

Normally you should not make any changes from virsh on an AHV system except as documented to manage the CVM, but in this unusual case you may need to remove the problematic VM using “virsh undefine f18154dd-7d31-4bcf-a6c2-cd5673d08fe8 --managed-save” or “virsh undefine f18154dd-7d31-4bcf-a6c2-cd5673d08fe8 --snapshots-metadata”. 

 

Thanks JeremyJ, it works fine.

You’re right, the uvm was stuck on the host not in prism:

~$ virsh list --all
 Id    Name                                                            State
--------------------------------------------------------------------
 1     NTNX-3-CVM                                                running
 -     f18154dd-7d31-4bcf-a6c2-cd5673d08fe8   shut off

 

no it’s removed and disappeared from Prism also.

Thank you very much.