VM has become 'inaccessible' - Vagrant no longer working

后端 未结 12 2166
礼貌的吻别
礼貌的吻别 2021-01-30 13:24

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         


        
相关标签:
12条回答
  • 2021-01-30 13:26

    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"

    0 讨论(0)
  • 2021-01-30 13:29

    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.

    0 讨论(0)
  • 2021-01-30 13:31

    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

    0 讨论(0)
  • 2021-01-30 13:31

    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.

    0 讨论(0)
  • 2021-01-30 13:35

    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
    
    0 讨论(0)
  • 2021-01-30 13:36

    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 
    
    0 讨论(0)
提交回复
热议问题