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

Unable to use private network after switching from ifconfig to ip #7711

Closed
agusti-t opened this issue Aug 12, 2016 · 5 comments
Closed

Unable to use private network after switching from ifconfig to ip #7711

agusti-t opened this issue Aug 12, 2016 · 5 comments

Comments

@agusti-t
Copy link

agusti-t commented Aug 12, 2016

The fix for #7668 via PR #7705 by @chrisroberts has not fixed the same issue with the CentOS 7 box.

Vagrant version

Vagrant 1.8.6.dev (at master@19c3d838d11cafb0ee6a2a4)

Host operating system

Mac OS X 10.11

Guest operating system

CentOS Linux 7/x86_64

Vagrantfile

Vagrant.configure("2") do |config|
  # This is here because of another bug which is fixed in master
  config.ssh.insert_key = false
  config.vm.box = "centos/7"
  config.vm.network "private_network", ip: "192.168.33.10"
end

Debug output

https://gist.github.com/agusti-t/6e837bbc448630d529f10df01255cd84

Expected behavior

Bring up the box, have eth0 configured on the NAT, have eth1 configured for the private network

Actual behavior

eth0 correctly configured and eth1 does not show ip via ip addr show until sudo systemctl restart network is issued in the guest machine.

Steps to reproduce

  1. Use provided Vagrantfile
  2. vagrant up

References

#7668
#7705

@chrisroberts
Copy link
Member

Hi! I have successfully brought up the centos/7 box using the provided Vagrantfile without issue. Can you please run:

$ vagrant halt
$ vagrant destroy
$ vagrant up --debug

and provide the output. Thanks!

@agusti-t
Copy link
Author

Hi @chrisroberts, thanks for taking a look.

Here comes part of the output, I added a vagrant up and vagrant ssh default with a ip addr show at the beginning to show what I mean when I say there is no assigned IP. The output from the vagrant up is in a gist, linked at the end of this comment:

retineta:test agusti$ vagrant up
Vagrant appears to be running in a Bundler environment. Your
existing Gemfile will be used. Vagrant will not auto-load any plugins
installed with `vagrant plugin`. Vagrant will autoload any plugins in
the 'plugins' group in your Gemfile. You can force Vagrant to take over
with VAGRANT_FORCE_BUNDLER.

You appear to be running Vagrant outside of the official installers.
Note that the installers are what ensure that Vagrant has all required
dependencies, and Vagrant assumes that these dependencies exist. By
running outside of the installer environment, Vagrant may not function
properly. To remove this warning, install Vagrant using one of the
official packages from vagrantup.com.

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/7' is up to date...
==> default: Setting the name of the VM: test_default_1471074636292_62417
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest
    default: additions are required for forwarded ports, shared folders, host only
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default:
    default: This is not an error message; everything may continue to work properly,
    default: in which case you may ignore this message.
==> default: Configuring and enabling network interfaces...
==> default: Rsyncing folder: /Users/agusti/test/ => /vagrant
retineta:test agusti$ vagrant ssh default
Vagrant appears to be running in a Bundler environment. Your
existing Gemfile will be used. Vagrant will not auto-load any plugins
installed with `vagrant plugin`. Vagrant will autoload any plugins in
the 'plugins' group in your Gemfile. You can force Vagrant to take over
with VAGRANT_FORCE_BUNDLER.

You appear to be running Vagrant outside of the official installers.
Note that the installers are what ensure that Vagrant has all required
dependencies, and Vagrant assumes that these dependencies exist. By
running outside of the installer environment, Vagrant may not function
properly. To remove this warning, install Vagrant using one of the
official packages from vagrantup.com.

[vagrant@localhost ~]$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:c3:c0:db brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0
       valid_lft 86357sec preferred_lft 86357sec
    inet6 fe80::5054:ff:fec3:c0db/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:76:44:f1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a00:27ff:fe76:44f1/64 scope link
       valid_lft forever preferred_lft forever
[vagrant@localhost ~]$ exit
logout
Connection to 127.0.0.1 closed.
retineta:test agusti$ vagrant halt
Vagrant appears to be running in a Bundler environment. Your
existing Gemfile will be used. Vagrant will not auto-load any plugins
installed with `vagrant plugin`. Vagrant will autoload any plugins in
the 'plugins' group in your Gemfile. You can force Vagrant to take over
with VAGRANT_FORCE_BUNDLER.

You appear to be running Vagrant outside of the official installers.
Note that the installers are what ensure that Vagrant has all required
dependencies, and Vagrant assumes that these dependencies exist. By
running outside of the installer environment, Vagrant may not function
properly. To remove this warning, install Vagrant using one of the
official packages from vagrantup.com.

==> default: Attempting graceful shutdown of VM...
retineta:test agusti$ vagrant destroy
Vagrant appears to be running in a Bundler environment. Your
existing Gemfile will be used. Vagrant will not auto-load any plugins
installed with `vagrant plugin`. Vagrant will autoload any plugins in
the 'plugins' group in your Gemfile. You can force Vagrant to take over
with VAGRANT_FORCE_BUNDLER.

You appear to be running Vagrant outside of the official installers.
Note that the installers are what ensure that Vagrant has all required
dependencies, and Vagrant assumes that these dependencies exist. By
running outside of the installer environment, Vagrant may not function
properly. To remove this warning, install Vagrant using one of the
official packages from vagrantup.com.

    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Destroying VM and associated drives...
retineta:test agusti$ vagrant up --debug &> vagrant2.log

Gist to vagrant2.log: https://gist.github.com/agusti-t/eb00fef4266f373ec5215a729a2ac560

@chrisroberts
Copy link
Member

Fixed by: #7751

@chrisroberts chrisroberts added this to the 1.8.7 milestone Oct 4, 2016
@chrisroberts
Copy link
Member

Fixed via #7751

@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.
Projects
None yet
Development

No branches or pull requests

2 participants