The vmrun utility installs with Workstation and VMware Fusion. On Workstation and VMware Fusion, you do not need to specify a remote host name or port if you are running guest operating systems on the local host. This post has been tested using VMware Workstation 9. Use the -T flag for Workstation, Player, and VMware Fusion :
vmrun -T ws vmrun -T player vmrun -T fusion
Where you can run vmru ?
If you are running VMware Workstation, a copy of vmrun is included in the folder where you installed
Workstation :
32‐bit systems – C:\Program Files\VMware\VMware Workstation
64‐bit systems – C:\Program Files (x86)\VMware Workstation
Usage: vmrun [AUTHENTICATION-FLAGS] COMMAND [PARAMETERS]
1. Power on Virtual machine with Workstation on a Windows host :
C:\Program Files\VMware\VMware Workstation>vmrun -T ws start "C:\Virtual Machine s\CentOS6.3\CentOS6.3.vmx"
2. Shutdown Virtual machine running on Workstation for Windows :
C:\Program Files\VMware\VMware Workstation>vmrun -T ws stop "C:\Virtual Machines \CentOS6.3\CentOS6.3.vmx" soft
3. Reboot Virtual machine running on Workstation for Windows :
C:\Program Files\VMware\VMware Workstation>vmrun -T ws reset "C:\Virtual Machine s\CentOS6.3\CentOS6.3.vmx" soft
Thank you very much , but how this can be done in a remote server ?
Use VMRUN to reboot a vm that is in a remote vmware serveR ?
Great post! Thank you!
There are a lot of useful vmrun parameters:
You can also start processes inside the VM.
For example, starting a cmd.exe:
vmrun -T ws -gu XXXX -gp YYYY runProgramInGuest “F:\VMWare\VMW-Work\VM3 – (VCenter)\S1.vmx” -activeWindow cmd.exe
Extracted from:
http://www.sysadmit.com/2016/11/vmware-workstation-vmrun.html