Your VM has become "inaccessible." Unfortunately, this is a critical error with VirtualBox that Vagrant can not cleanly recover from. Please open VirtualBox and clear out your inaccessible virtual machines or find a way to fix them.This message came from vagrant 1.1.5. Under the hood, vagrant calls the command-line VBoxManage utility provided by VirtualBox to manipulate the VMs. vagrant helpfully traps the error flag produced by VBoxManage and serves up that vague yet soothing error message. Although considerate, the message doesn't really help me diagnose the problem. Fortunately, when run in debug mode (set VAGRANT_LOG=debug then run vagrant status), vagrant will cough up all the nasty error messages from VBoxManage.
After some digging through the debug output, I discovered that even though the actual VM is intact (I can load and run it from the VirtualBox GUI app), somewhere in its guts, VirtualBox flagged this VM as "<inaccessible>". Vagrant, rightly believing what it's told, spits out the error message.
After looking at VBoxManage's help, I found that one its commands, list vms, unsurprisingly lists all of the VMs registered with VirtualBox:
$ /cygdrive/c/Program\ Files/Oracle/VirtualBox/VBoxManage.exe list vms
"precise64" {3613de48-6295-4a91-81fd-36e936beda4b}
"<inaccessible>" {2568227e-e73d-4056-978e-9ae8596493d9}
"<inaccessible>" {0fb42965-61cb-4388-89c4-de572d4ea7fc}
"<inaccessible>" {c65b1456-5771-4617-a6fb-869dffebeddd}
"<inaccessible>" {9709d3d5-ce4d-42b9-ad5e-07726823fd02}
One of those VMs flagged as inaccessible is my lost VM! Time to fix VBoxManage's wagon, by unregistering the VM as inaccessible, then re-registering it with the correct name:
- Open the configuration file for your lost VM. Mine was saved to C:\cygwin\home\Philip\VirtualBox VMs\rails-vm-v2\rails-vm-v2.vbox
- Find and copy the value of the uuid attribute of the Machine node. Mine was 9709d3d5-ce4d-42b9-ad5e-07726823fd02.
- In a Windows command prompt (or Cygwin terminal), unregister the VM with the unregistervm command, using the [uuid] value from step 2:
$ C:\Program Files\Oracle\VirtualBox\VBoxManage.exe unregistervm [uuid] - Now register the VM using the registervm command, with the path to the VM configuration file:
$ C:\Program Files\Oracle\VirtualBox\VBoxManage.exe registervm C:\cygwin\home\Philip\Virtual VMs\rails-vm-v2\rails-vm-v2.vbox
I did a little diferent on my mac, I think is the same but using the system gui.
ReplyDeleteFollwed a few of this steps: http://emptysqua.re/blog/moving-virtualbox-and-vagrant-to-an-external-drive/
I opened my virtualbox and see my innaccessible machine, I removed.
Then on finder I go to my folder where is my machines, in my case here /Users/youruser/VirtualBox VMs
Found my machine that was inaccessible and opened the folder then double clicked on the file with vbox extension. The machine get back to my virtualbox and I can vagrant up again :)
^ this.
DeleteThank you!
The "list vms" and "unregister " commands were exactly what I needed in order to get rid of my inaccessible machines. Thank you!
ReplyDeleteIt simply works !!! This has saved my 15 days of efforts. Thanks a lot.
ReplyDeleteThank you this worked for me!
ReplyDeleteoh my.. THANK YOU so much!
ReplyDeleteThank you Master, U save my life.
ReplyDeletePerfect! This worked when my VM became inaccessible due to migration to a different user account than the creator of the VM.
ReplyDeleteWhen I try step 4, I get syntax error incorrect number of parameters... any ideas as to why this is happening or how I can get around it? I really need to recover this VM
ReplyDeleteI have the same problem too after unregister . How to fix it?? Please help. I have to recover any how.
DeleteThank you ! Good tip !
ReplyDeleteI saved my vagrant vm.
In my case the *.vbox file was missing. All I had was a *.vbox-prev and a *.vbox-tmp. I copied *.vbox-tmp, which showed as the most recent modified, and renamed it to just *.vbox. Then I did "vagrant up" in my console and it worked.
ReplyDeleteThis was exactly my case and using the most recent vbox-prev file worked. Thanks.
Deleteworked for me. Thanks
DeleteI could not get registervm to work so I renamed .vbox-prev to .vbox and could then double- click to open in virtual-box. After that it works.
DeleteI got this error when my .vbox files were owned by root (not sure how this happened). The chown command fixed it for me.
ReplyDeleteThanks so much! This worked for me (had same missing .vbox file issue as Luis Salazar). This saved me from re-creating a VERY difficult setup. What's spooky is today is Friday the 13th, and you posted this solution April 13th, 2013.
ReplyDeleteSuper Awesome....It fixed Error
ReplyDeleteStill helps frustrated Vbox users like me!
ReplyDeleteMy VMs worked almost as usual (except vboxmanage list vms) after I assigned few of them to groups (vboxmanage tried to find .vbox files in the old location)
Thanks!