Stderr: VBoxManage.exe: error: Invalid NIC number

2019-06-12 21:03发布

问题:

I am installing Vagrant / Homestead on my computers.

On my laptop, it works good; but on another computer, with

  • Virtualbox 5
  • Vagrant 1.8.3
  • Windows 10

when I run vagrant up, there are errors

C:\Users\Neon\Homestead>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "6b26b32b-0b7e-4428-bc3a-bdc89fe735bb", "--nic2", "none", "--nic3", "none", "--nic4", "none", "--nic5", "none", "--nic6", "none", "--nic7", "none", "--nic8", "none", "--nic9", "none", "--nic10", "none", "--nic11", "none", "--nic12", "none", "--nic13", "none", "--nic14", "none", "--nic15", "none", "--nic16", "none", "--nic17", "none", "--nic18", "none", "--nic19", "none", "--nic20", "none", "--nic21", "none", "--nic22", "none", "--nic23", "none", "--nic24", "none", "--nic25", "none", "--nic26", "none", "--nic27", "none", "--nic28", "none", "--nic29", "none", "--nic30", "none", "--nic31", "none", "--nic32", "none", "--nic33", "none", "--nic34", "none", "--nic35", "none", "--nic36", "none"]

Stderr: VBoxManage.exe: error: Invalid NIC number 9
VBoxManage.exe: error: Invalid NIC number 10
VBoxManage.exe: error: Invalid NIC number 11
VBoxManage.exe: error: Invalid NIC number 12
VBoxManage.exe: error: Invalid NIC number 13
VBoxManage.exe: error: Invalid NIC number 14
VBoxManage.exe: error: Invalid NIC number 15
VBoxManage.exe: error: Invalid NIC number 16
VBoxManage.exe: error: Invalid NIC number 17
VBoxManage.exe: error: Invalid NIC number 18
VBoxManage.exe: error: Invalid NIC number 19
VBoxManage.exe: error: Invalid NIC number 20
VBoxManage.exe: error: Invalid NIC number 21
VBoxManage.exe: error: Invalid NIC number 22
VBoxManage.exe: error: Invalid NIC number 23
VBoxManage.exe: error: Invalid NIC number 24
VBoxManage.exe: error: Invalid NIC number 25
VBoxManage.exe: error: Invalid NIC number 26
VBoxManage.exe: error: Invalid NIC number 27
VBoxManage.exe: error: Invalid NIC number 28
VBoxManage.exe: error: Invalid NIC number 29
VBoxManage.exe: error: Invalid NIC number 30
VBoxManage.exe: error: Invalid NIC number 31
VBoxManage.exe: error: Invalid NIC number 32
VBoxManage.exe: error: Invalid NIC number 33
VBoxManage.exe: error: Invalid NIC number 34
VBoxManage.exe: error: Invalid NIC number 35
VBoxManage.exe: error: Invalid NIC number 36

The Vagrantfile in Homestead are the defaults, and Homestead.yaml too.

I tried this tutorial, but no help.

回答1:

I know you linked to this, but this solution worked for me:

Confirm the problem. It is reproduced with Windows10/Vagrant 1.8.3/VirtualBox 5.0.20 and hashicorp/precise64 box.

Looks like it is caused by the recent change "Set maximum network adapters to 36 [GH-7293, GH-7286]". Indeed if change back max_network_adapters from 36 to 8 at C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.8.3\plugins\providers\virtualbox\driver\base.rb it starts successfully.



回答2:

This issue has been handled, so the solution is to simply install Vagrant 1.8.4+.