Wednesday, October 19, 2011

Error in API call to delete - Vagrant

These days, I'm heavily working with Vagrant and Chef. During my working sessions, I created several scripts then run "vagrant up", scripts fail then "vagrant destroy" then do some modifications, run "vagrant up" again and this loop occurs for many times. Suddenly, "vagrant up" doesn't run but arises this message:

[node1] Destroying VM and associated drives...
/var/lib/gems/1.8/gems/virtualbox-0.9.1/lib/virtualbox/com/implementer/ffi.rb:106:in `call_and_check': Error in API call to delete: 2147944126 (VirtualBox::Exceptions::COMException)
    from /var/lib/gems/1.8/gems/virtualbox-0.9.1/lib/virtualbox/com/implementer/ffi.rb:80:in `call_vtbl_function'

Looking into log files (${HOME}/.VirtualBox), I found that for an unknown reason "vagrant destroy" can not delete the directory which contains the disk attached to the virtual machine.  Solution: erase that directory by hand. Problem solved!


No comments: