I've got a locally built base box which is built on the official centos/7 
box from Atlas.  The only change at this point is that I've added the 
Virtualbox Guest Additions to it.   

When I build a host based on it, vagrant is able to write the boot config 
for a host-only network, but isn't configuring the running network on the 
host.   

This is my Vagrantfile
Vagrant.configure("2") do |config|
    config.vm.define "host01" do |host|
        host.vm.box = "centos7"
        host.vm.box_url = "file://~/src/vagrant/centos7.json"
        host.vm.network "private_network", ip: "192.168.56.11"
    end
end

I'm using config.vm.define because this will eventually be building 
multiple hosts.

When I run `vagrant up` I get this output:
Bringing machine 'host01' up with 'virtualbox' provider...
==> host01: Importing base box 'centos7'...
==> host01: Matching MAC address for NAT networking...
==> host01: Checking if box 'centos7' is up to date...
==> host01: Setting the name of the VM: Vagrant_host01_1481242515497_92317
==> host01: Clearing any previously set network interfaces...
==> host01: Preparing network interfaces based on configuration...
    host01: Adapter 1: nat
    host01: Adapter 2: hostonly
==> host01: Forwarding ports...
    host01: 22 (guest) => 2222 (host) (adapter 1)
==> host01: Booting VM...
==> host01: Waiting for machine to boot. This may take a few minutes...
    host01: SSH address: 127.0.0.1:2222
    host01: SSH username: vagrant
    host01: SSH auth method: private key
    host01: Warning: Remote connection disconnect. Retrying...
    host01: 
    host01: Vagrant insecure key detected. Vagrant will automatically 
replace
    host01: this with a newly generated keypair for better security.
    host01: 
    host01: Inserting generated public key within guest...
    host01: Removing insecure key from the guest if it's present...
    host01: Key inserted! Disconnecting and reconnecting using new SSH 
key...
==> host01: Machine booted and ready!
==> host01: Checking for guest additions in VM...
==> host01: Configuring and enabling network interfaces...
==> host01: Mounting shared folders...
    host01: /vagrant => 
/Users/matthewpounsett/Development/tld-infrastructure/Vagrant


And here's what I find on the VM:
$ vagrant ssh
[vagrant@localhost ~]$ ip addr list
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:d8:71:80 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0
       valid_lft 86396sec preferred_lft 86396sec
    inet6 fe80::5054:ff:fed8:7180/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 
1000
    link/ether 08:00:27:60:7d:5c brd ff:ff:ff:ff:ff:ff
[vagrant@localhost ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth1 
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
NM_CONTROLLED=no
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.56.11
NETMASK=255.255.255.0
DEVICE=eth1
PEERDNS=no
#VAGRANT-END
[vagrant@localhost ~]$ logout
Connection to 127.0.0.1 closed.


I've based what I'm doing off the docs at 
<https://www.vagrantup.com/docs/networking/private_network.html>.  What am 
I missing here?  

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/2b7e3a1f-4f5c-4164-9757-3aa2f4c71c07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to