Page 1 of 1

Network bridge not working after wifi dongle is unplugged and plugged again

Posted: 27. Sep 2017, 03:00
by jjp
Version Affected: 5.1.28 and early
Host OS: Ubuntu 17.04
Guest OS: Ubuntu 16.04

test case:

1) VM running
2) Unplugg WiFi dongle (or other undetermined situation that produce network connection drop, if I disable WIFI from network manager issue don't happen)
3) Plug WiFi dongle

In this point all networks functionality is restore in all machine, but host and guest machines can't connected.

ping from host to guest

# ping 192.168.0.45
PING 192.168.0.45 (192.168.0.45) 56(84) bytes of data.
From 192.168.0.103 icmp_seq=1 Destination Host Unreachable
From 192.168.0.103 icmp_seq=2 Destination Host Unreachable
From 192.168.0.103 icmp_seq=3 Destination Host Unreachable

restarting virtualbox services don't works to fix the problem

only 3 ways to fix the problem:

1) shutdown the Host Machine
2) shutdown the Guest Machine (only power off. reboot don't works to fix the problem)
3) go to Configuration/Net, and switch adapter name, then ok, and then go to Configuration/Net and switch the right adapter again, then ok, then networks works again.
for example:
switch to eth0, then switch to wlan0

when the networks works again, I saw on syslog this entry:

Sep 26 21:22:56 ubuntu-server kernel: [551410.610577] VBoxNetFlt: attached to 'wlan0' / xx:xx:xx:xx:xx:xx

(xx:xx:xx:xx:xx is my masked mac address)

seem that wifi error condition is not detected by Vbox, then it don't reattach to interface if I don't do it manually.


Sorry for my bad english.

Re: Network bridge not working after wifi dongle is unplugged and plugged again

Posted: 27. Sep 2017, 05:24
by jjp
other "fix":
#!/bin/sh
VBoxManage controlvm "Linux Ubuntu (64-bit)" nic1 null
VBoxManage controlvm "Linux Ubuntu (64-bit)" nic1 bridged wlan0

Re: Network bridge not working after wifi dongle is unplugged and plugged again

Posted: 27. Sep 2017, 12:38
by mpack
This is normal behaviour for USB devices. Every time you unplug a USB device a session ends and an identifying handle is destroyed. The end.

It makes no difference that at some future date the same or a similar device will be plugged in. That's another lifetime.

Re: Network bridge not working after wifi dongle is unplugged and plugged again

Posted: 27. Sep 2017, 16:49
by jjp
mpack wrote:This is normal behaviour for USB devices. Every time you unplug a USB device a session ends and an identifying handle is destroyed. The end.

It makes no difference that at some future date the same or a similar device will be plugged in. That's another lifetime.
Wrong. Maybe I was bad explain me. A real pc don't have this behaviour.

The host machine don't need to be rebooted for works again with this usb device, only the VM.

The device is used in the host machine, and it works fine. Guest machine only use it as bridged.


The problem is that the VM don't start a new session, the vbox must detect the end of session and create other new handle.

This is a bug.

Please, test the case. I was provide details for do it.

Re: Network bridge not working after wifi dongle is unplugged and plugged again

Posted: 27. Sep 2017, 17:03
by jjp
I said "unplugged" for replicate easy the case... but It happen also if I don't unplugg the usb dongle, if it is disconnected by the OS (host).

the OS (host) recover the functionality of it, but VM (os guest) don't.

Re: Network bridge not working after wifi dongle is unplugged and plugged again

Posted: 3. Oct 2017, 06:26
by jjp
some developer that can see this? or any way to communicate with development team?

thanks

Re: Network bridge not working after wifi dongle is unplugged and plugged again

Posted: 3. Oct 2017, 10:53
by erdeslawe
There is nothing for the VirtualBox 'Developers" to do.

As you've already identified yourself, if Host PC/Operating System repossesses the USB Device it can't/won't release it unless it is completely 'detached' from the Host. That's the inbuilt behaviour of the Host system and nothing to do with the Virtual/Guest system.

Re: Network bridge not working after wifi dongle is unplugged and plugged again

Posted: 3. Oct 2017, 12:59
by socratis
jjp
The developers have their own priorities which do not necessarily are aligned with yours. If you want to tell Oracle how to invest development resources, don't do it on this (or any other) forum, as that's just a waste of bandwidth. Go through your Oracle support representative instead.

Oracle support options: http://www.oracle.com/us/technologies/v ... index.html

If I'm not mistaken, the minimum starting price is around 6000 $.