VMware Cloud Community
student123
Contributor
Contributor

How to find the list of virtual machines

Hi All,

How to find the list of virtual machines that were registered on one of the ESXi host after it has been abruptly rebooted and those virtual machines were restarted on remaining hosts in the cluster.

For example one of the ESXi host was rebooted unexpectedly and all the virtual machines that were running on that host were restarted on remaining hosts in the cluster. Once the ESXi host boots up i need to revert all the virtual machines which were running earlier to this host.

What are the possible ways to find out.

Regards,

Raj

Tags (2)
0 Kudos
8 Replies
abhilashhb
VMware Employee
VMware Employee

I have a question for you. you say your host went down and the machines that were running on that particular host were migrated  to other host during the reboot of the target host. Which means DRS was on. How would it matter for you where the machines running? Let the DRS kick in and balance the load across the servers? I'm just trying find if there's any specific reason why you want to know this?

Abhilash B
LinkedIn : https://www.linkedin.com/in/abhilashhb/

0 Kudos
admin
Immortal
Immortal

0 Kudos
abhilashhb
VMware Employee
VMware Employee

Fillips i think you got student123's the question wrong. Read it again.

Abhilash B
LinkedIn : https://www.linkedin.com/in/abhilashhb/

0 Kudos
admin
Immortal
Immortal

Hello,

Simple way is you could always go the Hostd.log of the original Host and find out which VM's were registered by doing a grep for the vmx

less  /var/log/hostd.log  grep -i  "*.vmx"

Or for detailed Information on the vms that were migrated, You could always check the drmdump\:

Thanks,

Avinash

0 Kudos
TBKing
Enthusiast
Enthusiast

I had a nic failure recently and through vCenter in Events for the server - once back online - showed "Changed resource allocation for <serverx>" at the time of the failure.

0 Kudos
student123
Contributor
Contributor

Hi Avinash,

Thanks for the info..

I also followed the same method by viewing the hostd log file.  However i thought i could find the entire list in .vmware-ha directory used for datastore heartbeating and where the protected virtual machine list will be stored.

Could you please update where i can find the drmdump file

Regards,

Raj

0 Kudos
admin
Immortal
Immortal

Hello,

It is a part of the vCenter server logs files, It will located on the machine where you have Installed the VC.

usually its under %ALLUSERSPROFILE%\Application Data\VMware\VMware VirtualCenter\Logs\

You can check this KB for reference.

VMware KB: Location of vCenter Server log files

Thanks,
Avinash

0 Kudos
admin
Immortal
Immortal

To list the virtual machines installed on a VMWare ESXi server, loging to the server via ssh and enter the following command:

~ # esxcli vms vm list

0 Kudos