Sometimes I need to get the IP address of a running VM from ESXi SSH. It is pretty straightforward and easy thing to do:
1. Connect to your host via SSH
2. Establish your VM ID
[root@esxi:~] vim-cmd vmsvc/getallvms
3. Now to find out the VMs IP address run:
[root@esxi:~] vim-cmd vmsvc/get.guest 13 | grep ipAddress OUTPUT: ipAddress = "10.10.1.109", ipAddress = (string) [ ipAddress = (vim.net.IpConfigInfo.IpAddress) [ ipAddress = "10.10.1.109", ipAddress = "fe80::20c:29ff:fec8:db22", ipAddress = (string) [ ipAddress = "10.10.1.254", ipAddress = , ipAddress = , ipAddress = "fe80::221:55ff:fefb:da4", ipAddress = ,
Job done.