Jump to content

VMWare Fusion Controller


Recommended Posts

I created a workflow inspired by the Parallels controller workflow. It doesn't do screen captures since VMWare requires a username / password to do that, otherwise it's pretty similar. It's on alfpt or you can download it from here: http://tedwi.se/u/d4

 

The following commands are available:

 

 

vm list - Provides a list of VM's and their status (running or stopped). Copies path to clipboard.
vm start [nogui] - List the VM's that are currently stopped so you can start them. Optionally, if you add 'nogui' it will start them without showing the VMWare window.
vm stop [hard] / vm suspend [hard] / vm reset [hard] - List the VM's that are currently running so you can stop, suspend or reset them. Optionally, if you add 'hard' it will force the action.
vm pause / vm unpause - Get a list of VM's that are currently running so you can pause or unpause them. A paused VM counts as running.
vm snapshot <name> - Get a list of VM's that are currently running so you can create a named snapshot of a VM's current state, 'name' is not optional.
vm ip - List the ip addresses of all running vms and copies the selected ip to the clipboard. The vm _must_ be running vmware tools for this to work.
vm revert <name> - revert a vm to the named snapshot.
 
2013-02-07 - Add icons (cribbed from Jonas Erikson's VirtualBox controller)
Link to comment

The workflow has been updated, both at the above link and on alfpt. I added the following:

 

vm list - now copies the vmx path to the clipboard

vm ip - list the ip addresses of all running vms and copies the selected ip to the clipboard. The vm _must_ be running vmware tools for this to work.

vm revert <name> - revert a vm to the named snapshot.

Link to comment
  • 1 month later...
  • 1 month later...

I'm noticing a weird issue with this workflow.  I use tab completion like crazy (vim, zsh, etc.) and use it with Alfred too.  When I go to start my vm I do the following:

  • activate Alfred
  • type 'vm st<TAB>'
  • wait while list is populated
  • hit '<TAB>' to complete the line

Now I would expect the Alfred line to be "vm start VM_NAME_TO_START", however it reads "vm start Start VM_NAME_TO_START" and if I hit <enter> now, the command executes but VMWare doesn't acknowledge the command.

 

Instead to get a machine to launch I have to do the following:

  • activate Alfred
  • type 'vm st<TAB>'
  • wait while list is populated
  • arrow to VM
  • hit '<enter>'
Link to comment

 

I'm noticing a weird issue with this workflow.  I use tab completion like crazy (vim, zsh, etc.) and use it with Alfred too.  When I go to start my vm I do the following:

  • activate Alfred
  • type 'vm st<TAB>'
  • wait while list is populated
  • hit '<TAB>' to complete the line

Now I would expect the Alfred line to be "vm start VM_NAME_TO_START", however it reads "vm start Start VM_NAME_TO_START" and if I hit <enter> now, the command executes but VMWare doesn't acknowledge the command.

 

Instead to get a machine to launch I have to do the following:

  • activate Alfred
  • type 'vm st<TAB>'
  • wait while list is populated
  • arrow to VM
  • hit '<enter>'

 

 

Yes, autocomplete doesn't work. There's no guarantees that the vm names are unique and that means autocompleting names isn't sufficient. What I should do is completely disable autocomplete.

Link to comment
  • 3 weeks later...
  • 3 months later...

Since updating to VMWare Fusion 6 and using this App with "Start Virtual Machine" the Workflow does not only open the selected VM also it opens the Library.

When I use the VMWare Icon in the Statusbar and select the machine it only opens the machine, not the library.

Does this workflow now maybe also need an update because of VMWare 6 ??

 

Thanks in advance for your reply and maybe updating the Workflow. :)

Link to comment

Since updating to VMWare Fusion 6 and using this App with "Start Virtual Machine" the Workflow does not only open the selected VM also it opens the Library.

When I use the VMWare Icon in the Statusbar and select the machine it only opens the machine, not the library.

Does this workflow now maybe also need an update because of VMWare 6 ??

 

Thanks in advance for your reply and maybe updating the Workflow. :)

 

Probably needs updating. I wasn't planning on upgrading to VMF 6 just yet, it doesn't have any features I've been waiting for.

Link to comment
  • 2 weeks later...
  • 7 months later...

I realize this has been around a while now, but could you verify what 'nogui' does? I assumed it would launch without the VM Library window showing. It seems instead to be launching in some fashion such that no window displays at all. That is, I cannot seem to find the VM anywhere on the CMD+Tab or Dock or menubar lists. That seems... odd.

Link to comment

I realize this has been around a while now, but could you verify what 'nogui' does? I assumed it would launch without the VM Library window showing. It seems instead to be launching in some fashion such that no window displays at all. That is, I cannot seem to find the VM anywhere on the CMD+Tab or Dock or menubar lists. That seems... odd.

 

"The nogui option suppresses the user interface, including startup dialog box, to allow non‐interactive scripting."

 

Nothing shows when you use nogui. You have to start the VMWare Fusion app separately.

Link to comment
  • 2 weeks later...
  • 2 months later...

Hope somebody can help.

What can I do when the Workflow is not showing and of my three VM in the list?

When I use the "vm start" and hit enter, there is no selection anymore.

I deleted the workflow and reinstalled it but that did not fix the problem.

 

What exists is

~/Library/Application Support/VMware Fusion/vmInventory

http://bit.ly/1sigdiA

 

What exists but looks empty  /Library/Application Support/VMware/VMware Fusion/Shared/vmInventory

http://bit.ly/1qGiL6U

 

thanks in advance.

Edited by DJay
Link to comment

Hope somebody can help.

What can I do when the Workflow is not showing and of my three VM in the list?

When I use the "vm start" and hit enter, there is no selection anymore.

I deleted the workflow and reinstalled it but that did not fix the problem.

 

What exists is

~/Library/Application Support/VMware Fusion/vmInventory

http://bit.ly/1sigdiA

 

What exists but looks empty  /Library/Application Support/VMware/VMware Fusion/Shared/vmInventory

http://bit.ly/1qGiL6U

 

thanks in advance.

 

Not sure why that happened. I'm not a VMWare expert. :-)

 

This knowledge base article says you can remove the file and restart VMWare to recreate it - http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2031100

 

There's also something online about registering VMWare instances to add them to the file, not sure how to go about that though.

Link to comment

Not sure why that happened. I'm not a VMWare expert. :-)

 

This knowledge base article says you can remove the file and restart VMWare to recreate it - http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2031100

 

There's also something online about registering VMWare instances to add them to the file, not sure how to go about that though.

 

I'm having the same issue on a brand new computer.  I dug into it a bit and exciting the vm list command manually Sfrom inside the workflow directory gives me the following error.

% ruby main.rb list
vmware.rb:63:in `block in inventory_list': undefined method `length' for nil:NilClass (NoMethodError)
	from vmware.rb:63:in `each'
	from vmware.rb:63:in `find_all'
	from vmware.rb:63:in `inventory_list'
	from vmware.rb:25:in `list'
	from main.rb:11:in `generate'
	from main.rb:22:in `list'
	from main.rb:119:in `<main>'
Link to comment

Okay.. did a restart an now all three machines are in the list. 

but wehen I select one of them.. VMWare is doing something and it sounds like it starts the machine but the VMWare Fusion Windows does not open. Nothing to see. I have to start VMWare app an then the window with the already running VM pops up. strange..  any idea? thx in advance.

VMWare Fusion Version 6.0.4 (1887983)

Link to comment

Okay.. did a restart an now all three machines are in the list. 

but wehen I select one of them.. VMWare is doing something and it sounds like it starts the machine but the VMWare Fusion Windows does not open. Nothing to see. I have to start VMWare app an then the window with the already running VM pops up. strange..  any idea? thx in advance.

VMWare Fusion Version 6.0.4 (1887983)

 

It's because of line 44 in main.rb:

 

  arg = arg.nil? ? "nogui" : arg
 
By default the VMs are started without a window (nogui). It's a "feature". I personally only use VMs to run servers and then access those servers from OS/X. You have a couple of options:
 
1. Change that line in the workflow to:
 
  arg = arg.nil? ? "" : arg
 
2. Add 'gui' to the end when you start a vm, e.g., 'vm start gui' and then select the vm you want to start.
 
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...