Laravel的"Homestead Up"在更新VirtualBox后无法启动虚拟机,而Vagrant则表示虚拟机已存在。

3

我在使用Homestead 2.x时遇到了一些问题,原因我不太清楚。所以我趁机将Homestead升级到了2.1.8版本,并按照Laravel论坛上的建议安装了最新的Vagrant和VirtualBox。现在它似乎可以启动了,但是显示以下信息:

$ homestead up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'laravel/homestead' is up to date...
A VirtualBox machine with the name 'homestead' already exists.
Please use another name or delete the machine with the existing
name, and try again.

我不确定为什么会提示 laravel/homestead 已经存在,我有点害怕现在去尝试,因为我不想删除任何东西。我查看了 VirtualBox GUI,只有一个 Homestead 盒子和一个 settler_default_12314848585938 盒子(我不知道那是什么,但它没有任何共享文件夹)。所以没有 其他正在运行的 VirtualBox
我找到了这些和其他一些内容,但它们都已过时,并且与我运行的 2.1.x 不相关。

不知道这是否有帮助,但是查看 C:/Users/mtpultz

/.homestead
  \_ .vagrant
     after.sh
     aliases
     homestead.yaml
     mtpultz - Shortcut
/.vagrant.d
  \_ /boxes
       \_ /laravel-VAGRANTSLASH-homestead
            \_ /0.3.0
     /data
     /gems
     /rgloader
     /tmp
     insecure_private_keys
     setup_version
/.VirtualBox
  \_ list of log files
     vbox-ssl-cacertificate.crt
     VirtualBox.xml
/VirtualBox VMs
  \_ /homestead
      \_ /logs
         box-disk1.vmdk
         homestead.vbox
  \_ /settler_default_12344848209239843

使用 vagrant box remove laravel/homestead --box-version=0.x.x 命令,我删除了一些 旧版本的laravel/homestead

为了能够启动虚拟机并继续工作而不必销毁任何内容,我应该做些什么?

2个回答

2

1) 转到目录 C:/Users/mtpultz/VirtualBox VMs 并删除名为homestead的文件夹。

2) 再次从命令提示符中运行homestead up


您可能还需要在用户目录中删除“.vagrant.d”。 - omikes

0

你可以为你的 Vagrant box 设置不同的名称。在你的 Homestead.yaml 文件顶部,你可以添加:

box: laravel/homestead-2x

并检查机器是否启动


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接