11.0

Table Of Contents
Network Adapter Commands
n List all network adapters on a virtual machine.
vmrun listNetworkAdapters Win10.vmwarevm/Win10.vmx
n Add a NAT network adapter to a virtual machine.
vmrun addNetworkAdapter Win10.vmwarevm/Win10.vmx nat
Host Network Commands
n List all networks on the host.
vmrun listHostNetworks
n Add a port forwarding on a host network with examples provided of the host network name, protocol,
host port, guest IP address, guest port, and description.
sudo vmrun setPortForwarding vmnet2 tcp 8082 1.1.1.2 88 portforwarding-description
Running Guest Applications
Most vmrun guest operations require VMware Tools to be installed on the guest operating system.
n Start the command tool, minimized, on a Windows guest.
vmrun -gu guestUser -gp guestPassword runProgramInGuest Win10.vmwarevm/Win10.vmx -
interactive cmd.exe
n Start the command tool on a Windows guest as an active window on the desktop.
vmrun -gu guestUser -gp guestPassword runProgramInGuest Win10.vmwarevm/Win10.vmx -
activeWindow -interactive cmd.exe
n Run a script on a Windows guest, with Perl as the script interpreter. Two separate examples follow.
vmrun -gu guestUser -gp guestPassword runScriptInGuest Win10.vmwarevm/Win10.vmx -
interactive "C:\perl\bin\perl.exe" "system('notepad.exe');"
vmrun -gu guestUser -gp guestPassword runScriptInGuest Win10.vmwarevm/Win10.vmx -
interactive "" "C:\perl\perl.exe C:\script.pl"
n Run a batch script and keep running afterwards. To use cmd.exe on Windows, you must specify the
script interpreter as null.
vmrun -gu guestUser -gp guestPassword runScriptInGuest Win10.vmwarevm/Win10.vmx ""
"cmd.exe /k \"C:\\Program Files\\Microsoft Visual Studio\\VC\\vcvarsall.bat\" x86"
n Run a Bash shell script file or Perl script on a Linux guest.
vmrun -gu guestUser -gp guestPassword runScriptInGuest Ubuntu16.vmwarevm/Ubuntu16.vmx -
interactive "" "/bin/bash myscript"
vmrun -gu guestUser -gp guestPassword runScriptInGuest Ubuntu16.vmwarevm/Ubuntu16.vmx -
interactive "/usr/bin/perl" "system('firefox');"
n Start an X clock on a Linux guest, which requires the -display option to appear on the console.
Using VMware Fusion
VMware, Inc. 194