Skip to content

Error in API call to get_name: 2147942405 (VirtualBox::Exceptions::FFIException) #187

Closed
vangberg opened this Issue Oct 10, 2010 · 8 comments

6 participants

@vangberg

Suddenly trying to run destroy, up or status results in this:

/Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/com/implementer/ffi.rb:95:in `call_and_check': Error in API call to get_name: 2147942405 (VirtualBox::Exceptions::FFIException)
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/com/implementer/ffi.rb:69:in `call_vtbl_function'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/com/implementer/ffi.rb:36:in `read_property'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/com/abstract_interface.rb:122:in `read_property'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/com/abstract_interface.rb:64:in `block in property'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model/interface_attributes.rb:93:in `block in spec_to_proc'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model/interface_attributes.rb:32:in `call'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model/interface_attributes.rb:32:in `load_interface_attribute'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model/interface_attributes.rb:13:in `block in load_interface_attributes'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model/interface_attributes.rb:12:in `each'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model/interface_attributes.rb:12:in `load_interface_attributes'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/vm.rb:253:in `initialize_attributes'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/vm.rb:248:in `initialize'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/vm.rb:231:in `new'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/vm.rb:231:in `block in populate_array_relationship'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/vm.rb:230:in `each'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/vm.rb:230:in `populate_array_relationship'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/vm.rb:220:in `populate_relationship'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model/relatable.rb:242:in `populate_relationship'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model.rb:215:in `block in populate_relationship'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model/dirty.rb:129:in `ignore_dirty'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model.rb:215:in `populate_relationship'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/global.rb:93:in `load_relationship'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model/relatable.rb:192:in `read_relationship'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/abstract_model/relatable.rb:146:in `block in relationship'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/vm.rb:187:in `all'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/virtualbox-0.7.5/lib/virtualbox/vm.rb:195:in `find'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/vagrant-0.6.5/lib/vagrant/vm.rb:14:in `find'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/vagrant-0.6.5/lib/vagrant/environment.rb:351:in `block in load_vms!'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/vagrant-0.6.5/lib/vagrant/environment.rb:350:in `each'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/vagrant-0.6.5/lib/vagrant/environment.rb:350:in `load_vms!'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/vagrant-0.6.5/lib/vagrant/environment.rb:133:in `vms'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/vagrant-0.6.5/lib/vagrant/command/status.rb:9:in `route'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/task.rb:22:in `run'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/invocation.rb:124:in `block in invoke_all'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/invocation.rb:124:in `each'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/invocation.rb:124:in `map'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/invocation.rb:124:in `invoke_all'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/group.rb:226:in `dispatch'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/invocation.rb:109:in `invoke'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/vagrant-0.6.5/lib/vagrant/cli.rb:45:in `block in register'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/task.rb:22:in `run'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor.rb:246:in `dispatch'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.2/lib/thor/base.rb:389:in `start'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/gems/vagrant-0.6.5/bin/vagrant:15:in `<top (required)>'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/bin/vagrant:19:in `load'
from /Users/harry/.rvm/gems/ruby-1.9.2-p0/bin/vagrant:19:in `<main>'
@mitchellh
Owner

Hm, this usually happens if VirtualBox gets in a weird state all by itself. Can you open up the VirtualBox GUI and see what the status of your VMs are in there? Are they what you expect?

@mitchellh
Owner

Due to inactivity, closing this. Need more information :)

@tolbrino

For reference, I ran into the same problem. Due to references in VBox's config file to VMs which didn't exist anymore, the get_name crashed. The easy fix was deleting the obsolete entries via the GUI.

@rtaycher
rtaycher commented Mar 6, 2011

Note I had this problem, opened up Virtualbox gui deleted boxes/disk that were missing, closed Virtualbox, and the problem went away.

@bascht
bascht commented Mar 7, 2011

Is there any way to work around that problem?
I have some other ms windows virtual machines, symlinked to an external drive - so I have no chance to fire up the vagrant boxes without plugging in my external hard disk…

@mitchellh
Owner

bascht,

There isn't currently a solution to this, but I'm working on a new version of virtualbox gem which will hopefully fix this!

Best,
Mitchell

@bascht
bascht commented Mar 8, 2011

So I need to free up some ssd space. ;-)
Thank you for your feedback!

Bascht

@mbbx6spp

Not sure if this helps anyone, but I got this again this morning and looked into the files under my "${HOME}/VirtualBox VMs/" directory and noticed the .vbox file was missing. I had a .vbox-tmp and the typical .box-prev file. So my hackish solution was to rename the .vbox-tmp file to .vbox and everything just worked.

HTH
Susan

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.