Open aogail opened 8 years ago
Thanks for the report! I don't quite know how those guest setup bits and pieces are supposed to work, so I'll need to investigate that. We're probably just missing a call to some vagrant library function during the 'up' action. I'll investigate a bit more and see what I can find.
Actually this might be a problem with XenServer needing some extra configuration. Could you try executing the following on your xenserver then recreating your vagrant box:
net=`xe network-list other-config:is_host_internal_management_network=true --minimal`
xe network-param-set uuid=$net other-config:ip_disable_gw=true
This should prevent the internal network from advertising itself as a gateway. If this works, I'll add it to the README, or possibly even detect it in the plugin.
After executing those commands and destroying/upping the VM, the situation is different but eth1
remains un-configured. The routing table did change, however; the default route through the vagrant management interface disappeared.
vagrant@vagrant-ubuntu-trusty-64:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 9e:bf:3b:4f:40:80
inet addr:169.254.0.2 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::9cbf:3bff:fe4f:4080/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:409 errors:0 dropped:0 overruns:0 frame:0
TX packets:439 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:56617 (56.6 KB) TX bytes:66253 (66.2 KB)
eth1 Link encap:Ethernet HWaddr 96:04:0e:d3:93:36
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
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:140 errors:0 dropped:0 overruns:0 frame:0
TX packets:140 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10864 (10.8 KB) TX bytes:10864 (10.8 KB)
vagrant@vagrant-ubuntu-trusty-64:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
I'm not well versed in the responsibilities of vagrant providers vs. vagrant itself, but it appears that the xenserver provider is missing something to make
public_network
s work correctly. Vagrant's documentation says the following configuration will add a public network interface to the VM, and allow its DHCP configuration to set the default route for the system:With Virtualbox
In my case I am using an ubuntu box file. When I up the VM using the virtualbox provider, the
eth1
interface is correctly configured for DHCP, and its route is the default route for the system. As such, from the VM I can ping hosts on the Internet.With XenServer
When I up the VM with the xenserver provider, the VM does have a second interface (
eth1
). However,eth1
is unconfigured. The result is that the VM cannot access the Internet, because its default route is through the private NAT interface that Vagrant uses.In the guest, I found the configuration difference in
/etc/network/interfaces
. When the VM is upped using the virtualbox provider, the file contains a block with#VAGRANT-BEGIN
/#VAGRANT-END
, which I believe comes from https://github.com/mitchellh/vagrant/blob/master/templates/guests/debian/network_dhcp.erb. When the VM is upped using the xenserver provider, the file contains nothing from Vagrant.I'm using vagrant 1.8.1 on Mac OS 10.10.