VMware Cloud Community
wayneoakley99
Enthusiast
Enthusiast

running VM not found in Inventory on Host

rather strange situation here with one VM on an ESX 3.5 host in a Cluster with a VC 2.5 using an HP MSA1000 SAN

after a power outage the ESX hosts and all of the VM's restarted eventually but one VM shows as disconnected in the VC inventory. Because it is an important server it was considered odd that nobody complained, the reason being that it was running. Unexpected but fortunate.

in trying to resolve the disconnected (usually fixed by powering it on) state it was discovered that the ESX host upon which it is running does not even show the VM in the inventory, most unusual to have a VM running on a host and according to the VI Client connection to that host it does not exist.

i am at a bit of a loss to understand how this VM could have started when it is not apparrently in the inventory.

at a convenient time i plan to shut it down, remove it from the VC inventory and then browse the DataStore to re-add it and fix the problem.

But i am most interested in opinions on how this condition can exist.

thanks

wayne

Reply
0 Kudos
6 Replies
kjb007
Immortal
Immortal

On the service console of the host the vm is running on, run vmware-cmd -l. This will output all of the vm's that the ESX host thinks are currently running on it. If it shows the name of your phantom vm, then the host knows about it, but may not be correctly showing the active vm. One other thing to try, is to run 'service mgmt-vmware restart' on the host itself to clear out the hostd process. I would wait on that as well until you get the same downtime.

It may be that the vm may have been running on one host, and after the power outage, moved over from HA, but did not properly unregister from one host before registering to a second, and ultimately starting correctly. There was a disconnect between the register and unregister, hence the vm shows disconnected (possibly from old host) and does not show up correctly in the inventory of new host.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos
wayneoakley99
Enthusiast
Enthusiast

thanks, i will try those commands, i did use esxtop to confirm that it is running on the host that the VC disconnected entry shows so at least VC was up-to-date as to where it thinks it should be running.

i did not think that the local host inventory was possibly provided from a different source than the host was using to start machines, but it would appear that the list of known vm that the host will start is not necessarily the same as the list that is presented in the inventory as seen by the VI Client.

Reply
0 Kudos
kjb007
Immortal
Immortal

It could simply be a need to restart hostd. If you check the startup/shutdown configuration under the esx host's configuration tab, and make sure automatic startup/shutdown is not enabled, you should be safe to run 'service mgmt-vmware restart'. That may be the only thing needed to get all back to normal.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
wayneoakley99
Enthusiast
Enthusiast

quite likely.

could you explain why automatic startup/shutdown should not be enabled when this is action is performed, i am not clear how it would affect the restart of the service.

Reply
0 Kudos
Chamon
Commander
Commander

You may want to run this from the SC

vmware-cmd -s register

This will register the vm with the host. It may take some time but it should then show up in Vcenter.

Chamon
Commander
Commander

If the VMs on that host are set to startup and shutdown when you restart the mgmt-vmware service it will restart all of the VMs on that host. Not a good thing Smiley Sad

Reply
0 Kudos