Hello,
I have a lot of VMs running in our environment. Thus, when I run the subject command, I get a lot of unneeded content.
What I want is to see the VMID, Name, and its Datastore location. How can I do this?
BTW, I did install RVTools to attempt to make this easier for myself and see them all in a row... however the VMID is not displayed.
Thanks,
Johnathan
brunofernandez1,
Thanks for the link. I found the following one liner that does this for me:
vim-cmd vmsvc/getallvms | sed -e '1d' -e 's/ \[.*$//' | awk '$1 ~ /^[0-9]+$/ {print $1" "substr($0,8,80)}'
this could help
vm-support --listvms
brunofernandez1,
I appreciate the reply. However, that command doesn't work:
~ # vm-support --listvms
Illegal option --
Currently running it with a single '-'... will let you know once it is done... taking a while.
Well, running it with a single dash simply created the compressed package to send to support.
Other suggestions?
I'm sorry but with esxi 5.5 this matches.
but this could help:
Get all VMs with "vmware-vim-cmd vmsvc/getallvms"
brunofernandez1,
Thanks for the link. I found the following one liner that does this for me:
vim-cmd vmsvc/getallvms | sed -e '1d' -e 's/ \[.*$//' | awk '$1 ~ /^[0-9]+$/ {print $1" "substr($0,8,80)}'
You're welcome
Maybe you can mark my answer as helpful 😉
Thanks
Done. :smileygrin: