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

network config does not assign static IP, virtual box and RHEL 7 guest #8347

Closed
gearoidibm opened this issue Mar 9, 2017 · 3 comments

Comments

@gearoidibm
Copy link

@gearoidibm gearoidibm commented Mar 9, 2017

Please note that the Vagrant issue tracker is reserved for bug reports and
enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!

Vagrant version

Vagrant 1.9.1

Host operating system

macOS 10.12.3

virtual box version

Version 5.1.14 r112924 (Qt5.6.2)

Guest operating system

RHEL

uname -a
Linux nettest.test.local 3.10.0-514.2.2.el7.x86_64 #1 SMP Wed Nov 16 13:15:13 EST 2016 x86_64 x86_64 x86_64 GNU/Linux

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.

Vagrant.configure("2") do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://atlas.hashicorp.com/search.
  config.vm.box = "bigfix/redhat72x64-db2"

  config.vbguest.auto_update = false
  config.vm.hostname = "nettest.test.local"

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.

  config.vm.network :forwarded_port, guest: 80,    host: 8080
  config.vm.network :forwarded_port, guest: 443,   host: 9443
  config.vm.network :forwarded_port, guest: 8083,  host: 8083
  
  config.vm.network "private_network", ip: "10.10.1.12",  auto_correct: true

  config.vm.provider "virtualbox" do |vb|
     vb.gui = "false"
     vb.memory = 4096
     vb.cpus = 2
     vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  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

vm should have ip of 10.10.1.12

Actual behavior

vm doesn't have this ip.

[vagrant@nettest ~]$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::61a2:e659:2fc8:ade4  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:a6:4b:1e  txqueuelen 1000  (Ethernet)
        RX packets 388  bytes 41438 (40.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 307  bytes 41004 (40.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 72  bytes 6088 (5.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 72  bytes 6088 (5.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Steps to reproduce

  1. vagrant up
@dlorenzo

This comment has been minimized.

Copy link

@dlorenzo dlorenzo commented Mar 9, 2017

Should be already fixed in v1.9.2. Update and check if the issue persists. For more information, check #8096

@gearoidibm

This comment has been minimized.

Copy link
Author

@gearoidibm gearoidibm commented Mar 9, 2017

I'll check it out.

@chrisroberts

This comment has been minimized.

Copy link
Member

@chrisroberts chrisroberts commented Mar 9, 2017

As @d-lorenzo pointed out, this issue is fixed in 1.9.2 so I'm going to close this issue. If you are still experiencing problems after upgrading, please either reopen this issue, or create a new one. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.