一个名为“homestead"的 VirtualBox 机器已经存在 [英] A VirtualBox machine with the name 'homestead' already exists

查看:25
本文介绍了一个名为“homestead"的 VirtualBox 机器已经存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自 homestead 2.0 以来 homestead laravel 一直无法运行

Since homestead 2.0 homestead laravel has not been working

我不知道为什么 'homestead init' 会在 mydirectory/.homestead 创建一个 Homestead.yaml 文件而不是在项目目录中.Homestead up OR Vagrant up 创建以下消息

I don't know why 'homestead init' creates a Homestead.yaml file in mydirectory/.homestead and not in the project directory. Homestead up OR Vagrant up create the following message

名为homestead"的 VirtualBox 机器已经存在.

A VirtualBox machine with the name 'homestead' already exists.

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.

推荐答案

我通过使用vboxmanage获取VM的ID解决了.

I solved by using vboxmanage to get the ID of the VM.

$ vboxmanage list vms
"my-vm" {c700b8b6-b766-4638-871b-736b44b7db18}

将所需虚拟机的 ID(c700…db18 字符串)复制到 ~/.vagrant/machines/default/virtualbox/id 的内容中.保存文件,然后运行 ​​vagrant up 以使 vm 正常工作,而不必破坏它.

Copy the ID of the desired VM (the c700…db18 string) into the contents of ~/.vagrant/machines/default/virtualbox/id. Save the file then run vagrant up to get the vm working without having to destroy it.

这篇关于一个名为“homestead"的 VirtualBox 机器已经存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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