Skip to content
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

"private_network" Configuration to the wrong network adapter #7891

Closed
xuwenyan opened this issue Oct 12, 2016 · 2 comments
Closed

"private_network" Configuration to the wrong network adapter #7891

xuwenyan opened this issue Oct 12, 2016 · 2 comments

Comments

@xuwenyan
Copy link

Vagrant version

Installed Version: 1.8.6

Host operating system

windows 10 X64

Guest operating system

ubuntu16.04

Vagrantfile

hosts = {
"node01" => "192.168.33.101",
"node02" => "192.168.33.102",
"node03" => "192.168.33.103",
"node04" => "192.168.33.104",
"node05" => "192.168.33.105"
}

Vagrant.configure("2") do |config|
hosts.each do |name, ip|
config.vm.define name do |machine|
machine.vm.box = "my_ubuntu16_docker_compose"
machine.vm.box_check_update = false
machine.ssh.insert_key = false
machine.vm.hostname = name
machine.vm.network "private_network", ip: ip
machine.vm.synced_folder ".", "/vagrant", disabled: true
machine.vm.provider "virtualbox" do |v|
v.name = name
v.customize ["modifyvm", :id, "--memory", 512]
end
end
end
end

Debug output

Provide a link to a GitHub Gist containing the complete debug output:
https://www.vagrantup.com/docs/other/debugging.html. The debug output should
be very long. Do NOT paste the debug output in the issue, just paste the
link to the Gist.

Expected behavior

private_network is config at enp0s8

Actual behavior

private_network is config at enp0s3

Steps to reproduce

1.vagrant up
interfaces is error like this:

auto enp0s3
iface enp0s3 inet dhcp
iface enp0s3 inet static
address 192.168.33.101
netmask 255.255.255.0

2.vagrant reload
interfaces is right like this:

auto enp0s3
iface enp0s3 inet dhcp

VAGRANT-BEGIN

The contents below are automatically generated by Vagrant. Do not modify.

auto enp0s8
iface enp0s8 inet static
address 192.168.33.101
netmask 255.255.255.0

but "ip addr" like this:

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:d2:26:7b brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global enp0s3
valid_lft forever preferred_lft forever
inet 192.168.33.102/24 brd 192.168.33.255 scope global enp0s3
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fed2:267b/64 scope link
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:bf:da:9d brd ff:ff:ff:ff:ff:ff
inet 192.168.33.102/24 brd 192.168.33.255 scope global enp0s8
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:febf:da9d/64 scope link
valid_lft forever preferred_lft forever

3.reboot
is ok

@chrisroberts
Copy link
Member

This issue is fixed by #7866 which will be available in the next release. Thanks!

@ghost
Copy link

ghost commented Apr 3, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 3, 2020
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

2 participants