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

Discussions about using Linux guests in VirtualBox.
Post Reply
jjp
Posts: 5
Joined: 27. Sep 2017, 02:40

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

Post 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.
jjp
Posts: 5
Joined: 27. Sep 2017, 02:40

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

Post by jjp »

other "fix":
#!/bin/sh
VBoxManage controlvm "Linux Ubuntu (64-bit)" nic1 null
VBoxManage controlvm "Linux Ubuntu (64-bit)" nic1 bridged wlan0
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

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

Post 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.
jjp
Posts: 5
Joined: 27. Sep 2017, 02:40

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

Post 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.
jjp
Posts: 5
Joined: 27. Sep 2017, 02:40

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

Post 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.
jjp
Posts: 5
Joined: 27. Sep 2017, 02:40

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

Post by jjp »

some developer that can see this? or any way to communicate with development team?

thanks
erdeslawe
Volunteer
Posts: 241
Joined: 8. Jul 2015, 10:23

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

Post 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.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

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

Post 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 $.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply