You can use the vmrun command-line utility in VMware Fusion to control virtual machines and automate guest operations on VMware virtual machines. The vmrun utility is associated with the VIX API libraries.

The capabilities of the vmrun utility are summarized in the following sections.

Power Commands

Power commands control virtual machine operations. You can use power commands to start (power on), stop (power off), reset (reboot), suspend, pause, and unpause a virtual machine.

Snapshot Commands

A snapshot captures the state of a virtual machine at the time of the snapshot, including all data on virtual disks. You can then use the snapshot to revert the virtual machine to its previous state. Snapshots are useful for data backup and as a placeholder for development and testing. You can use snapshot commands to list existing snapshots of a virtual machine, create a snapshot, delete a snapshot, and revert a virtual machine to its state at the time of a snapshot. Revert to snapshot does not resume running a virtual machine, even if it was running at the time of a snapshot.

Network Adapter Commands

Network adapter commands allow you to control the virtual network adapters associated with a virtual machine. You can use network adapter commands to list, add, update, and remove a network adapter.

Host Network Commands

Host network commands allow you to list the host virtual networks and to list, update, or remove a port forwarding configuration.

Guest Operating System Commands

Guest operating system commands enable you to interact with a guest operating system in the following ways.

  • Run an executable program in the guest operating system or run an interpreted script that you provide.
  • Check if a file or directory exists in the guest, delete a file or directory, rename a file, list files, or create a new directory.
  • Copy a file from the host to the guest or from the guest to the host.
  • Create a temporary file in the guest operating system.
  • Add a shared folder from the host, make a shared folder writable in the guest, or remove a shared folder.
  • Capture a screen image from the guest.
  • List the processes running in the guest operating system or end a process.
  • Read or write a variable in the guest operating system’s environment or virtual machine state.
  • Obtain the IP address of the guest operating system.

The timeout, which is the wait period for VMware Tools, is five minutes for all guest‐related commands.

General Commands

General commands include commands that list all running virtual machines, upgrade the virtual machine hardware version, install VMware Tools in the guest operating system, check the current status of VMware Tools, and delete virtual machines. Also, you can clone a virtual machine to create a copy of the virtual machine.

Template Virtual Machine Command

The name of the template virtual machine command is downloadPhotonVM. The command allows you to download the VMware Project Photon operating system virtual machine.