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

RHEL/CentOS7 guest on VirtualBox with host only interface will not work because configure_networks.rb expects old interface names #4078

Closed
bertvv opened this issue Jun 22, 2014 · 6 comments

Comments

@bertvv
Copy link

bertvv commented Jun 22, 2014

Setting up a host-only interface on a RHEL7/CentOS7 guest doesn't work. E.g.

VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "centos7qa"
  config.vm.network "private_network", ip: "192.168.56.7"
end

The code in plugins/guests/redhat/cap/configure_networks.rb expects the "old" network interface names like eth0, eth1, etc. Since EL7, these have other names (e.g. enp0s3 and enp0s8). Vagrant up in that case gives the following error message:

[...]
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

ARPCHECK=no /sbin/ifup eth1 2> /dev/null

Stdout from the command:

ERROR    : [/etc/sysconfig/network-scripts/ifup-eth] Device eth1 does not seem to be present, delaying initialization.


Stderr from the command:

Copying over the equivalent from plugins/guests/fedora/cap/configure_networks.rb fixes EL7, but breaks EL6:

/usr/sbin/biosdevname --policy=all_ethN -i bash: line 2: /usr/sbin/biosdevname: No such file or directory
Stderr from the command:

bash: line 2: /usr/sbin/biosdevname: No such file or directory
@espector
Copy link

I'm getting the same issue with CentOS 7. Any possible workarounds using symlinks ?

@Pluto1010
Copy link

I'm having the same issue. I've read the linked issues as well. Does anybody already have a solution or a workaround now?

@khiro
Copy link
Contributor

khiro commented Aug 4, 2014

@Pluto1010 @espector You could use @vStone plugin or repo to solve this problem.

@vStone
Copy link
Contributor

vStone commented Aug 4, 2014

Also #4195

@bertvv
Copy link
Author

bertvv commented Aug 4, 2014

Nice one, @vStone! Thanks.

@mitchellh
Copy link
Contributor

This will be fixed by #4195

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

6 participants