Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

Remote contro of VMWare Workstation 9.x up to 16.x via vmrun

Digital solution partner

Remote contro of VMWare Workstation 9.x up to 16.x via vmrun

VMWare Workstation 9 on Windows and Linux provides command line commands to manage the status of virtual machines, all through a single “vmrun” command.

This commands are also tested on VMWare Workstation 16.

For example in Linux to make a virtual machine suffer you can connect to the shell where your VMWare Workstation is installed and with the following command start a virtual machine:

pay attention to the “nogui” parameter that allows you to execute the command without requiring the graphical interface.

or to see the list of active virtual machines:

the entire documentation of the vmrun command can be found at the following link : http://www.vmware.com/pdf/vix160_vmrun_command.pdf

The most common management commands via vmrun are:

  • To runs a VMware guest without GUI:
    vmrun -T ws start /path/to/vm.vmx nogui
  • To stop a virtual machine:
    vmrun -T ws stop /path/to/vm.vmx nogui
  • Pause:
    vmrun -T ws pause /path/to/vm.vmx nogui
  • Unpause:
    vmrun -T ws unpause /path/to/vm.vmx nogui
  • To create a Snapshot with the vmrun command:
    vmrun -T ws snapshot /path/to/vm.vmx SnapShotName nogui
  • To revert to a snapshot:
    vmrun -T ws revertToSnapshot /path/to/vm.vmx SnapShotName nogui
  • List running virtual machines:
    vmrun list
  • To install guest tools:
    vmrun -T ws installTools /path/to/vm.vmx

 

Following the restart of your workstation, it could also happen if updates have been made that the vmrun command at the start of a VM responds with the error “Error: The operation was canceled”, this often means that it is necessary to recompile the modules of VMWare after upgrading your system’s kernel.

In order to recompile the vmware kernel modules via shell, i.e. from the command line, you can use the following command:

 

 

 

rgds
ivan

Leave a Reply