Jump to content

VMWare Fusion Controller


Recommended Posts

  • 1 month later...
  • 1 month later...

First of all: great workflow! And thanks Ted :)

 

I've just installed Fusion 7 and it is not running on my end. Here is the debug output that you asked for:

[ERROR: alfred.workflow.input.scriptfilter] Code 1: 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:45:in `start'
from main.rb:125:in `<main>'
Link to comment

 

First of all: great workflow! And thanks Ted :)

 

I've just installed Fusion 7 and it is not running on my end. Here is the debug output that you asked for:

[ERROR: alfred.workflow.input.scriptfilter] Code 1: 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:45:in `start'
from main.rb:125:in `<main>'

 

You're using an old version of the script. Please install the one on packal.org.

Link to comment
  • 2 months later...

Thanks Ted!

 

I notice a issue when I use it to list VMs.

 

At line 45 of the vmware.rb, 

 

inventory = File.open(inventory_path)

 

When it runs to that line, it raise the error of the following

 

[ERROR: alfred.workflow.input.scriptfilter] Code 1: vmware.rb:49:in `split': invalid byte sequence in US-ASCII (ArgumentError)

from vmware.rb:49:in `block in inventory_list'

from vmware.rb:48:in `each_line'

from vmware.rb:48:in `inventory_list'

from vmware.rb:25:in `list'

from main.rb:11:in `generate'

from main.rb:22:in `list'

from main.rb:128:in `<main>'

 

I notice that it's because the file of ~/Library/Application Support/VMware Fusion/vmInventory is encoded in UTF-8 rather than US-ASCII.

 

I fixed the issue by change the line to 

inventory = File.open(inventory_path, "r:UTF-8")

 

Not sure if this change is a valid fix, so just give you a hand up.

Link to comment
  • 1 year later...

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...