Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant fails to recover if virtual machine is deleted on disk #1848

thasmo opened this issue Jun 21, 2013 · 3 comments


None yet
3 participants
Copy link

commented Jun 21, 2013

When deleting the VM files on the disk directly (e.g. in the Windows explorer) Vagrant prints this error:

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.

VirtualBox itself doesn't show the VMs either, so I can not delete the VM anywhere and Vagrant gives this error on every command given - even on "vagrant destroy".

The only way to get this fixed was to delete the ".vagrant" directory.


This comment has been minimized.

Copy link

commented Jun 21, 2013

I guess this is because .vagrant directory contains the ID of the VirtualBox VM.


This comment has been minimized.

Copy link

commented Jun 23, 2013

Probably, but Vagrant handles it just fine if the VM is deleted from within VirtualBox directly - I think! But if the VM directory is deleted from the command line or Windows explorer it seems to behave different. Btw. because issues arose with VirtualBox 4.2.14 lately - I'm on 4.2.12 still.


This comment has been minimized.

Copy link

commented Jul 20, 2013

As the error message states: this is a corruption issue and Vagrant can't cleanly just clean up. Sure, Vagrant could PRETEND "oh the VM must not exist anymore." But there are actually many corruption cases where the VM may still actually exist. If Vagrant just ignored it, you could end up losing a lot of disk space over time.

Instead, the proper response is to actually track down the cause of the corruption by opening up Virtualbox, as it says, and fixing it.

Deleting the VM directory will corrupt your VM. VirtualBox wants to delete that itself and maintains state all over the place.

@mitchellh mitchellh closed this Jul 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.