you're reading...
Linux Tips and Tricks

VMPlayer CLI Tips

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
/disk2/vms/Win7/Windows 7.vmx

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



No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s