Homestead 发现报错 Vagrant box update

2020年3月1日上午8:54分,经过半个月的奋战终于完成了,我自己的laravel项目,睡一觉起来重新启动homestead发现报错:

$ vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Checking if box 'laravel/homestead' version '8.0.0' is up to date...
==> homestead-7: A newer version of the box 'laravel/homestead' for provider 'virtualbox' is
==> homestead-7: available! You currently have version '8.0.0'. The latest is version
==> homestead-7: '9.2.0'. Run `vagrant box update` to update.
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.

瞬间懵逼这是怎么回事,自己一看是我的homestead 当前版本是8.0,提示信息是目前最新版本为9.2,需要更新一下。于是按照提示我执行了更新命令:vagrant box update
等待一小时后重新启动homestead后仍然报错

$ vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Checking if box 'laravel/homestead' version '8.0.0' is up to date...
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.

按照提示我将Oracle VM VirtualBox中的虚拟机删除了重新启动仍按报错,提示如下:

$ vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' version '8.0.0' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
The name of your virtual machine couldn't be set because VirtualBox
is reporting another VM with that name already exists. Most of the
time, this is because of an error with VirtualBox not cleaning up
properly. To fix this, verify that no VMs with that name do exist
(by opening the VirtualBox GUI). If they don't, then look at the
folder in the error message from VirtualBox below and remove it
if there isn't any information you need in there.
VirtualBox error:
VBoxManage.exe: error: Could not rename the directory 'C:\Users\18222\VirtualBox VMs\ubuntu-18.04-amd64_1583029545525_98719' to 'C:\Users\18222\VirtualBox VMs\homestead-7' to save the settings file (VERR_ALREADY_EXISTS)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "SaveSettings()" at line 3194 of file VBoxManageModifyVM.cpp

继续查看提示说明我们的虚拟文件没有删除干净还有残余,并按照提示的信息,在电脑用户中找到了我的homestead安装根目录,在根目录中找到了虚拟机存储文件文件夹VirtualBox VMs在里面将所有的虚拟机文件就OK了,因为是删除了所有文件所以数据库也被删除了。

本作品采用《CC 协议》,转载必须注明作者和本文链接
十里长亭
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!