Reputation: 7321
My Vagrantfile contains the line config.vm.network :private_network, ip: "192.168.33.10"
but when the machine comes up ifconfig
shows:
eth0 Link encap:Ethernet HWaddr 08:00:27:1B:06:06
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe1b:606/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:921 errors:0 dropped:0 overruns:0 frame:0
TX packets:926 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:92471 (90.3 KiB) TX bytes:97079 (94.8 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:255 errors:0 dropped:0 overruns:0 frame:0
TX packets:255 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:40178 (39.2 KiB) TX bytes:40178 (39.2 KiB)
So the guest is getting assigned an IP from a totally different range. The results of ifconfig
on the host show:
enp1s0 Link encap:Ethernet HWaddr 1c:1b:0d:3b:06:a0
inet addr:10.100.102.10 Bcast:10.100.102.255 Mask:255.255.255.0
inet6 addr: fe80::89fb:6606:8d85:ba21/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:214746 errors:0 dropped:0 overruns:0 frame:0
TX packets:124683 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:295158044 (295.1 MB) TX bytes:10146317 (10.1 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:35183 errors:0 dropped:0 overruns:0 frame:0
TX packets:35183 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:4777700 (4.7 MB) TX bytes:4777700 (4.7 MB)
vboxnet0 Link encap:Ethernet HWaddr 0a:00:27:00:00:00
inet addr:192.168.33.1 Bcast:192.168.33.255 Mask:255.255.255.0
inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:4204 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:188146 (188.1 KB)
Any ideas on how to get vagrant to assign the correct IP? (This is vagrant 1.9.1, host is Ubuntu 16, guest is CentOS 6.
Edit: this is the output of vagrant up
:
$ vagrant up dev
Bringing machine 'dev' up with 'virtualbox' provider...
==> dev: Clearing any previously set forwarded ports...
==> dev: Clearing any previously set network interfaces...
==> dev: Preparing network interfaces based on configuration...
dev: Adapter 1: nat
dev: Adapter 2: hostonly
==> dev: Forwarding ports...
dev: 22 (guest) => 2222 (host) (adapter 1)
==> dev: Running 'pre-boot' VM customizations...
==> dev: Booting VM...
==> dev: Waiting for machine to boot. This may take a few minutes...
dev: SSH address: 127.0.0.1:2222
dev: SSH username: vagrant
dev: SSH auth method: private key
==> dev: Machine booted and ready!
==> dev: Checking for guest additions in VM...
dev: The guest additions on this VM do not match the installed version of
dev: VirtualBox! In most cases this is fine, but in rare cases it can
dev: prevent things such as shared folders from working properly. If you see
dev: shared folder errors, please make sure the guest additions within the
dev: virtual machine match the version of VirtualBox you have installed on
dev: your host and reload your VM.
dev:
dev: Guest Additions Version: 4.3.26
dev: VirtualBox Version: 5.1
==> dev: Setting hostname...
==> dev: Configuring and enabling network interfaces...
==> dev: Mounting shared folders...
dev: /vagrant => /home/johnny/dev/lumify
dev: /home/vagrant/.m2 => /home/johnny/.m2
==> dev: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> dev: flag to force provisioning. Provisioners marked to run always will still run.
Upvotes: 0
Views: 163
Reputation: 21
It looks like active development of Lumify's open source version ended in 2015. Have you tried the open source version of Visallo? There's also an enterprise edition if you need additional capabilities or greater scalability.
Upvotes: 1
Reputation: 10721
Based on some testing I just did, I think the answer here is to upgrade to Vagrant 1.9.2. I actually had not noticed this before because I mostly use Ubuntu boxes, but with a CentOS 7.2 guest VM I'm getting the same result you did. I'm defining a private network as follows:
x.vm.network :private_network, ip: 10.211.54.5
After vagrant up
, login to the box and check the output of ifconfig
:
Before (Vagrant 1.9.1, VirtualBox 5.0.30r112061, Mac host 10.11.6)
eth0: 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::a00:27ff:fea3:aab6 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:a3:aa:b6 txqueuelen 1000 (Ethernet)
RX packets 40213 bytes 49148144 (46.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10192 bytes 647080 (631.9 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 0 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
After (upgrade Vagrant to 1.9.2):
eth0: 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::a00:27ff:fea3:aab6 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:a3:aa:b6 txqueuelen 1000 (Ethernet)
RX packets 41483 bytes 49218539 (46.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10982 bytes 694063 (677.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.211.54.5 netmask 255.255.255.0 broadcast 10.211.54.255
inet6 fe80::a00:27ff:fe25:5f05 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:25:5f:05 txqueuelen 1000 (Ethernet)
RX packets 3 bytes 846 (846.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 23 bytes 2538 (2.4 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 0 (Local Loopback)
RX packets 8 bytes 656 (656.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 656 (656.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I searched Vagrant changelog and issues and could not pin down the exact change, but there were several that mentioned network-related fixes for Redhat/CentOS.
Upvotes: 1