Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

On macOS hosts, documented network IP ranges for host adapters require additional configuration #12

Open
rtull opened this issue Dec 14, 2021 · 4 comments
Assignees

Comments

@rtull
Copy link
Member

rtull commented Dec 14, 2021

The setup docs for macOS hosts do not account for a recent change to VirtualBox:

https://forums.virtualbox.org/viewtopic.php?f=7&t=104357

Specifically, these instructions:

https://github.com/classyllama/devenv-vagrant/blob/master/macOsSetup.md#configure-virtualbox

Cannot be executed without taking additional steps, as outlined by the documentation above.

@rtull
Copy link
Member Author

rtull commented Dec 14, 2021

Specifically, a networks.conf file placed at /etc/vbox/ ought to do the trick, when configured as below. More generous configurations are also possible but this is the minimum viable, given the current instructions.

* 192.168.56.0/21
* 172.28.128.0/24

@bap14
Copy link

bap14 commented Jan 24, 2022

Along with this provisioning new environments will still require the 192.168.56.0 addresses to be allowed. If we don't update the documentation to support allowing that IP range, then the default Vagrantfile should be updated so that the definition of the private network adapter specifies "vboxnet1" or "vboxnet0" for the host-only networking:

      config.vm.network :private_network, type: "dhcp", :name => "vboxnet1", :adapter => 2

The above would be a potential breaking change to any environments that are updating instead of starting fresh (since the IP may change from what already exists in the /etc/hosts file).

Also, if we match the current documentation the IP ranges should include the 10.19.89.1 address (or range). My current /etc/vbox/networks.conf file looks like this:

# Allow DevEnv local IPs (since Virtualbox 6.1.28)
# See: https://www.virtualbox.org/manual/ch06.html#network_hostonly
#
# DevEnv ranges
* 172.28.0.0/16 10.19.89.0/24

@yuriysklyarenko
Copy link
Contributor

@rtull I've added the steps for /etc/vbox/networks.conf into the documentation (https://github.com/classyllama/devenv-vagrant/blob/master/macOsSetup.md#configure-virtualbox).

@yuriysklyarenko
Copy link
Contributor

@bap14 I checked this behavior (the need to specify a particular adapter) on VirtualBox 6.1.32 on 3 different VMs after adding /etc/vbox/networks.conf from the documentation (https://github.com/classyllama/devenv-vagrant/blob/master/macOsSetup.md#configure-virtualbox) using a default configuration from the iac-test-lab repository and I always got IP addresses from vboxnet1 network (172.28.128.XXX) on VMs.

So it seems it is not actually needed to add 'config.vm.network' configuration manually to leave the same behavior after the update (at least with VirtualBox 6.1.32), all new VMs were created using 172.28.128.X network (including /etc/hosts records) like before Virtualbox upgrade.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants