Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VM has become 'inaccessible' - Vagrant no longer working

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 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.

I could try removing my existing .vagrant folder and doing a vagrant up but that will take forever on our very slow internet speeds - can anyone suggest how to fix this quickly?

like image 747
Zabs Avatar asked Jun 05 '15 09:06

Zabs


People also ask

Why is my virtual machine inaccessible?

What does “inaccessible” mean for a VM? If your virtual machine is inaccessible, it means the server is not able to open a . vmx file. There can be many reasons for this, but most often it is due to the folder being renamed or some error in the storage array.

Can vagrant work without VirtualBox?

Solutions that work with Vagrant include VirtualBox, VMware, Docker, Hyper-V, and custom solutions.

How do I enable vagrant GUI?

You can go to display settings and enable the Remote Display Server while it's running (you may want to change the default port), and then use an RDP viewer (On Windows use Remote Desktop Connection) to access the GUI.


4 Answers

this works for me:

In my "C:\Users{user}\VirtualBox VMs{vm-id}" folder are two files

  • {vm-id}.vbox-prev
  • {vm-id}.vbox-tmp

Renaming from "{vm-id}.vbox-tmp" to "{vm-id}.vbox" solved my problem and i can call "vagrant up"

like image 157
Ultimate Fighter Avatar answered Oct 23 '22 20:10

Ultimate Fighter


You can simply delete the .vagrant folder from your project folder and run vagrant up again.

like image 21
user5454185 Avatar answered Oct 23 '22 18:10

user5454185


This worked for me

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 "". 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:

  1. 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
  2. Find and copy the value of the uuid attribute of the Machine node. Mine was 9709d3d5-ce4d-42b9-ad5e-07726823fd02.
  3. 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]
    
  4. 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
    

    Now you should be able to start the VM as expected.

Source : http://www.psteiner.com/2013/04/vagrant-how-to-fix-vm-inaccessible-error.html

like image 18
Zabs Avatar answered Oct 23 '22 18:10

Zabs


Nothing here worked for me.

  1. I deleted (or renamed see first comment) all files from

C:\Users[YourNameHere].VirtualBox

  1. Run vagrant again:

    vagrant up

Now it's up.

like image 9
osanger Avatar answered Oct 23 '22 20:10

osanger