laravel / homestead

MIT License
3.85k stars 1.45k forks source link

Update to HostOnly adapter on release branch NOT supported in VirtualBox 6.1.x #1841

Closed weerd closed 1 year ago

weerd commented 1 year ago

Versions

Host operating system

macOS Catalina v10.15.7 (I'm on an old iMac and this is as far as it's letting me upgrade 😅)

Description

I recently had a bunch of trouble after updating my Homestead to latest release and running vagrant up.

To ensure it wasn't just something with my settings, I cloned a new copy of the Homestead repository and checked out the release branch. I re-followed the instructions in the Homestead docs and I am specifically using VirtualBox 6.1.x as indicated.

The error boiled down to this:

VBoxManage: error: Unknown option: --host-only-net9=HostOnly

After doing some digging I found that this commit updated the "HostOnly adaptor for VirtualBox 7" in the scripts/homestead.rb file.

I'm not sure if this update was intended to just be for the main branch but got included in the release branch, but this update does not seem to be supported in VirtualBox 6.1.x, which is the version specified in the Homestead docs.

Maybe the fix is to update the Homestead box documentation to recommend using VirtualBox 7.0.x instead?

After removing these updated lines in my homestead.rb and re-running vagrant up, it all booted up as expected, no errors and my Laravel sites were loading in the browser.

Just wanted to bring this to your attention in case others come across it.

I'm a big fan of Homestead ❤️ and have used it for years! I appreciate all the great work you do on it and also just wanted to say thanks! 🙌

Error Output

This is the full error output I received when running the vagrant up command:

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", "49ea6153-b9af-4ccf-b349-2c324a300c76", "--nic9", "hostonlynet", "--host-only-net9=HostOnly"]

Stderr: VBoxManage: 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>]
                            [--ostype <ostype>]
                            [--iconfile <filename>]
                            [--memory <memorysize in MB>]
                            [--pagefusion on|off]
                            [--vram <vramsize in MB>]
                            [--acpi on|off]
                            [--ioapic on|off]
                            [--hpet on|off]
                            [--triplefaultreset on|off]
                            [--apic on|off]
                            [--x2apic on|off]
                            [--paravirtprovider none|default|legacy|minimal|
                                                hyperv|kvm]
                            [--paravirtdebug <key=value> [,<key=value> ...]]
                            [--hwvirtex on|off]
                            [--nestedpaging on|off]
                            [--largepages on|off]
                            [--vtxvpid on|off]
                            [--vtxux on|off]
                            [--pae on|off]
                            [--longmode on|off]
                            [--ibpb-on-vm-exit on|off]
                            [--ibpb-on-vm-entry on|off]
                            [--spec-ctrl on|off]
                            [--l1d-flush-on-sched on|off]
                            [--l1d-flush-on-vm-entry on|off]
                            [--mds-clear-on-sched on|off]
                            [--mds-clear-on-vm-entry on|off]
                            [--nested-hw-virt on|off]
                            [--cpu-profile "host|Intel 80[86|286|386]"]
                            [--cpuid-portability-level <0..3>]
                            [--cpuid-set <leaf[:subleaf]> <eax> <ebx> <ecx> <edx>]
                            [--cpuid-remove <leaf[:subleaf]>]
                            [--cpuidremoveall]
                            [--hardwareuuid <uuid>]
                            [--cpus <number>]
                            [--cpuhotplug on|off]
                            [--plugcpu <id>]
                            [--unplugcpu <id>]
                            [--cpuexecutioncap <1-100>]
                            [--rtcuseutc on|off]
                            [--graphicscontroller none|vboxvga|vmsvga|vboxsvga]
                            [--monitorcount <number>]
                            [--accelerate3d on|off]
                            [--accelerate2dvideo on|off]
                            [--firmware bios|efi|efi32|efi64]
                            [--chipset ich9|piix3]
                            [--bioslogofadein on|off]
                            [--bioslogofadeout on|off]
                            [--bioslogodisplaytime <msec>]
                            [--bioslogoimagepath <imagepath>]
                            [--biosbootmenu disabled|menuonly|messageandmenu]
                            [--biosapic disabled|apic|x2apic]
                            [--biossystemtimeoffset <msec>]
                            [--biospxedebug on|off]
                            [--system-uuid-le on|off]
                            [--boot<1-4> none|floppy|dvd|disk|net>]
                            [--nic<1-N> none|null|nat|bridged|intnet|hostonly|
                                        generic|natnetwork]
                            [--nictype<1-N> Am79C970A|Am79C973|Am79C960|
                                            82540EM|82543GC|82545EM|
                                            virtio]
                            [--cableconnected<1-N> on|off]
                            [--nictrace<1-N> on|off]
                            [--nictracefile<1-N> <filename>]
                            [--nicproperty<1-N> name=[value]]
                            [--nicspeed<1-N> <kbps>]
                            [--nicbootprio<1-N> <priority>]
                            [--nicpromisc<1-N> deny|allow-vms|allow-all]
                            [--nicbandwidthgroup<1-N> none|<name>]
                            [--bridgeadapter<1-N> none|<devicename>]
                            [--hostonlyadapter<1-N> none|<devicename>]
                            [--intnet<1-N> <network name>]
                            [--nat-network<1-N> <network name>]
                            [--nicgenericdrv<1-N> <driver>]
                            [--natnet<1-N> <network>|default]
                            [--natsettings<1-N> [<mtu>],[<socksnd>],
                                                [<sockrcv>],[<tcpsnd>],
                                                [<tcprcv>]]
                            [--natpf<1-N> [<rulename>],tcp|udp,[<hostip>],
                                          <hostport>,[<guestip>],<guestport>]
                            [--natpf<1-N> delete <rulename>]
                            [--nattftpprefix<1-N> <prefix>]
                            [--nattftpfile<1-N> <file>]
                            [--nattftpserver<1-N> <ip>]
                            [--natbindip<1-N> <ip>]
                            [--natdnspassdomain<1-N> on|off]
                            [--natdnsproxy<1-N> on|off]
                            [--natdnshostresolver<1-N> on|off]
                            [--nataliasmode<1-N> default|[log],[proxyonly],
                                                         [sameports]]
                            [--macaddress<1-N> auto|<mac>]
                            [--mouse ps2|usb|usbtablet|usbmultitouch]
                            [--keyboard ps2|usb]
                            [--uart<1-N> off|<I/O base> <IRQ>]
                            [--uartmode<1-N> disconnected|
                                             server <pipe>|
                                             client <pipe>|
                                             tcpserver <port>|
                                             tcpclient <hostname:port>|
                                             file <file>|
                                             <devicename>]
                            [--uarttype<1-N> 16450|16550A|16750]
                            [--guestmemoryballoon <balloonsize in MB>]
                            [--vm-process-priority default|flat|low|normal|high]
                            [--audio none|null|coreaudio]
                            [--audioin on|off]
                            [--audioout on|off]
                            [--audiocontroller ac97|hda|sb16]
                            [--audiocodec stac9700|ad1980|stac9221|sb16]
                            [--clipboard-mode disabled|hosttoguest|guesttohost|
                                              bidirectional]
                            [--draganddrop disabled|hosttoguest|guesttohost|
                                           bidirectional]
                            [--vrde on|off]
                            [--vrdeextpack default|<name>]
                            [--vrdeproperty <name=[value]>]
                            [--vrdeport <hostport>]
                            [--vrdeaddress <hostip>]
                            [--vrdeauthtype null|external|guest]
                            [--vrdeauthlibrary default|<name>]
                            [--vrdemulticon on|off]
                            [--vrdereusecon on|off]
                            [--vrdevideochannel on|off]
                            [--vrdevideochannelquality <percent>]
                            [--usbohci on|off]
                            [--usbehci on|off]
                            [--usbxhci on|off]
                            [--usbrename <oldname> <newname>]
                            [--snapshotfolder default|<path>]
                            [--teleporter on|off]
                            [--teleporterport <port>]
                            [--teleporteraddress <address|empty>]
                            [--teleporterpassword <password>]
                            [--teleporterpasswordfile <file>|stdin]
                            [--tracing-enabled on|off]
                            [--tracing-config <config-string>]
                            [--tracing-allow-vm-access on|off]
                            [--usbcardreader on|off]
                            [--autostart-enabled on|off]
                            [--autostart-delay <seconds>]
                            [--recording on|off]
                            [--recordingscreens all|none|<screen ID> [<screen ID> ...]]
                            [--recordingfile <filename>]
                            [--recordingvideores <width> <height>]
                            [--recordingvideorate <rate>]
                            [--recordingvideofps <fps>]
                            [--recordingmaxtime <s>]
                            [--recordingmaxsize <MB>]
                            [--recordingopts <key=value> [,<key=value> ...]]
                            [--defaultfrontend default|<name>]

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

Please fix this customization and try again.
joeknex commented 1 year ago

I have the same problem with VirtualBox 7

svpernova09 commented 1 year ago

Yep, I've been struggling to get a stable virtual box base box built, now that I've done that I can dig into this more.

svpernova09 commented 1 year ago

Just released https://github.com/laravel/homestead/releases/tag/v14.1.0 which should resolve this. Sorry this went into release.

weerd commented 1 year ago

Thanks so much @svpernova09! Quite the quick turnaround and I appreciate your help and the work you do to maintain this repo 🙌