Closed kylegoch closed 10 years ago
Brief update to this. I had to switch over to RHEL 6.5 due to something external to vagrant, and the 6.5 Vagrant Boxes are coming up just fine with the same Vagrantfile from before, just pointing at the 6.5 box.
It appears that Vagrant is not very networkd savy and is possibly also having some issues with it's device naming standard. I have seen evidence of vagrant trying to create files for eth1, but then see a ens33 device in ifconfig.
If I don't set a hostname and I also disable auto_config like this:
config.vm.network :private_network, type: :static, auto_config: false, ip: "192.168.80.10", netmask: "255.255.255.0"
Then I can sort of work around this problem (since vagrant won't restart the network and it is actually working), however if I restart networking, it will generate the same error.
I'm guessing this has something to do with the networkd device naming, it's use of unit files for config, and vagrant using direct commands and the older style network config files to manipulate the network.
I'm having the same issue with a recent build of Gentoo produced using the Veewee definition provided at https://github.com/hyamamoto/gentoo-bento
For me, the workaround suggested by spkane didn't work--it didn't set a static IP. But networking did work. It still creates /etc/init.d/net.eth1
, and as spkane said, it errors if you try to restart it manually.
This is caused by the bug referenced at #4171, with a fix at #4195 (the RHEL issue, not the Gentoo)
Fixed, see #4195 for more info.
This issue is similar to #1997 .
I built a RHEL7 box and wanted to add private networking by assigning and IP address in the Vagrantfile.
I was getting the classic:
But I noticed when I did the following there was no eth1:
So I went to /etc/sysconfig/network-scripts and noticed there was
So I got creative and renamed
ifcfg-eth1
toifcfg-enp0s8
(from the ip output above). I also went into the newly renamed file and changedDEVICE=eth1
toDEVICE=enp0s8
then ran./ifup-eth enp0s8
.And now the output of
ip addr
matched the config that I would expect it to have. And the extra NIC worked just as expected.Im new to RHEL, but not to Vagrant. So I am not sure if this was an issue with my RHEL build, which was built using Opscode Bento's Packer Template, or something that has cropped up in Vagrant.
My Vagrant version is 1.6.3.
Doing a
vagrant reload
still fails with the above error. But the workaround stays in place. But Vagrant wont do any provisioning for me because its upset of over the networking.If I comment this line from my Vagrant file
Then
vagrant up
runs through everything as expected. Except my boxes dont have static IPs.I will gladly provide whatever extra info is needed, just let me know.