Bootstrap FreeKB - VMWare - List virtual machines on the command line (vim-cmd esxcli)
VMWare - List virtual machines on the command line (vim-cmd esxcli)

Updated:   |  VMWare articles

This assumes you have enabled SSH connections to your ESX hypervisor. The vim-cmd vmsvc/getallvms command can be used to list each registered virtual machine.

vim-cmd vmsvc/getallvms

 

Something like this should be returned.

Vmid    Name                             File                                    Guest OS        Version   Annotation
33     vm1.example.com   [datastore_VMs] vm1.example.com/vm1.example.com.vmx     centos64Guest   vmx-11
37     vm2.example.com   [datastore_VMs] vm2.example.com/vm2.example.com.vmx     centos64Guest   vmx-11
54     vm3.example.com   [datastore_VMs] vm3.example.com/vm3.example.com.vmx     fedora64Guest   vmx-13

 

Similarly, the esxcli vm process list command can be used.

esxcli vm process list

 

Something like should be returned for each virtual machine.

vm1.example.com
   World ID: 75260
   Process ID: 0
   VMX Cartel ID: 75259
   UUID: 56 4d c9 05 de c1 72 0f-6a c7 e8 23 5f d6 cd be
   Display Name: vm1.example.com
   Config File: /vmfs/volumes/57657886-7b8f67a9-b213-10bf4879952f/vm1.example.com/vm1.example.com.vmx

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 50407e in the box below so that we can be sure you are a human.