使用 VirtualBox 的 vagrant 未正常关闭电脑就关机,然后启动异常的解决方案
其实该问题很好解决,都是未执行 vagrant halt 命令,然后直接关闭了电脑导致的。
然后再次执行 vagrant up 用时出现以下异常。
代码具体如下:
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 的界面,出现以下错误提示。
Runtime error opening 'C:\Users\Administrator\VirtualBox VMs\www_default_1549586607915_77235\www_default_1549586607915_77235.vbox' for reading: -102(File not found.).
F:\tinderbox\win-5.0\src\VBox\Main\src-server\MachineImpl.cpp[740] (long __cdecl Machine::i_registeredInit(void)).
返回 代码:
E_FAIL (0x80004005)
组件:
MachineWrap
界面:
IMachine {f30138d4-e5ea-4b3a-8858-a059de4c93fd}
解决方案如下,进入如图提示 C:\Users\Administrator\VirtualBox VMs\www_default_1549586607915_77235\ 目录下
将 www_default_1549586607915_77235.vbox-tmp 的 -tmp 去掉,保存。
然后执行 vagrant up 启动,一切正常。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步