As I have posted earlier, you can run VMs from a command line using VMWare VXI API. In addition to that, you can also view your running VMs as well as get their IP addresses and a lot more.
For this topic, will be covering two things that I consider most important. That is, getting the list of running VMs and getting their IP addresses. Do note that to get the IP address of the running VM, it is required that VMWare tools are installed on the guest VM that you are working on.
To get the list of running VMs: vmrun -T player list
Total running VMs: 2
To get the IP address of the a certain VM: vmrun -T player getGuestIPAddress /disk2/vms/Win7/Windows\ 7.vmx
If in case VMWare tools are not yet installed, you will get such error:
vmrun -T player getGuestIPAddress /disk2/vms/CentOS/CentOS_6/CentOS_6.vmx
Error: The VMware Tools are not running in the virtual machine: /disk2/vms/CentOS/CentOS_6/CentOS_6.vmx