{"id":224,"date":"2011-03-16T22:45:22","date_gmt":"2011-03-16T21:45:22","guid":{"rendered":"http:\/\/daniel.hepper.net\/blog\/?p=224"},"modified":"2011-03-16T22:45:22","modified_gmt":"2011-03-16T21:45:22","slug":"fixing-a-messed-up-vagrant-installation","status":"publish","type":"post","link":"https:\/\/daniel.hepper.net\/blog\/2011\/03\/fixing-a-messed-up-vagrant-installation\/","title":{"rendered":"Fixing a messed up Vagrant installation"},"content":{"rendered":"<p>I&#8217;m currently struggling with what seems like a <a href=\"http:\/\/www.virtualbox.org\/ticket\/8474\">bug in Virtualbox<\/a> that affects the new Core i7 MacBooks. While trying to fix it by building Virtualbox from source, uninstalling and reinstalling, I managed to mess up a box managed with <a href=\"http:\/\/vagrantup.com\">Vagrant<\/a>, rendering it inaccessible.<\/p>\n<p>If you find yourself in a similar situation, you can try to fix it with the <code>VBoxManage<\/code> command. <\/p>\n<p><code>$ VBoxManage list vms<br \/>\n\"<inaccessible>\" {b68ed7a7-6e72-4f16-a438-8775cd80d9b3}<br \/>\n$ VBoxManage unregistervm {b68ed7a7-6e72-4f16-a438-8775cd80d9b3} --delete<br \/>\nVBoxManage: error: The object is not ready<br \/>\nVBoxManage: error: Details: code E_ACCESSDENIED (0x80070005), component Machine, interface IMachine, callee nsISupports<br \/>\nContext: \"Delete(ComSafeArrayAsInParam(aMedia), pProgress.asOutParam())\" at line 175 of file VBoxManageMisc.cpp<br \/>\nSegmentation fault<\/code><\/p>\n<p>As you can see, it died with a segmentation fault, but the broken box was now gone and I could restart it with <code>vagrant up<\/code>.<br \/>\n<!--more--><br \/>\nFor reference, this is the lovely stack trace <code>vagrant up<\/code> greeted me with:<\/p>\n<p><code>$ vagrant up<br \/>\n\/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/com\/implementer\/ffi.rb:95:in `call_and_check': Error in API call to get_name: 2147942405 (VirtualBox::Exceptions::FFIException)<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/com\/implementer\/ffi.rb:69:in `call_vtbl_function'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/com\/implementer\/ffi.rb:36:in `read_property'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/com\/abstract_interface.rb:122:in `read_property'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/com\/abstract_interface.rb:64:in `block in property'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model\/interface_attributes.rb:93:in `block in spec_to_proc'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model\/interface_attributes.rb:32:in `call'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model\/interface_attributes.rb:32:in `load_interface_attribute'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model\/interface_attributes.rb:13:in `block in load_interface_attributes'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model\/interface_attributes.rb:12:in `each'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model\/interface_attributes.rb:12:in `load_interface_attributes'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/vm.rb:251:in `initialize_attributes'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/vm.rb:246:in `initialize'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/vm.rb:229:in `new'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/vm.rb:229:in `block in populate_array_relationship'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/vm.rb:228:in `each'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/vm.rb:228:in `populate_array_relationship'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/vm.rb:218:in `populate_relationship'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model\/relatable.rb:242:in `populate_relationship'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model.rb:215:in `block in populate_relationship'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model\/dirty.rb:129:in `ignore_dirty'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model.rb:215:in `populate_relationship'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/global.rb:93:in `load_relationship'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model\/relatable.rb:192:in `read_relationship'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/abstract_model\/relatable.rb:146:in `block in relationship'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/vm.rb:185:in `all'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/virtualbox-0.8.3\/lib\/virtualbox\/vm.rb:193:in `find'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/vagrant-0.7.2\/lib\/vagrant\/vm.rb:13:in `find'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/vagrant-0.7.2\/lib\/vagrant\/environment.rb:378:in `block in load_vms!'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/vagrant-0.7.2\/lib\/vagrant\/environment.rb:377:in `each'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/vagrant-0.7.2\/lib\/vagrant\/environment.rb:377:in `load_vms!'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/vagrant-0.7.2\/lib\/vagrant\/environment.rb:144:in `vms'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/vagrant-0.7.2\/lib\/vagrant\/environment.rb:180:in `multivm?'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/vagrant-0.7.2\/lib\/vagrant\/command\/helpers.rb:19:in `target_vms'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/vagrant-0.7.2\/lib\/vagrant\/command\/up.rb:8:in `execute'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/task.rb:22:in `run'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/invocation.rb:118:in `invoke_task'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/invocation.rb:124:in `block in invoke_all'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/invocation.rb:124:in `each'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/invocation.rb:124:in `map'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/invocation.rb:124:in `invoke_all'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/group.rb:226:in `dispatch'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/invocation.rb:109:in `invoke'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/vagrant-0.7.2\/lib\/vagrant\/cli.rb:45:in `block in register'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/task.rb:22:in `run'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/invocation.rb:118:in `invoke_task'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor.rb:263:in `dispatch'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/thor-0.14.6\/lib\/thor\/base.rb:389:in `start'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/gems\/vagrant-0.7.2\/bin\/vagrant:15:in `<top (required)>'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/bin\/vagrant:19:in `load'<br \/>\n        from \/Users\/danielhepper\/.rvm\/gems\/ruby-1.9.2-p180\/bin\/vagrant:19:in `<main>'<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m currently struggling with what seems like a bug in Virtualbox that affects the new Core i7 MacBooks. While trying to fix it by building Virtualbox from source, uninstalling and reinstalling, I managed to mess up a box managed with &hellip; <a href=\"https:\/\/daniel.hepper.net\/blog\/2011\/03\/fixing-a-messed-up-vagrant-installation\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-224","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts\/224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":3,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"predecessor-version":[{"id":227,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/posts\/224\/revisions\/227"}],"wp:attachment":[{"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.hepper.net\/blog\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}