vmrun – run your VMware VM without GUI

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.


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

About daveti

Interested in kernel hacking, compilers, machine learning and guitars.
This entry was posted in Programming and tagged , , . Bookmark the permalink.

8 Responses to vmrun – run your VMware VM without GUI

  1. Tammi says:

    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!

  2. 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?

  3. 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!

  4. jual cialis says:

    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.

  5. 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!

  6. 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!

  7. ideksacja says:

    Thanks for finally talking about >vmrun – run your VMware VM without GUI | davejingtian.org <Liked it!

  8. Vicent Vega says:

    Great post!

    There are a lot of vmrun parameters, for example, you can start processes inside the VM.

    Here are some more vmrun examples:


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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.