I'm running Ubuntu 16.04 on my server which is used for virtualization. It's running multiple Ubuntu 16.04 guest using the qemu-kvm software for virtualization. The server is using libvirt to manage the guest (autostart, start/stop etc.) and I have all of the guest set-up to autostart on host boot.

When the host is booting everything seems normal without any errors and the internet is working as it should. But when I open a VNC connection to any of the hosts while it's still booting I can see that the networking fails (Failed to start Raise network interfaces.). This only happens on a cold boot. By that I mean it only happens when I boot the server and the guest gets automatically booted after the host is online. When this happens, I can simply restart the host manually and it will work fine without any problems. I can also just restart the particular interfaces (ifdown -f eth0 && ifup eth0) to make the internet work again.

Most guests have only one interface (eth0) and is requesting a static IPv4 and a static IPv6 address from the router. One thing I've noticed is that the IPv6 route has the "expire x seconds" option on it, while the IPv4 does not. This causes the guest to not be accessible over IPv6 when the route expires. Is this expire there because of the Raise network interfaces failing on boot?

I'm trying to find out why the guests are all having problem getting the interface working on a cold boot. It's very annoying having to (re)start all guests manually. The hosts' syslog does not show any errors related to the networking service, and the guests only have this error: "RTNETLINK answers: File exists" without any further errors.

  • I've tried different approached of setting up the bridge on the host. But none seem to fix this issue. It seems like the host has not fully initialized the bridge on boot, when the guests are already starting up. I could try to delay the guests' booting on host boot and will report back!
    – Qlii256
    Nov 13 '16 at 21:22
  • When disabling the autostart feature (virsh autostart) and manually booting the guests seems to fix the issue. When I wait 1 minute after the host booted up, it mostly works. I have now set-up a bash script that runs (by a cronjob) 3 minutes after host boot to start all my guests. This seems to temporary resolve my issue. However, I still want a permanent fix for this. Seems to be related to something not being ready on the host, the bridge maybe?
    – Qlii256
    Nov 16 '16 at 17:59
  • I found a permanent fix for my issue now, it's related to RA and setting a gateway at the same time in the interfaces file.
    – Qlii256
    Nov 19 '16 at 14:32

The networking service in Ubuntu is setting up the interface on the guest. The link is up fast, but the actual interface initialisation is not yet complete. This causes the networking-services to accept neighbor and router advertisements.

When you have a gateway rule in your interfaces file, this can cause problems when the interface is fully initialised and their have been accepted router advertisements before this happened. The service is trying to add the default route based on your gateway rule, but there is an existing default route for this particular gateway assigned via RA (router advertisement).

To solve this issue, I simply removed the gateway from the interfaces file, as the gateway is auto assigned via RA. Another fix would be to disable accepting RA on this particular interface, the default value or all interfaces by using:

pre-up net.ipv6.conf.device.accept_ra=0

where "device" is "all", "default" or the actual device name (eth0, em0 etc.).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.