"private_network" set on wrong interface on centos7 vagrant 1.9.7

36 views
Skip to first unread message

IL Dave

unread,
Jul 25, 2017, 12:28:18 PM7/25/17
to Vagrant
Hi, 

I'm using vagrant 1.9.7 with virtualbox 5.1.24 on Linux ( both Ubuntu 16.04 and RHEL 5 )

My problem is that when I adding new a "private_network" ip (hostonly) vagrant configure the wrong interface.

After creating vm vagrant add a new Adapter2 (hostonly) added after Adapter1 (NAT with portforward 2222 -> 22)
When the VM coming up I have two interfaces :

enp0s8 and enp0s17

Vagrant configure the private_network ip on enp0s17 that refers to the Adapter1 (NAT) (viewing MAC-ADDRESS)  instead enp0s8 that refers to Adapter2.

After that vagrant can't comunicate with the VM and hang at:
==> default: Configuring and enabling network interfaces...

I'm using my own centos7 template.
I think the problem is my centos invert the order of the interface but I don't know why this happen and how to avoid this behaviour.

Vagrant should knows what is the NAT interface because run the following command :
"/usr/bin/VBoxManage", "modifyvm", "415a19e2-6e61-4ae0-ba78-b8fd0a733b81", "--macaddress1", "08002720707C"

but when it creates configuration file use the interface order instead verify the mac on the interface

Do you know a way how to solve this issue ?

Thank you



Alvaro Miranda Aguilera

unread,
Jul 27, 2017, 12:53:22 AM7/27/17
to vagra...@googlegroups.com
Hello

Does happen with other boxes?

Please try

bento/centos7 (please check name)
alvaro/wouter7

If happens with those boxes too, please share your vagrantfile and the output from your VM on what you see and what you think should be

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/d1c451c9-46cb-4c63-a71c-3cd4730aa591%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

pixel fairy

unread,
Jul 30, 2017, 10:31:23 AM7/30/17
to Vagrant
ive had a similar problem on libvirt when extra disks were added. disabling "predictable" network interfaces fixed the issue, going back to ethN 

when building the base box, add "net.ifnames=0" to GRUB_CMDLINE_LINUX in that distros grub.conf, for example, /etc/default/grub in ubuntu, and dont forget to update-grub.
Reply all
Reply to author
Forward
0 new messages