For some reason this morning when I run \'vagrant up\' I get the following error (this has worked absolutely fine for over a year)
Your VM has b
this works for me:
In my "C:\Users{user}\VirtualBox VMs{vm-id}" folder are two files
Renaming from "{vm-id}.vbox-tmp" to "{vm-id}.vbox" solved my problem and i can call "vagrant up"
Nothing here worked for me.
C:\Users[YourNameHere].VirtualBox
Run vagrant again:
vagrant up
Now it's up.
Find the one which is inaccessible with one of the following commands:
$ vagrant global-status
or:
$ VBoxManage list vms
Then note the GUID, and remove it from VirtualBox.xml
file (OS X: ~/Library/VirtualBox/VirtualBox.xml
, Windows: %HOME%/.VirtualBox
).
Alternatively remove .vagrant
folder from the folder where is your VM and start from scratch (vagrant up
).
See also: Cannot Delete "Inaccessible" virtual machines from Virtualbox GUI at VirtualBox
My problem was the same, but the fix was quite different... my VMs are stored on a network drive, accessible by NFS share. The remote drive had failed to come up after a reboot, so the VMs weren't accessible. Took me a while to realise the reason, and meantime hunted all over SO without a solution.
Then I realised, facepalmed, mounted the paths, and it all worked.
So in a nutshell, it was a path issue.
I felt I should include it here in case it helps someone in the same boat.
By chance if someone deletes your vm from VirtualBox VMs folder manually, also in this case your vm would become inaccessible. However, you will not be able to get your machine back but vagrant will still show your vm in the list. To remove it completely from the vm list, go to
\.vagrant.d\data\machine-index
and open index file. Delete the reference of inaccessible machine. Next time when you run below command, it will not show your inaccessible machine.
vagrant global-status --prune
By using command line, you can remove all inaccessible boxes by using an one-liner:
VBoxManage list vms |grep inaccessible |cut -d "{" -f2 |cut -d "}" -f1 |xargs -L1 VBoxManage unregistervm