I have upgraded VirtualBox from 6.1.26-2 to 6.1.28-3 (in Manjaro) and then I was not able to set up a private network with Vagrant.
Here is my Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.hostname = "Name"
config.vm.network :forwarded_port, guest: 22, host: 2336, id: 'ssh'
config.vm.network :private_network, ip: "10.1.45.3", netmask: "255.255.0.0"
end
When I did a vagrant up
, I got:
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: 10.1.45.3
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
I followed the guide from the link and created the file /etc/vbox/networks.conf with:
0.0.0.0/0 ::/0
And, when I run vagrant up
again, I got:
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: 10.1.45.3
Ranges:
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
Why does “Ranges” is empty? I tried with other values for ranges but it did not change anything.
I checked the IP for the NAT interface and there was no conflict (10.0.2.15/24).