NetworkManager breaks vboxnet* connections since 15.04, worked in 14.04 and 14.10, nm-applet fills with irrelevant entries.

Bug #1485558 reported by Stéphane Gourichon
48
This bug affects 11 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Confirmed
High
Unassigned

Bug Description

On an Asus laptop running a freshly installed Ubuntu 15.04 64-bit, nm-applet shows that NetworkManager wants to manage vboxnet0 and vboxnet1. These are created by virtualbox which runs some guest OS inside a VM. On previous Ubuntu releases, network-manager did not try to manage them and there was no problem.

# Observed behavior

* nm-applet shows spinning animation for a long time, while it is not relevant. Clicking on "disconnect" in the menu unconfigures the interface which breaks it.
* after suspend-resume of the host, vboxnet* lose their correct configurations. vboxnet0 (a host-only interface where virtualbox runs a private dhcp server) gets a different IP address. Looks like https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1460750 but does not feel like a bug in virtualbox.

# Expected behavior

* Just like in 14.04 and 14.10, these interfaces are just ignored by network-manager and they just work.

# Additional information

* After reading http://superuser.com/questions/9720/disabling-networkmanager-for-a-specific-interface tried to add these lines to /etc/network/interfaces. Even after restarting network-manager, it has no effect.

iface vboxnet0 inet manual
iface vboxnet1 inet manual

So, reverted the change.

* Tried from https://blogs.gnome.org/dcbw/2015/02/16/networkmanager-for-administrators-part-1/ to add in /etc/NetworkManager/conf.d/ a file 50-virtualbox.conf containing the following lines. Even after restarting network-manager, it is ignored.

[keyfile]
unmanaged-devices=vboxnet0,vboxnet1

* This is not eactly like https://www.virtualbox.org/ticket/13873, I'm not using Vagrant.
* Booting to 14.04 or 14.10 (that have been kept intact on the same machine) things just work as expected.
* /usr/share/doc/network-manager/NEWS.gz states that "'veth' interfaces are now unmanaged by default to cooperate better with external tools". Should vboxnet* be treated the same ?
* This seems on the topic but unclear to me: https://bugzilla.gnome.org/show_bug.cgi?id=731014

Thank you for your attention.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: network-manager 0.9.10.0-4ubuntu15.1
ProcVersionSignature: Ubuntu 3.19.0-25.26-generic 3.19.8-ckt2
Uname: Linux 3.19.0-25-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.2
Architecture: amd64
Date: Mon Aug 17 13:13:04 2015
IfupdownConfig:
 # interfaces(5) file used by ifup(8) and ifdown(8)
 auto lo
 iface lo inet loopback
InstallationDate: Installed on 2015-08-15 (1 days ago)
InstallationMedia: Xubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422.1)
IpRoute:
 default via 192.168.47.1 dev wlan0 proto static metric 1024
 169.254.0.0/16 dev vboxnet0 scope link metric 1000
 192.168.47.0/24 dev wlan0 proto kernel scope link src 192.168.47.6
 192.168.56.0/24 dev vboxnet0 proto kernel scope link src 192.168.56.102
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
ProcEnviron:
 LANGUAGE=fr_FR
 TERM=xterm
 PATH=(custom, no user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: network-manager
UpgradeStatus: No upgrade log present (probably fresh install)
nmcli-nm: Error: command ['nmcli', '-f', 'all', 'nm'] failed with exit code 2: Error: Object 'nm' is unknown, try 'nmcli help'.

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :
Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :
Download full text (6.0 KiB)

I tried this variant to tell NetworkManager to ignore the virtual devices:

[keyfile]
unmanaged-devices=mac:xx:xx:xx:xx:xx:xx

(using the real MAC address of course)
It still does not change anything.

But I noticed this in the log, which happen whether or not the unmanaged-devices option is set:

Aug 19 18:52:04 n55sf-l NetworkManager[6399]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
Aug 19 18:52:04 n55sf-l NetworkManager[6399]: <info> (vboxnet0): driver 'unknown' does not support carrier detection.
Aug 19 18:52:04 n55sf-l NetworkManager[6399]: <info> (vboxnet0): device is virtual, marking as unmanaged
Aug 19 18:52:04 n55sf-l NetworkManager[6399]: <info> (vboxnet0): new Ethernet device (driver: 'unknown' ifindex: 4)
Aug 19 18:52:04 n55sf-l NetworkManager[6399]: <info> (vboxnet0): exported as /org/freedesktop/NetworkManager/Devices/3
Aug 19 18:52:04 n55sf-l NetworkManager[6399]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
Aug 19 18:52:04 n55sf-l NetworkManager[6399]: <info> (vboxnet1): driver 'unknown' does not support carrier detection.
Aug 19 18:52:04 n55sf-l NetworkManager[6399]: <info> (vboxnet1): device is virtual, marking as unmanaged
Aug 19 18:52:04 n55sf-l NetworkManager[6399]: <info> (vboxnet1): new Ethernet device (driver: 'unknown' ifindex: 5)
Aug 19 18:52:04 n55sf-l NetworkManager[6399]: <info> (vboxnet1): exported as /org/freedesktop/NetworkManager/Devices/4

So, basically it seems that the devices is correctly seen as virtual and unmanaged by Network-Manager but still it finally manages it.

More details obtained using command below confirm that NetworkManager does DHCP on vboxnet0 which is definitely wrong.

grep -i network.*manag.*vbox /var/log/syslog -C 3

Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> (wlan0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> (wlan0): preparing device
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> (vboxnet0): driver 'unknown' does not support carrier detection.
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> (vboxnet0): device is virtual, marking as unmanaged
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> (vboxnet0): new Ethernet device (driver: 'unknown' ifindex: 4)
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> (vboxnet0): exported as /org/freedesktop/NetworkManager/Devices/3
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: nm_device_get_device_type: assertion 'NM_IS_DEVICE (self)' failed
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> (vboxnet1): driver 'unknown' does not support carrier detection.
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> (vboxnet1): device is virtual, marking as unmanaged
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> (vboxnet1): new Ethernet device (driver: 'unknown' ifindex: 5)
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> (vboxnet1): exported as /org/freedesktop/NetworkManager/Devices/4
Aug 19 18:59:43 n55sf-l NetworkManager[8151]: <info> urfkill disappeared from the bus
Aug 19 18:5...

Read more...

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :
Download full text (6.6 KiB)

I unchecked the auto-connect option on connection 'Auto SG IP auto' to see if it changes anything.

The behavior is different but satisfying.
Again, on suspend of the host, NetworkManager disables vboxnet0.
It just does not do DHCP on it.
Again, suspending the resuming the virtual machine repairs the connection.
Summary: still broken and still a regression.
On Ubuntu 14.04 and 14.10, suspending and resuming the host did not interfere with the vboxnet* interfaces.

Thank you for your attention.

Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> (vboxnet0): device state change: unmanaged -> unavailable (reason 'connection-assumed') [10 20 41]
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> (vboxnet0): device state change: unavailable -> disconnected (reason 'connection-assumed') [20 30 41]
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) starting connection 'vboxnet0'
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 1 of 5 (Device Prepare) scheduled...
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 1 of 5 (Device Prepare) started...
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> (vboxnet0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 2 of 5 (Device Configure) scheduled...
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 1 of 5 (Device Prepare) complete.
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 2 of 5 (Device Configure) starting...
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> (vboxnet0): device state change: prepare -> config (reason 'none') [40 50 0]
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 2 of 5 (Device Configure) successful.
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 3 of 5 (IP Configure Start) scheduled.
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 2 of 5 (Device Configure) complete.
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 3 of 5 (IP Configure Start) started...
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> (vboxnet0): device state change: config -> ip-config (reason 'none') [50 70 0]
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 5 of 5 (IPv4 Configure Commit) scheduled...
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 3 of 5 (IP Configure Start) complete.
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 5 of 5 (IPv4 Commit) started...
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> (vboxnet0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> Activation (vboxnet0) Stage 5 of 5 (IPv4 Commit) complete.
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> (vboxnet0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
Aug 19 19:04:32 n55sf-l NetworkManager[9431]: <info> (vboxnet0): device state change:...

Read more...

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

Oops I sent "The behavior is different but satisfying."

It meant: "The behavior is different but not satisfying."

Summary: somehow NetworkManager has very well understood (as shown in log) that vboxnet* interfaces should be ignored, but somehow it still manages them.

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

I tried to move away all connections in /etc/NetworkManager/system-connections/ then restart network-manager, just in case configuration somehow confused it.
Problem still happens.
Thank you for your attention.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

Summary: more trouble, nm-applet menu starts to fill with irrelevant vboxnet0 entries.

Details

Now nm-applet shows 5 "vboxnet0" ethernet connections, though I've not created any of them. 4 of them show ipv4 parameters "disabled", ipv6 parameters "ignore". Only the currently auto-activated one shows ipv4 "manual" with correct IP address.

Suspending then resuming the Ubuntu machine still breaks the vboxnet0 connection to the VM.

Asking virtualbox to suspend the guest VM then resuming it still reconfigures the connection which then works. And that causes *another extra* "vboxnet0" entry in nm-applet list of connections. I can suppress it manually but they should not be there in the first place.

Note: /etc/NetworkManager/system-connections/ now contains entries for the real connections I've created, but none of these "vboxnet0" connections.

Thank you for your attention.

summary: NetworkManager breaks vboxnet* connections since 15.04, worked in 14.04
- and 14.10
+ and 14.10, nm-applet fills with irrelevant entries.
Changed in network-manager (Ubuntu):
importance: Undecided → High
Revision history for this message
Ross Golder (ross-golder) wrote :

Attached - what the network manager applet now looks like.

All my VPN connections are off the bottom of my screen, so I currently have to use 'nmcli' from a terminal to control them :(

Revision history for this message
Ross Golder (ross-golder) wrote :

It seems the 15.04 version of network manager (0.9.10) is now quite out-of-date (!).

https://wiki.gnome.org/Projects/NetworkManager/

From https://download.gnome.org/sources/NetworkManager/1.0/NetworkManager-1.0.4.news

* The management of devices can now be controlled with udev rules. The veth
    devices as well as the virtual Ethernet devices of various
    virtualization tools (VMWare, VirtualBox, Parallels Workstation) are
    now ignored by default.

Revision history for this message
Mark Jaroski (mark-geekhive) wrote :

I'm experiencing exactly the same thing as the other report.

Revision history for this message
Mark Jaroski (mark-geekhive) wrote :

The ifupdown configuration is working for me now, so for me this has been resolved.

I'm not sure what changed or when.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.