Vmware server comes with the nifty vmware-cmd utility. It allows an administrator to perform various operations on a virtual machine from Linux command line / shell prompt such as:

=> Stop / Start VM

=> Get VM status

=> Setup variables

=> Powerdown VM and much more

Task: Lists the virtual machines on the local server

You can list all servers and config file, enter:
# vmware-cmd -l


Turn on VM / Power up VPS

Just pas start option to vmware-cmd,
# vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx start

To stop VM/VPS, enter:
# vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx stop

To reset VM/VPS, enter:
# vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx reset

To suspend VM/VPS, enter:
# vmware-cmd /nas/vms/FreeBSD/FreeBSD.vmx suspend

Find out if OpenBSD VM is on or off:
# vmware-cmd /disk2.vmware/vms/OpenBSD/OpenBSD.vmx getstate

getstate() = off

vmware-cmd offers other options, please consult VMWARE documentation for more information.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 12 comments so far... add one
CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
12 comments… add one
  • Sir Geek Jul 3, 2007 @ 16:04

    One minor problem with your 1st command to list the VMs. The command should be vmware-cmd -l

  • 🐧 nixCraft Jul 3, 2007 @ 17:08

    Sir Geek,

    Thanks for the heads up… post has been updated

  • Husain Dec 13, 2007 @ 14:14

    I have installed VMWare Server 1.0.4 on RHEL5.1 64 bit version. When I try to power on a virtual machine the OS panics. I am not a linux expert so I have no idea as to how to deal with this issue. I do not have physical access to the server and remotely I was able to take a screenshot of the panic screen. The last line read “Kernel Panic – not syncing: Fatal exception”.

    Your help would be highly appreciated.

  • Mark Hentov Feb 26, 2008 @ 16:03

    Hmm. After a reboot vmware seems not to be running. I can’t connect or start any virtual machines.
    What daemons need to be enabled with chkconfig? What modules need to load?

  • 🐧 nixCraft Feb 26, 2008 @ 17:32

    /etc/init.d/vmware start

    Did you upgraded kernel? If so you need to reconfigure vmware
    vmware-config.pl -d

  • Jay May 8, 2008 @ 17:57

    Thank you!

    A friends server went down due to power failure and this info helped me solve the problem.

    Where can i get a complete list of such commands?

    oh and by the way, you still need to change the -1 to -l (L) because had he not have seen the error we would not have been able to use the info here. Also, please let people know that the information after # vmware-cmd /this/blah/blah is the path and will be different for all users

    Cheers and thanks again


  • Phil Jul 28, 2008 @ 14:17

    vmware-cmd -?

  • Emil Mar 4, 2009 @ 6:56

    I’m running VMWare on a Fedora Server, and I would like to start/stop the virtual machines withouth VNC-ing to the server, from a terminal window. The thing is that I can’t find vmware-cmd anywhere. Where can I find that?

  • rmccurdy Mar 11, 2010 @ 13:09

    batch file startup

    for /f “delims=” %%i IN (‘dir/s/b c:rootwars*.vmx’) do (
    “C:Program FilesVMwareVMware Servervmware-cmd” -v “%%i” start

  • Shivaji Jun 17, 2010 @ 14:03

    Hi Vivek,
    Thanks. This information helped me.

  • David Aug 12, 2010 @ 14:12

    how can I restart a machine on vmware remotely?
    I mean I have a few vpss on Vmware in my server, now I’d like to restart it remotely from my pc.

  • anand mb Dec 3, 2010 @ 13:56

    gud one.. any dumbo can understand.. keep sharing the knowlege & god bless.

    Anand MB

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum