简体   繁体   English

严重错误后恢复Laravel的宅基地

[英]Restoring Laravel's Homestead after critical error

I'm using Homestead via Vagrant for my Laravel environment. 我在Laravel环境中通过Vagrant使用Homestead。 When I ran vagrant up today, there was a critical error saying that the box is inaccessible. 今天我vagrant up ,发生了一个严重错误,说无法进入包装箱。

One of the instructions that I found on the web suggested unregistering the VM by using its machine uuid, which I did: 我在网上找到的说明之一建议通过使用其计算机uuid注销VM,该操作是:

> VBoxManage.exe unregistervm [uuid]

After unregistering the status of Homestead box changed from inaccessible to not created . 注销后,“宅基地”框的状态从“ 无法访问 ”更改为“ 未创建”

Next step was to register the box, which I do like this: 下一步是注册盒子,我这样做:

> VBoxManage.exe registervm "C:\Users\Rhino\VirtualBox VMs\homestead\box-disk1.vmdk"

However the command above throws the following error: 但是,上面的命令将引发以下错误:

VBoxManage.exe: error: Start tag expected, '<' not found.
VBoxManage.exe: error: Location: 'C:\Users\Rhino\VirtualBox VMs\homestead\box-disk1.vmdk', line 1 (0), column 1.

What am I doing wrong? 我究竟做错了什么?

OK, I figured it out. 好,我知道了。 There was probably a step missing in the guide I found - creation. 我发现的指南中可能缺少一个步骤-创建。 All the steps again: 再次执行所有步骤:

(1) (1)
Unregister the box with machine uuid. 用机器uuid取消注册包装盒。 The uuid can be found eg in the .vbox-prev file in your homestead virtual machine folder. uuid可以在您的宅基地虚拟机文件夹中的.vbox-prev文件中找到。 Run this when you retrieve the uuid: 检索uuid时运行此命令:

C:\Program Files\Oracle\VirtualBox> VBoxManage.exe unregistervm [uuid]

(2) (2)
Create the box with --register flag: 创建带有--register标志的框:

C:\Program Files\Oracle\VirtualBox> VBoxManage.exe createvm --name "C:\Users\Rhino\VirtualBox VMs\homestead\box-disk1.vmdk" --register

(3) (3)
Delete the folder in which your homestead vm is kept (I guess it's by default created in VirtualBox VMs folder) 删除您的宅基地虚拟机所在的文件夹(我猜它默认是在VirtualBox VMs文件夹中创建的)

(4) (4)
Run vagrant up vagrant up

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM