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

1.5k Views Asked by At

When I want to excecute vagrant up command, the following issue is shown:

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.

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.

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.

This is what I've done:

  1. I've installed virtual Box 6.1.4 version.
  2. I've installed Vagrant 2.3.2
  3. Added C:\Program Files\Oracle\VirtualBox to enviroment variables

I excecuted the following commands on bash:

  1. vagrant box add laravel/homestead
    • Option 2) VirtualBox
  2. git clone https://github.com/laravel/homestead.git Homestead
  3. cd Homestead
  4. bash init.sh
  5. ssh-keygen -t rsa -b 4096 -C "email"
  6. Created code folder on the user folder
  7. vagrant up

Please help!

2

There are 2 best solutions below

1
Leira On

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

enter image description here

I had the same issue today, this solved the problem.

0
alxndr_k On

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"