Sunday, September 28, 2014

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

Path to vmx file Snapshot namePath to vmx file Snapshot namePath to vmx file Snapshot namePath to vmx file or Snapshot namePath to vmx file or Snapshot namePath to vmx file or Snapshot namePath to vmx file or Snapshot name

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


Thank you for reading IT Blog

Republished by Blog Post Promoter

No comments:

Post a Comment