Bridged network broken after host sleep/resume, Linux Guest

Discussions related to using VirtualBox on Windows hosts.
Post Reply
rct
Posts: 5
Joined: 20. Nov 2015, 19:35

Bridged network broken after host sleep/resume, Linux Guest

Post by rct »

Summary: After my Windows 7 host resumes from sleep, the bridged network connection for a Linux guest is broken until the VM is closed and restarted.

Host: VirtualBox 5.0.14 on Windows 7/64 bit
Guest: RHEL 7.2 64 bit. Network: Bridge Network adapter, attached to on-board Intel GbE.
System: Thinkpad T530.

Bug #14374 https://www.virtualbox.org/ticket/14374 opened by someone else seems to describe the problem I'm seeing. I've added my details and logs to that ticket.

Currently that's listed as a reopened defect, with a minor priority.

I have a work around which is to close the VM, saving state, and then restart it. However, that can be somewhat time consuming/annoying to do every time the system resumes from sleep.

I, of course, don't see this as a minor bug. If the bug was triaged correctly as a reopened defect, a regression, is there any way to request that the priority be re-evaluated?

In the meantime, is there any other way to get VirtualBox to re-setup (re-plumb?) the bridged network connection?

Using the VirtualBox gui to disconnect/reconnect the network cable doesn't work. The guest notices that the cable is disconnected/reconnected, but it never receives any packets, and never sends any packets, checked from both the guest and another phsical system.

(NAT networking doesn't seem to be affected by this bug, but the IPsec VPN connection that I need on the VM doesn't seem to work with NAT.)

Thanks for any help
abj
Posts: 4
Joined: 26. Feb 2016, 17:23

Re: Bridged network broken after host sleep/resume, Linux Gu

Post by abj »

I also have the same issue. My host is ORHEL 6.5 on win 2012. the VB is version 4.2. The insternet was working with bridged networking adopter for a while . However, when i close my VB and as well as my laptop, since then it is not working.
rct
Posts: 5
Joined: 20. Nov 2015, 19:35

Re: Bridged network broken after host sleep/resume, Linux Gu

Post by rct »

Is there anything I can do to debug this?
rct
Posts: 5
Joined: 20. Nov 2015, 19:35

Re: Bridged network broken after host sleep/resume, Linux Guest

Post by rct »

I'm still having this problem. Ticket #14374 priority was raised to major seven weeks ago. https://www.virtualbox.org/ticket/14374

I would really appreciate any clues on how to help diagnose this, gather data, produce test cases, etc.that might help get this resolved. Any suggestions appreciated.

I've got the workaround of closing and reopening the VM, and fortunately I have an SSD. But it is still tedious and I feel like I'm going to prematurely wear out my SSD, by constantly writing out the full VM machine state in order restart the VM.

I have not been able to find a manual way to force the bridged network adapter setup to be replumbed. Anyone have any ideas?

I'm considering moving over to VMware as a workaround until this is resolved.

Thanks,
--Rob
rct
Posts: 5
Joined: 20. Nov 2015, 19:35

Re: Bridged network broken after host sleep/resume, Linux Guest

Post by rct »

An additional data point: If there are two bridged VMs open when the machine sleeps/wakes-up, closing and reopening a single VM will NOT restore network connectivity. BOTH VMs (or presumably all bridged VMs) must be closed before restarting the VM to get bridged network connectivity back.

So I'm guessing what ever code needs to run to "re-plumb" the bridged network adapter on Windows doesn't get run if there is already a bridged network connection. (Even though it is a broken network connection.)

If there is anything I can do to help debug this please let me know.
lsan
Posts: 5
Joined: 25. Sep 2017, 11:09

Re: Bridged network broken after host sleep/resume, Linux Guest

Post by lsan »

Same problem here, windows 10 host and windows 10 guest. No bridged network after host sleep/resume. If you power off the virtual machine and start it again, bridge network starts working again. You can change the networking mode to NAT mode and get connectivity too but, the bridge networking mode does not work again unless you power off the vm: if you restart the guest the problem is still there, if you unplug/plug the "virtual network cable" it doesn't help neither.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Bridged network broken after host sleep/resume, Linux Guest

Post by mpack »

I get this on a physical Win10 tablet too, so I wouldn't assume it has to be a VirtualBox problem. In my case the tablet worked fine until the Creators Update was pushed to it, and thereafter it always wakes up with a dead WiFi connection, if the lease expired while it was asleep. For some reason it doesn't negotiate for a new one unless I manually toggle the WiFi. Win10's troubleshooting is a joke too. The pearl of wisdom it offered was "Your Ethernet cable is unplugged".
lsan
Posts: 5
Joined: 25. Sep 2017, 11:09

Re: Bridged network broken after host sleep/resume, Linux Guest

Post by lsan »

Has someone lost connectivity using the virtual machine?

I mean, the host didn't suspend/hibernate but the connection is broken (same behaviour). I think, it could be a windows update. I have been using VirtualBox 5.0.20 and this didn't happen before.
BaggerMAN
Posts: 1
Joined: 5. Jul 2018, 11:46

Re: Bridged network broken after host sleep/resume, Linux Guest

Post by BaggerMAN »

I have the same problem.

My host OS is Ubuntu 18.04 (bionic).
My guest OS is Debian 9.4 (stretch).
VirtualBox version: 5.2.14 r123301 (Qt5.9.5)

The network settings in Ubuntu are controlled through netplan (not through the GUI), because I have a network bridge (br0) in the host OS itself to combine the physical network adapter (enp2s0) and the logical network adapter (tap0) from OpenVPN.
The physical adapter is configured to use DHCP.

Exactly the same network configuration I have configured in the guest OS Debian. Only there it is made not through netplan, but simply in /etc/network/interfaces.

In the VM settings the connection type is: Network Bridge.
Adapter name: enp2s0.

The host OS, guest OS and VM settings have "Promiscuous mode" enabled for working with OpenVPN.

I use "Wake-on-LAN fix" on the host OS that started by systemd after the system wakes up:

Code: Select all

#/etc/systemd/system/wol@.service

[Unit]
Description=Wake-on-LAN for %i
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s %i wol g

[Install]
WantedBy=multi-user.target
Previously, I used the Ubuntu 16.04 as host OS and did not notice any problems with the VM network after waking up the computer.

I hope this information will somehow help in solving this problem.
Post Reply