2017-03-02 2 views
0

Meine Vagrantfile enthält die Zeile config.vm.network :private_network, ip: "192.168.33.10" zugewiesen bekommen, aber wenn die Maschine ifconfig zeigt aufkommt:Vagrant Gast nicht korrekt IP

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 ist der Gast aus einem völlig anderen Bereich eine IP zugewiesen bekommen. Die Ergebnisse der ifconfig auf dem 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) 

Alle Ideen, wie unstet bekommen die richtige IP zuweisen? (Dies ist vagrant 1.9.1, Gastgeber ist Ubuntu 16, Gast ist CentOS 6.

bearbeiten: Dies ist die Ausgabe von 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. 
+0

was ist die Ausgabe von 'vagrant up' Befehl? es ist komisch, wie Sie eine zweite Netzwerkschnittstelle mit der richtigen IP haben sollten (es wird nur im Gast nicht der Host angezeigt) –

+0

Ich habe die Ausgabe von 'vagrant up' hinzugefügt. – Johnny

Antwort

1

Basierend auf einigen Tests habe ich nur, ich glaube, Die Antwort hier ist ein Upgrade auf Vagrant 1.9.2, was ich vorher nicht bemerkt habe, da ich meistens Ubuntu-Boxen benutze, aber mit einer CentOS 7.2-Gast-VM bekomme ich dasselbe Ergebnis wie du. Ich definiere ein privates Netzwerk wie folgt:

x.vm.network :private_network, ip: 10.211.54.5 

Nach vagrant up, anmelden, um das Feld ein und überprüfen Sie die Ausgabe von ifconfig:

Vor (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 

Nach (Upgrade Vagrant auf 1,9 0,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 

ich suchte Vagrant Changelog und Ausgaben und konnte die genaue Änderung nicht festzunageln, aber es gab einige, die netzwerkbezogenen Korrekturen für Redhat/CentOS erwähnt.

1

Es sieht aus wie die aktive Entwicklung von Lumify Open-Source-Version endete im Jahr 2015. Haben Sie die open source version of Visallo versucht? Es gibt auch eine enterprise edition, wenn Sie zusätzliche Fähigkeiten oder größere Skalierbarkeit benötigen.

Verwandte Themen