You can easily start / stop / pause or take a snapshot from a shell prompt under a Linux / Windows host using vmrun command. This is useful if you do not want to run web interface for starting and/or stopping VMs.
vmrun commands
vmrun -u USER -h 'https://vmware.server.com:8333/sdk' -p PASSWORD COMMAND [PARAMETERS]
OR
vmrun -u USER -h 'https://vmware.server.com:8333/sdk' -p PASSWORD start "[storage] Path/to/.vmx"
Where,
=> -u USER : VMWare server username
=> -h 'https://vmware.server.com:8333/sdk' : Local or remote server FQDN / IP address
=> -p PASSWORD : VMWare server password
=> COMMAND [PARAMETERS] : Command can be any one of the following:
POWER COMMANDS PARAMETERS DESCRIPTION
-------------- ---------- -----------
start Path to vmx file Start a VM
[gui|nogui]
stop Path to vmx file Stop a VM
[hard|soft]
reset Path to vmx file Reset a VM
[hard|soft]
suspend Path to vmx file Suspend a VM
[hard|soft]
pause Path to vmx file Pause a VM
unpause Path to vmx file Unpause a VM
Start a VM called CentOS
To start a virtual machine with Vmware server 2.0 on a Linux host, stored on storage called iscsi:
vmrun -T server -h 'https://vms.nixcraft.in:8333/sdk' -u root -p 'secrete' start "[iSCSI] CentOS52_64/CentOS52_64.vmx"
To start a virtual machine with Workstation on a Windows host (open command prompt by visiting Start > Run > cmd > [enter] key):
vmrun -T ws start "c:\My VMs\centos\centos.vmx"
Stop a VM called CentOS
To stop a virtual machine with Vmware server 2.0 on a Linux host, stored on storage called iscsi:
vmrun -T server -h 'https://vms.nixcraft.in:8333/sdk' -u root -p 'secrete' stop "[iSCSI] CentOS52_64/CentOS52_64.vmx"
Reset a VM called Debian
To reset a virtual machine with Vmware server 2.0 on a Linux host, stored on storage called DISK3:
vmrun -T server -h 'https://sun4k.nixcraft.co.in:8333/sdk' -u root -p 'secrete' reset "[DISK3] Debian5/Debian5.vmx"
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop



![VMWare: List all running Virtual Machines [ VMs ] / VPS From a Shell Prompt](http://s13.cyberciti.org/images/shared/rp/3/13.jpg)









{ 5 comments… read them below or add one }
How do you learn the value of
[storage]
@ james
[storage] is most likely “[standard]” in case you haven’t changed your default storage or the vm is saved in a different storage.
You can get your storage in the web interface when your click on your vm in “inventory” then go to summary . Scroll down to “hardware” and click on your harddisk and choose “edit”. At the top of the window you can see your datastore under “disk image”.
Or, just use the list command from the previous article. It will list the [storage] along with the image item.
Thank you, so usefull.
I was trying for a while until added “[standard] ” to the virtual machine route (as you explain in previous article).
fantastic points altogether, you just gained emblem new|a new} reader. What would you recommend about your submit that you simply made some days in the past? Any sure?