3

I was running Fedora 25 on my workstation, with installed VirtualBox (5.1.24) and 2 Host-only networks (vboxnet0/vboxnet1) which were shown in graphical network manager in Gnome.

After upgrade to Fedora 26 interfaces disappeared. I recreated them in VirtualBox:

workstation ~ $ ifconfig -a
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.150.12  netmask 255.255.255.0  broadcast 192.168.150.255
    inet6 fe80::d77a:6ee1:8ecf:2119  prefixlen 64  scopeid 0x20<link>
    ether 50:7b:9d:69:94:f2  txqueuelen 1000  (Ethernet)
    RX packets 187617  bytes 237567859 (226.5 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 93498  bytes 7749149 (7.3 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
vboxnet0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
    inet 192.168.56.1  netmask 255.255.255.0  broadcast 0.0.0.0
    ether 0a:00:27:00:00:00  txqueuelen 1000  (Ethernet)
    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
vboxnet1: flags=4098<BROADCAST,MULTICAST>  mtu 1500
    inet 192.168.57.1  netmask 255.255.255.0  broadcast 0.0.0.0
    ether 0a:00:27:00:00:01  txqueuelen 1000  (Ethernet)
    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

Inside VB I am running FreeBSD 10.3.

inside_vb ~ $ ifconfig -a
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
    ether 08:00:27:7f:29:b3
    inet 192.168.150.83 netmask 0xffffff00 broadcast 192.168.150.255 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: int
    options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
    ether 08:00:27:b0:dd:d3
    inet 192.168.56.31 netmask 0xffffff00 broadcast 192.168.56.255 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
em2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: ext
    options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
    ether 08:00:27:73:08:fe
    inet 192.168.57.31 netmask 0xffffff00 broadcast 192.168.57.255 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active

During last months I was using ssh from workstation on em1 interface. Now wokrstation can't see VBox interface (and I can't see vboxnet0 and vboxnet1 in GUI).

 workstation ~ $ ping 192.168.56.31
     PING 192.168.56.31 (192.168.56.31) 56(84) bytes of data.
     ^C
     --- 192.168.56.31 ping statistics ---
     116 packets transmitted, 0 received, 100% packet loss, time 117799ms

Routing table inside VBox on FreeBSD looks good to me (but I can be wrong):

inside_vb ~ $ sudo netstat -r
Routing tables

Internet:
Destination        Gateway            Flags      Netif Expire
default            192.168.150.1      UGS         em0
localhost          link#7             UH          lo0
192.168.56.0       link#2             U           em1
192.168.56.31      link#2             UHS         lo0
192.168.57.0       link#3             U           em2
192.168.57.31      link#3             UHS         lo0
192.168.150.0      link#1             U           em0
192.168.150.83     link#1             UHS         lo0

Routing table on workstation, maybe there is an error, but I didn't manually anything:

workstation ~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.150.1   0.0.0.0         UG    100    0        0 enp3s0
192.168.150.0   0.0.0.0         255.255.255.0   U     100    0        0 enp3s0

Also, when I try to activate interface vboxnet0 on my workstation with use of nmtui, error I get is:
Could not activate connection: Connection 'Wired connection 1' is not available on the device vboxnet0 at this time. Bef

What should I do, to see interfaces vboxnet0/vboxnet1 in GNOME/system settings gui? What other information would be relevant to help with this problem?

More info: When I see log from NetworkManager, I can see that in the past, interfaces were discovered and then connected, but now, they are not. Any idea, what is cause of the problem?

workstation ~ $ journalctl -u NetworkManager | grep vboxnet
Jul 18 09:11:46 workstation NetworkManager[1822]: <info> [1500361906.2587] manager: (vboxnet0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/3)
Jul 18 09:11:46 workstation NetworkManager[1822]: <info> [1500361906.2845] manager: (vboxnet1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/4)
Jul 18 09:13:07 workstation NetworkManager[1822]: <info> [1500361987.1150] device (vboxnet0): link connected
Jul 18 09:13:07 workstation NetworkManager[1822]: <info> [1500361987.3323] device (vboxnet1): link connected

Jul 24 21:30:28 workstation NetworkManager[11093]: <info> [1500924628.7757] manager: (vboxnet0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/3)
Jul 24 21:30:28 workstation NetworkManager[11093]: <info> [1500924628.7771] manager: (vboxnet1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/4)

4 Answers 4

4

This is a known issue in 5.1.24, fixed in 5.1.25. Reinstalling (and rebooting, and redeploying the Vagrant box in my case) does not work. The workaround is to run the following on the host (for every host-only network):

sudo ip link set vboxnet0 up

Duplicates abound: 1, 2, 3

1
  • 1
    +1 This bug is still alive in Ubuntu 18.04 and VBox 5.2.10
    – ATorras
    Sep 10, 2018 at 10:36
0

You probably need to reinstall VirtualBox. The vboxnet interfaces are handled by a kernel module. Either the upgrade didn't rebuild that module (not likely if you have VirtualBox installed through the regular Fedora repositories), or the configuration that caused it to be loaded on boot (or otherwise automatically) got removed. I'm not 100% certain where the configuration to load it is on Fedora, but reinstalling should fix either problem.

4
  • I was trying to avoid this option because I am working with quite a large appliance (it was approximately 40 GB large 6 months ago, now export/import would take a lot of time). How to check, if I installed VirtualBox through repositories or the other way (e.g. virtualbox.org/wiki/Linux_Download, I have file /etc/yum.repos.d/virtualbox.repo present but with the date of modifying 30. Sep. 2015, so it was not created by my hand)? I installed it 6 months ago and can't remember and command in history is beyond reach.
    – borievka
    Jul 24, 2017 at 11:49
  • My guess is that it was probably through the repos. I would suggest removing the virtualbox.repo file, then force reinstalling it (dnf reinstall). Also, the appliances are independent of the software, they're stored in your home directory (by default at least), and will still be there even after reinstalling or upgrading VirtualBox. Jul 24, 2017 at 11:56
  • I think that I didn't install it through the repos, because when I try to reinstall it: sudo dnf reinstall VirtualBox Package VirtualBox available, but not installed. No match for argument: VirtualBox Error: Nothing to do.. Performing VirtualBox starts normally VirtualBox
    – borievka
    Jul 24, 2017 at 12:00
  • Nevermind, I forgot to add version. sudo dnf reinstall VirtualBox-5.1 reinstalled VirtualBox successfully, but didn't help with my problem of not seeing interfaces vboxnet0 and vboxnet1 in my host OS.
    – borievka
    Jul 24, 2017 at 12:05
0

I found a workaround (source: https://unix.stackexchange.com/a/261559/243160) which is working for me:

workstation ~ $ sudo ip link set vboxnet0 up
workstation ~ $ sudo ip link set vboxnet1 up

Then ifconfig is correctly showing up interfaces and I can ping from workstation into VB and vice versa:

workstation ~ $ ifconfig
vboxnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
vboxnet1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

Sadly, this is not persistent (after reboot there is again this problem and I need to execute it again) so till I find the correct solution, I scripted it to perform it after boot. Also, this solution is not working like I want, showing interfaces in the NetworkManager GUI like before.

I've put it into a separate answer because it is partly solving the problem and maybe help the others.

0

Thanks it really helped. I also started facing the issue after upgrading to Fedora 26. Starting vboxnet0 manually resolved the issues of pinging to the guest from host.

Host: Fedora 26 Guest: Lubuntu (Adapter1: Host only, Adapter2: NAT)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .