VM 变得“无法访问"——Vagrant 不再工作 [英] VM has become 'inaccessible' - Vagrant no longer working

查看:27
本文介绍了VM 变得“无法访问"——Vagrant 不再工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天早上由于某种原因,当我运行vagrant up"时,我收到以下错误(这已经运行了一年多)

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.

我可以尝试删除我现有的 .vagrant 文件夹并执行 vagrant up,但这将永远需要我们非常慢的互联网速度 - 谁能建议如何快速解决这个问题?

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?

推荐答案

这对我有用

在对调试输出进行一些挖掘之后,我发现即使实际的 VM 完好无损(我可以从 VirtualBox GUI 应用程序加载和运行它),但在其内部,VirtualBox 将该 VM 标记为".Vagrant 正确地相信它所说的,吐出错误信息.

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.

在查看 VBoxManage 的帮助后,我发现其中一个命令 list vms 毫不奇怪地列出了所有在 VirtualBox 中注册的 VM:

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}

其中一个标记为无法访问的 VM 是我丢失的 VM!是时候修复 VBoxManage 的旅行车了,将虚拟机取消注册为不可访问,然后使用正确的名称重新注册:

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. 打开丢失的虚拟机的配置文件.我的被​​保存到 C:\cygwin\home\Philip\VirtualBox VMs\rails-vm-v2\rails-vm-v2.vbox
  2. 查找并复制 Machine 节点的 uuid 属性值.我的是 9709d3d5-ce4d-42b9-ad5e-07726823fd02.
  3. 在 Windows 命令提示符(或 Cygwin 终端)中,使用 unregistervm 命令取消注册 VM,使用步骤 2 中的 [uuid] 值:

  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]

  • 现在使用 registervm 命令注册 VM,使用 VM 配置文件的路径:

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

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

    这篇关于VM 变得“无法访问"——Vagrant 不再工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆