Closed maxxer closed 1 year ago
Hey there, thanks for opening up an issue. I can reproduce the problem with a following more concise Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "<path to folder>", "/vagrant", id: "vagrant-root", type: "nfs"
config.vm.network "private_network", ip: "33.33.33.51", virtualbox__intnet: true
I can resolve this issue by changing the IP address of the private network to one in the reserved private network space as suggested in the vagrant docs and not using an internal network
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "<path to folder>", "/vagrant", id: "vagrant-root", type: "nfs"
config.vm.network "private_network", ip: "192.168.5.2"
Using the virtualbox__intnet
option fails because this creates an internal network instead of a host only network. There are some virtual box docs about that here https://docs.oracle.com/en/virtualization/virtualbox/7.0/user/networkingdetails.html#network_internal
Thank you very much for taking care of this issue.
If using a private space IP address is mandatory, it should be a requirement, not a suggestion 🤣 So there's a different behavior when using public and private IP? That's the only solution? Thanks again
If using a private space IP address is mandatory, it should be a requirement, not a suggestion 🤣 So there's a different behavior when using public and private IP? That's the only solution?
Here are the related Virtualbox docs: https://docs.oracle.com/en/virtualization/virtualbox/7.0/user/networkingdetails.html#network_hostonly. I think Vagrant is doing the right thing here, that is, it is doing what the Vagrantfile specified. Since there is maybe a situation where it is appropriate to use a public ip here instead of a private ip I don't think this is an issue with Vagrant. So, I'm going to go ahead and close this issue, but feel free to reopen if disagree 👍
Debug output
https://gist.github.com/maxxer/ecda192180b3c74786d69f1b53e933a3
Expected behavior
Vagrant mounted NFS share
Actual behavior
Reproduction information
This configuration works fine (without
virtualbox__intnet
) with Virtualbox 6.1, fails on 7.Adding
intnet
option allows the VM to boot, which otherwise would fail withI found a relevant discussion in #12959, where it's said this has been solved in 2.3.3, but some later comments show this is still somehow an issue.
virtualbox__intnet
seems to be the solution, but it breaks NFS Synced Folders.Vagrant version
Vagrant 2.3.4
Host operating system
macOS 12.6.2
Guest operating system
Ubuntu 18.04
Steps to reproduce
Vagrantfile