VMware Cloud Community
waxcab
Contributor
Contributor
Jump to solution

esxcli list all vms

Hello everyone!

Is there a way to list all VMs (including powered off) directly from the host via ssh? Like "vim-cmd vmsvc/getallvms" or "esxcli vm process list" but for every vm on the host? I know about PowerCLI and its get-vm commandlet but It would be better for me to fetch vms right from the host. Thank you in advance!

1 Solution

Accepted Solutions
markusoesterle
Contributor
Contributor
Jump to solution

Hello,

are you sure "vim-cmd vmsvc/getallvms" isn't what your looking for? On hosts with local storage it's my quick and dirty way to list all vms on the host (running & powered off). I never used it on cluster hosts with shared storage, but I tried it just a moment ago and it gave me all the vms registered on that host including the powered off ones.

View solution in original post

2 Replies
markusoesterle
Contributor
Contributor
Jump to solution

Hello,

are you sure "vim-cmd vmsvc/getallvms" isn't what your looking for? On hosts with local storage it's my quick and dirty way to list all vms on the host (running & powered off). I never used it on cluster hosts with shared storage, but I tried it just a moment ago and it gave me all the vms registered on that host including the powered off ones.

waxcab
Contributor
Contributor
Jump to solution

The command "vim-cmd vmsvc/getallvms" is exactly what I need, just ran it on other host and it worked fine. Looks like some local issue with the host. Thank you!

0 Kudos