web analytics
Saturday , 10 December 2016
Latest
Home » IT and Tech Blogs » Information Technology » Datacenter » VMware Server VMRUN commands – [Reference for Legacy VMware]

VMware Server VMRUN commands – [Reference for Legacy VMware]

Here is a legacy reference for anyone still on VMware Server. In January 2010, VMware announced the End of Support for VMware Server with support ending on June 30, 2011. Users are free to continue using VMware Server but are recommended to migrate to another VMware offering to gain the benefits of newer technologies.

There are several VMware offerings that can replace VMware Server depending on the functionality needed. These offerings range from VMware Player for running one or two virtual machines to VMware vSphere for running more than 100 virtual machines with centralized management and cloud scalability.

VMWARE Server VMRUN Command line

To list the currently running virtual machines on a VMware Server host:
vmrun -T server -h https://IPADDRESS-OR-HOSTNAME:PORT/sdk -u HostUser -p HostPassword list

The VMware Tools installation process may be initiated from the command line as follows, although completion of the installation will need to be performed at the console of the guest operating system:
vmrun -T server -h https://IPADDRESS-OR-HOSTNAME:PORT/sdk -u root -p mypassword installTools “[standard] VM/VM.vmx”

To register a virtual machine with the inventory on a specific VMware host, use the register commands as follows:
vmrun -T server -h https://IPADDRESS-OR-HOSTNAME:PORT/sdk -u root -p mypassword register “[standard] VM/VM.vmx”

Similarly, to unregister a virtual machine from the host inventory:
vmrun -T server -h https://IPADDRESS-OR-HOSTNAME:PORT/sdk -u root -p mypassword unregister “[standard] VM/VM.vmx”

How to STOP a VMware Server WorkStation
 vmrun -T server -h https://IPADDRESS-OR-HOSTNAME:PORT/sdk -u root -p mypassword stop “[standard] VM/VM.vmx” soft

How to START a VMware Server WorkStation
vmrun -T server -h https://IPADDRESS-OR-HOSTNAME:PORT/sdk -u root -p mypassword reset “[standard] VM/VM.vmx”

The following example takes a snapshot (named MySnapshot) of a virtual machine using the snapshot command:
vmrun -T server -h https://IPADDRESS-OR-HOSTNAME:PORT/sdk -u root -p mypassword snapshot “[standard] VM/VM.vmx” MySnapshot

The corresponding command to revert the virtual machine to the snapshot state uses the revertToSnapshot command and would read as follows:
vmrun -T server -h https://IPADDRESS-OR-HOSTNAME:PORT/sdk -u root -p mypassword revertToSnapshot “[standard] VM/VM.vmx” MySnapshot

Note that if the virtual machine is running at the time the revertToSnapshot command is issued, the virtual machine will be placed into the suspended state while the restoration process is performed. To resume the suspended virtual machine using the restored state, it may be resumed using the vmrun start command as follows:
vmrun -T server -h https://IPADDRESS-OR-HOSTNAME:PORT/sdk -u root -p mypassword start “[standard] VM/VM.vmx”

Finally, an existing snapshot may be deleted using the deleteSnapshot command:
vmrun -T server -h https://IPADDRESS-OR-HOSTNAME:PORT/sdk -u root -p mypassword deleteSnapshot “[standard] VM/VM.vmx” MySnapshot

VMRUN Usage:
-T Type=ws “Work Station”, server “for Server 2.0” and server1 “for Server 1.0”
-h Host Name
-P Host Port
-u User “Not needed in Workstation”
-p Password “Not needed in Workstation”
-gu Guest User
-gp Guest Password

POWER COMMANDS PARAMETERS DESCRIPTION
start Path to vmx file [gui:nogui] start a VM
stop Path to vmx file [hard:soft] stop a VM
reset Path to vmx file [hard:soft] reset a VM
suspend Path to vmx file [hard:soft] suspend a VM
pause Path to vmx file pause a VM
unpause Path to vmx file unpause a VM
SNAPSHOT COMMANDS PARAMETERS DESCRIPTION
snapshot Path to vmx file Snapshot name create a snapshot of a vm
deleteSnapShot Path to vmx file Snapshot name remove a snapshot of a vm
revertToSnapshot Path to vmx file Snapshot name set vm state to a snapshot
RECORD/REPLAY COMMANDS PARAMETERS DESCRIPTION
beginRecording Path to vmx file or Snapshot name begin Recording
endRecording Path to vmx file or Snapshot name end Recording
beginReplay Path to vmx file or Snapshot name begin Replay
endReplay Path to vmx file or Snapshot name end Replay

More Commands:
Controlling VMware Virtual Machines from the Command Line with vmrun
Using VMRUN to Control Virtual Machines


Thank you for reading IT Blog

Originally posted 2015-09-15 08:45:33. Republished by Blog Post Promoter

Any other comments or pointers? Please leave in the comments section below:

Comments

comments

3 comments

  1. nice; too bad VMware discontinued; vSphere now

  2. Too bad server is obsolete; vsphere

  3. VMWare Consultants

    This page has been a very useful resource, I have used it many times, and have even shared it with some of my clients. Thanks! Even though it has been a good couple of years since VMWare server was discontinued it is still a very useful source of information.

Support us!

If you like this site please follow us and click on any of these buttons!

Powered by WordPress Popup