Get VM IP addresses eth0 ... ethn with ESX commands

797 views Asked by At

I need get all IP addresses that a VM has it. I only can use ESX commands, no PowerCLI.

If I use, with or whithout grep: vim-cmd vmsvc/get.summary 1 | grep -i "ip"

I only get the first vNIC IP address, I need all :-(. If, it is possible...

Thanks to all !!

1

There are 1 answers

0
Emilio Granados On

So, finally I get the solution.

With the command:

vim-cmd vmsvc/get.guest <vmid>

We will have many keys ipAddress with the values, that we will may parse with grep command.