Vagrant 2.2.18, OSX 11.6 cannot create private network

had same issue with latest version of virtual box version 6.1.28, downgrade to version 6.1.26 using link above in comments worked.

Ok, this is strange. So I upgraded my Vagrant install to 2.2.19 that was just released 4 days ago. I then upgraded my VirtualBox from 6.1.26 (which I had downgraded to resolve this issue) to 6.1.28 again. I was going to try and test with this some more to see if I could get it to work with the recommended IP changes.

However, now, with those latest versions and no configuration changes on my part, it’s all working normally now and I can see DHCP servers and Host-Only IFs being created automatically with the new IP ranges that VirtualBox needed without me changing my Vagrantfile at all (e.g. output of VBoxManage list dhcpservers and VBoxManage list hostonlyifs).

For those having issues with this, try upgrading to Vagrant 2.2.19 and VirtualBox 6.1.28 and see if it works for you now. YMMV, because if you are specifically setting IPs in your Vagrantfile, you will probably need to change them to the valid ranges still. I was letting it use default IPs until this bug hit me and was unable to get it to work by setting them.

Warning: There is a bug in Vagrant 2.2.19 on MacOS that requires a manual file patch if you are using NFS, see: vagrant 2.2.19 nfs folders uninitialized constant error on Mac OS · Issue #12583 · hashicorp/vagrant · GitHub

Note: Another odd thing I noticed now that it’s working, the IPs it used by default are in the 192.168.56.0/21 range, not in 192.68.56.0/21 as noted by the VirtualBox documentation mentioned above, but it’s working. If I change my IP explicitly, Vagrant then issues a better error now:

The IP address configured for the host-only network is not within the
allowed ranges. Please update the address used to be within the allowed
ranges and run the command again.

  Address: 172.28.128.128
  Ranges: 192.168.56.0/21

Valid ranges can be modified in the /etc/vbox/networks.conf file. For
more information including valid format see:

  https://www.virtualbox.org/manual/ch06.html#network_hostonly

Notice how it says 192.168.56.0/21 instead of 192.68.56.0/21 as noted in the VirtualBox documentation link referenced: On Linux, Mac OS X and Solaris Oracle VM VirtualBox will only allow IP addresses in 192.68.56.0/21 range to be assigned to host-only adapters.

Just edit or create the file /etc/vbox/networks.conf and change to:

* 0.0.0.0/0 ::/0

Do not forget the * at the beginning.

This will allow all addresses as host addresses like in old VirtualBox versions.

See: Chapter 6. Virtual Networking (6.7)