Virsh is my favorite cmdline for KVM management. You may wonder if there is sth similar for VMware or want to run VMware without GUI. Here is goes – vmrun.
0. VIX API
VIX API allows users to automate the management of VMs, such as APIs used to start/stop VMs. It supports most products from VMware, including Player, Sever, Workstation, Fusion and vSphere (though VIX API is deprecated as there is a vSphere API).
1. vmrun
After VIX API is installed, you will have a powerful command – vmrun, which leverages the powerful VIX API to provide a similar command line interface for VMware-based VMs, like virsh for KVM.
Take VMware Player and its VMs for example:
# Start the VM without GUI
vmrun -T player start “path/to/yourVM.vmx” nogui
# Stop the VM
vmrun -T player stop “path/to/yourVM.vmx” hard
# List all possible commands supported by vmrun
vmrun -h
2. Issues
There is a command in vmrun – getGuestIPAddress, which is used to get the IP address of the guest VM. First, the VM needs to be started. Second, VMware tools are needed to make the functionality work.
Once you login the VM, you may find top does not work. The same case happens if you try to compile the kernel (make menuconfig). Adding the fix into .profile helps.
root@dave-desktop:~/lsms# top
‘xterm-256color’: unknown terminal type.
Fix: export TERM=xterm
That is a good tip particularly to those new to the blogosphere.
Brief but very precise info… Appreciate your sharing this one.
A must read post!
Thanks for the auspicious writeup. It if truth be told was a leisure account it.
Glance complicated to more added agreeable from you!
However, how can we be in contact?
Hi! I know this is kind of off-topic but I needed to ask.
Does running a well-established blog like yours require a lot of
work? I am completely new to running a blog but I do write in my journal on a daily basis.
I’d like to start a blog so I can easily share my own experience and feelings online.
Please let me know if you have any kind of recommendations
or tips for new aspiring blog owners. Appreciate it!
Attractive component of content. I just stumbled upon your website and in accession capital to assert that I get actually enjoyed account
your weblog posts. Any way I’ll be subscribing in your feeds
and even I achievement you get entry to consistently rapidly.
Spot on with this write-up, I truly feel this website needs much more attention. I’ll probably be returning to read through more, thanks for the info!
First off I would like to say wonderful blog! I had a quick question in which I’d like to ask if you don’t
mind. I was interested to know how you center yourself and clear your head
prior to writing. I have had a tough time clearing my thoughts
in getting my ideas out there. I do enjoy writing however it just seems like the first 10 to 15 minutes are generally lost simply
just trying to figure out how to begin. Any recommendations or tips?
Many thanks!
Thanks for finally talking about >vmrun – run your VMware VM without GUI | davejingtian.org <Liked it!
Great post!
There are a lot of vmrun parameters, for example, you can start processes inside the VM.
Here are some more vmrun examples:
http://www.sysadmit.com/2016/11/vmware-workstation-vmrun.html