简体   繁体   English

vagrant up hostonly 问题 --host-only.net9=HostOnly | Windows 10

[英]vagrant up hostonly issue --host-only-net9=HostOnly | Windows 10

When I want to excecute vagrant up command, the following issue is shown:当我想执行 vagrant up 命令时,显示以下问题:

Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Checking if box 'laravel/homestead' version '12.2.0' is up to date...
==> homestead: Clearing any previously set forwarded ports...
==> homestead: Clearing any previously set network interfaces...
==> homestead: Preparing network interfaces based on configuration...
    homestead: Adapter 1: nat
    homestead: Adapter 2: intnet
==> homestead: Forwarding ports...
    homestead: 80 (guest) => 8000 (host) (adapter 1)
    homestead: 443 (guest) => 44300 (host) (adapter 1)
    homestead: 22 (guest) => 2222 (host) (adapter 1)
==> homestead: Running 'pre-boot' VM customizations...
A customization command failed:

["modifyvm", :id, "--nic9", "hostonlynet", "--host-only-net9=HostOnly"]

The following error was experienced:

#<Vagrant::Errors::VBoxManageError: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "4474afc8-04d0-4ca3-b39f-748e3ab46b5f", "--nic9", "hostonlynet", "--host-only-net9=HostOnly"]

Stderr: VBoxManage.exe: error: Invalid NIC number 9
Oracle VM VirtualBox Command Line Management Interface Version 6.1.40
(C) 2005-2022 Oracle Corporation
All rights reserved.

Usage:

VBoxManage modifyvm         <uuid|vmname>
                            [--name <name>]
                            [--groups <group>, ...]
                            [--description <desc>]

(.....A LOT OF COMMANDS OF MODIFYVM....)

                            [--defaultfrontend default|<name>]

VBoxManage.exe: error: Unknown option: --host-only-net9=HostOnly
>

Please fix this customization and try again.

Hello, I have this issue and I couldn't solve it neither find a solution on the web.你好,我有这个问题,我无法解决,也没有在 web 上找到解决方案。

I don't know what else to try, that's why I'm here.我不知道还能尝试什么,这就是我来这里的原因。 I've tried these same following steps in 3 different pc's with intel and amd with Windows 10 and It didn't work.我已经在 3 台不同的 PC 上尝试了这些相同的以下步骤,使用 intel 和 amd 使用 Windows 10 但它没有用。

I think there's a setting that I still don't know I have to set about Hosts, ports and VirtualBox, because It doesn't matter what Adapter Ports do I configure to homestead, when I excecute Vagrant Up they are reseted and then the issue is shown on bash.我认为有一个我仍然不知道我必须设置主机、端口和 VirtualBox 的设置,因为我为宅基地配置什么适配器端口并不重要,当我执行 Vagrant 时,它们被重置,然后问题显示在 bash 上。

This is what I've done:这就是我所做的:

  1. I've installed virtual Box 6.1.4 version.我已经安装了 virtual Box 6.1.4 版本。
  2. I've installed Vagrant 2.3.2我已经安装了 Vagrant 2.3.2
  3. Added C:\Program Files\Oracle\VirtualBox to enviroment variables添加 C:\Program Files\Oracle\VirtualBox 到环境变量

I excecuted the following commands on bash:我在 bash 上执行了以下命令:

  1. vagrant box add laravel/homestead vagrant 框添加 laravel/homestead
    • Option 2) VirtualBox选项 2) VirtualBox
  2. git clone https://github.com/laravel/homestead.git Homestead git 克隆https://github.com/laravel/homestead.git家园
  3. cd Homestead cd宅基地
  4. bash init.sh bash 初始化.sh
  5. ssh-keygen -t rsa -b 4096 -C "email" ssh-keygen -t rsa -b 4096 -C “电子邮件”
  6. Created code folder on the user folder在用户文件夹上创建代码文件夹
  7. vagrant up vagrant 起

Please help!请帮忙!

You miss one step:你错过了一步:

  1.  cd ~/Homestead

after you need to:在您需要:

  1.  git checkout release

after you can run:在你可以运行之后:

  1.  bash init.sh

... or ... 或者

vagrant up --provision

在此处输入图像描述

I had the same issue today, this solved the problem.我今天遇到了同样的问题,这解决了问题。

Solved an issue by reverting changes of this commit .通过还原此提交的更改解决了一个问题。

Idk why this was added.不知道为什么要添加这个。 Laravel homestead installation instructions says it has support of VirtualBox 6.1.x but commit message says "Updating HostOnly adapter for VirtualBox 7" Laravel homestead 安装说明说它支持 VirtualBox 6.1.x 但提交消息说“为 VirtualBox 7 更新 HostOnly 适配器”

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

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