-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.8.6: Vagrant private network is incorrectly configured due to sorting of interface names if Docker is installed #7844
Comments
Just upgraded to Vagrant 1.8.6 and VirtualBox 5.1.6, and am experiencing this same issue with VMs that have Docker running. In my use case, I have the following interfaces:
In my Vagrantfile I have something like the following: config.vm.network(:private_network, {
ip: "172.100.1.10",
auto_config: true,
name: "vboxnet1",
})
config.vm.network(:private_network, {
ip: "172.100.2.10",
auto_config: true,
name: "vboxnet2",
}) What I end up with is that |
Thanks for fixing this so quickly @chrisroberts, really appreciate it! |
It would be very helpful if you could either: |
I upgrade vagrant mainly for this bug : hashicorp/vagrant#7844
I think this issue still exists on: Vagrant 1.9.1 with VirtualBox 5.1.30r118389. my Centos7 has (eth0, eth1, eth2) that are mapped to Virtualbox (Adaptor2, Adaptor3, Adaptor1) |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Vagrant version
1.8.6
Host operating system
ArchLinux
Guest operating system
CentOS 7
Debug output
Expected behavior
Vagrant should determine the adapter to network interface mapping correctly when Docker is installed and configure the correct interface as part of the private network.
Actual behavior
The change in #7705 can cause Vagrant to incorrectly map adapters to interfaces if a private network is configured by Vagrant and Docker is installed on the Vagrant box. This results in
vagrant up
hanging indefinitely.I believe this is what is happening (I might have diagnosed the root cause incorrectly and I may have butchered some of the terminology... sorry):
ip addr
command. The interfaces are now ordered alphabetically.For example:
Previously the list of network interfaces would be something like:
["enp0s3", "enp0s8", "docker0"]
The first interface (
enp0s3
) was mapped to the NAT adapter and the second interface (enp0s8
) was mapped to the adapter connected to the private network.The list of network interfaces is now sorted so the list is now:
["docker0", "enp0s3", "enp0s8"]
The
docker0
interface is now mapped to the NAT adapter andenp0s3
is now mapped to the adapter connected to the private network. When Vagrant overrides the configuration for theenp0s3
interface with the configuration meant forenp0s8
, the VM is unable to reach the outside.docker0
is created and configured by Docker by default. I think I might be able to work around the problem by configuring docker to create the interface with a different name. I think running Docker inside a Vagrant box might be a common use case though?Steps to reproduce
vagrant up
hangs indefinitelyReferences
The text was updated successfully, but these errors were encountered: