This project borrows very heavily from the original by Mo Lawson, and is an extension of his existing work. The additional functionality included here allows VMs to be started in headless or GUI mode, allows users to perform a hard stop (in addition to the stop/guest shutdown), and additionally includes hard and soft reset of VMs.
Currently, the following commands are supported:
Start any VM.
Use the command (⌘) key as a modifier to start in headless mode
Shutdown any running VM.
Use the command (⌘) key as a modifier to perform a hard stop
Reset any running VM.
Use the command (⌘) key as a modifier to perform a hard reset
Suspend any running VM.
List all running VMs.
Once you have Alfred installed, along with the Powerpack, you can download the latest release of the workflow file, and double click it to install.
For the vm start
command to work, the workflow needs to know where you keep your VMware images. This is configured in the environment variables of the workflow.
For some reason this has to be the absolute path to the folder, so using /Users/<username>/Virtual Machines
instead of ~/Virtual Machines
.
Environment variables can be configured by pressing this button (in the top right corner):
NB: The workflow does not search directories recursively (i.e. look in subdirectories). It simply looks for files ending in .vmwarevm
in the directories listed.
The workflow assumes that you have VMware Fusion.app
installed in the default location, /Applications
. Since the vmrun
tool lives within the app package, it uses this default to issue commands.
If you have it installed somewhere else, you'll need to edit the workflow script. To do that, in Alfred preferences, find the VMware Fusion workflow and double click on any of the squares within the workflow. Near the bottom right of the window that appears, there's a button that says "Open workflow folder." Click that and you're looking for the vmware/alfred.rb
file. Change the following line to point to your vmrun
location:
@vmrun = '/Applications/VMware Fusion.app/Contents/Library/vmrun'