VirtualBox

Ticket #14374 (reopened defect)

Opened 3 years ago

Last modified 7 weeks ago

Network adapters not working after host returns from sleep Win 7 host Linux Mint 17.2 guest

Reported by: Johnny Kilo Owned by:
Component: network Version: VirtualBox 5.0.0
Keywords: Cc:
Guest type: Linux Host type: Windows

Description

Host is Dell E7440 laptop running Windows 7 SP1 Enterprise 64 bit. VirtualBox version 5.0.0 r101573. Wireless NIC is Intel Dual Band AC 7260 as a bridged adapter virtualized as Intel PRO 1000 MT desktop. Guest is "Linux Mint 17.2 Rafaela built on Ubuntu 14.04.2 LTS Trusty Tahr and kernel is 3.13.0-37-generic. The guest additions have been installed

Issue started appearing after the 5.0 update recently. After my host has returned from sleep my network connection is lost on my guest until i completely shutdown. I have tried switching the host adapter to other adapters. Disconnecting and reconnecting the cable in Devices>Network Settings. I have also tried just rebooting. The VM has to be completely powered off and back on for the adapter to work again. The network connection icon in the task bar stays discontented the entire time. No error message is given at any time.

Attachments

VBox.log Download (76.2 KB) - added by jmlefevre 3 years ago.
Vbox log file of the VM
VBox.2.log Download (175.8 KB) - added by tomasth 3 years ago.
VBox.3.log Download (87.9 KB) - added by rterzi 3 years ago.
VBox.log after host system resumed from sleep, guest network broken.
VBox.4.log Download (117.9 KB) - added by jankondratowicz 3 years ago.
Host woken up from sleep, network doesn't work on guest.
vbox.log Download (126.3 KB) - added by abhaykkk 3 years ago.
vbox logs
DevVM_Template_12c_7.0_1-2016-11-14-19-29-47.log Download (71.2 KB) - added by CliffM 2 years ago.
Lost network connection on host-only (eth0) adapter
VBoxSVC.log Download (7.8 KB) - added by Aren Cambre 2 years ago.
Unbenannt.JPG Download (35.3 KB) - added by peter9999 19 months ago.

Change History

comment:1 Changed 3 years ago by frank

Please attach a VBox.log file for such a VM session (when your host suspended + resumed).

comment:2 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Please reopen if still relevant with VBox 5.0.4. In that case, please attach the requested log file.

comment:3 Changed 3 years ago by jmlefevre

Hello,

I have the same problem with 5.0.12 I'm attaching the asked log file

Last edited 3 years ago by jmlefevre (previous) (diff)

Changed 3 years ago by jmlefevre

Vbox log file of the VM

comment:4 Changed 3 years ago by jmlefevre

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:5 Changed 3 years ago by tomasth

Same issue on Win7 host Ubuntu 12.04 guest

Changed 3 years ago by tomasth

comment:7 Changed 3 years ago by tomasth

No difference

comment:8 Changed 3 years ago by rterzi

Same problem: Bridged network connection is broken after resuming from sleep.

Workaround:

  1. Close the VM (saving machine state)
  2. Re-open the VM
  3. Then on guest run systemctl restart network.service

(A full reboot isn't required, "restarting" the VM in VirtualBox by resuming from a saved VM state seems to restore connectivity.

Host: VirtualBox 5.0.14 on Windows 7/64 bit Guest: RHEL 7.2 64 bit. Network: Bridge Network adapter, attached to GbE.

Notes:

  • The guest sees the network go up/go down, from changing the state of the cable connection from Network Settings.
  • The guest never receives any traffic as seen by tcpdump.
  • No packets from the guest are seen on the host.

Steps to Reproduce:

  1. Start Linux guest with bridge adapter
  2. Verify guest network is working.
  3. Put host system to sleep.
  4. resume host system from sleep.
  5. Try guest network.

I will attach a clean VBox.log. Let me know if there is other information that I can provide to help fix this.

Last edited 3 years ago by rterzi (previous) (diff)

comment:9 Changed 3 years ago by rterzi

Please consider raising the priority of this bug. Having to restart the VM everytime my laptop goes to sleep doesn't feel like a minor bug to me. Thanks.

Last edited 3 years ago by rterzi (previous) (diff)

Changed 3 years ago by rterzi

VBox.log after host system resumed from sleep, guest network broken.

comment:10 in reply to: ↑ 6 Changed 3 years ago by rterzi

Replying to tomasth:

Testing this workaround  https://www.reddit.com/r/HomeServer/comments/2ndfzq/virtualbox_with_ubuntu_guest_network_failure/

Manual control of the network interface, stoppping/starting the network isn't enough to resolve the problem I'm seeing. The VM's network interface is not receiving any network traffic when the network interface is broken, verified with tcpdump -n -i ...

What works for me:

  1. Closing the VM while saving state
  2. Restarting the VM from the saved session
  3. Restarting the network inside the VM to do DHCP, etc.

comment:11 Changed 3 years ago by rterzi

Should I open another bug to get this triaged as Not Minor?

comment:12 Changed 3 years ago by frank

  • priority changed from minor to major

The more tickets you open the more time we need to handle all the tickets. The ticket priority is only a rough rating. These priorities don't really define which tickets are handled first. Fixing issues in this bugtracker is done on a best-effort basis. You could even help by debugging the problem and make suggestions what to fix -- the source code is freely available.

comment:13 Changed 3 years ago by rterzi

Understood. Thanks for raising the priority.

If there is anything I can do to help debug this please let me know. I'm not sure where to start.

comment:14 Changed 3 years ago by rterzi

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.

If there is anything I can do to help debug this please let me know.

comment:15 Changed 3 years ago by jankondratowicz

I've been having the same problem on Windows 8.1 for a couple of months now, can't exactly pinpoint when it started. Currently the error occurs under these conditions:

Host: Windows 8.1 running VirtualBox 5.0.20 r106931

Guest: Ubuntu 14.04

Network type: Bridged Adapter

After resuming host system from sleep, there is no connection between guest and host (pinging doesn't work either way). No errors are shown. The only solution is to shutdown the guest and start it again. VBox.log attached.

Changed 3 years ago by jankondratowicz

Host woken up from sleep, network doesn't work on guest.

Changed 3 years ago by abhaykkk

vbox logs

comment:16 Changed 3 years ago by abhaykkk

I am also facing the same issue.

Host: Windows 8.1 64-Bit running VirtualBox 5.0.20 r106931

Guest: XP 32-Bit Network type: Bridged Adapter

After resuming host system from sleep, there is no connection between guest and host (pinging doesn't work either way). Restarting on guest system does not resolve the issue. The only solution is to restart the host system.VBox.log attached.

comment:17 Changed 3 years ago by dchiaramello

Same issue faced since 5.0.8. Windows 7 host, Redhat 5.7 guest. The problem is systematic.

Same workaround as mentioned by a previous comment:

  • close ALL opened VMs (no need to restart them)
  • re-open VM
  • run "service network restart" to reload the network stuff

comment:18 Changed 3 years ago by BoxGoBoom

Also experience the guest losing network connectivity issue for quiet some time (Has happen for more than a year - I've been using Virtual box for about 4 years in total)

Has occurred with a Windows XP Home Guest running on windows 8/8.1 premium and now windows 10(migrated from 8.1), after suspending/hibernating the Host OS.

Currently Running Oracle Virtual Box 5.0.20 r106931 with latest addons install in the guest. The host network is being accessed in bridge mode

Happens about 80% of the time (20% of the time it works after resume)

I usually have to close the guest and "Save the machine state", close the Virtual Box Manager, then reload the Guest saved state (Haven't had to restart the Host OS)

Some times, closing the guest - "Save the machine state", reload the save state, then repeat these steps a second time some times works to restore network connectivity (without having to shut down the Virtual Box Manager)

This bug is painful; but is survival-able (the bug where the virtual box host services crash [taking the guests out too] during a accidental shutdown is way worse! :-)

I'd still like to see some time put into fixing it. Can provide logs and assist in any testing support

Sincerely

PaulW

comment:19 Changed 3 years ago by LinuxGuy

Is there anything I can provide to help this along? I too am now facing this severe problem. I have just upgraded to 5.1 from 4.3.28. I had been holding off on the upgrade because 4.3.28 is the last release where I had the ability to resume from sleep and have the network work properly.

This is a fairly painful regression.

comment:20 Changed 3 years ago by LinuxGuy

I performed some network interface dumping and I could see the guest (Linux Ubuntu 14.04 in this case) was clearly still trying to use the host bridge but the host bridge but no packets make it to the bridge.

For at least the VirtualBox 5.1, I managed to find a work around by dynamically setting the VM's network interface to none and putting it back into bridged mode. I can do it with the UI, but it was easier to create a script with the following:

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm linux nic1 null

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm linux nic1 bridged "Intel(R) Dual Band Wireless-AC 7260"

So at least I have a temporary work around for now. It would be nice if the VirtualBox driver could properly reset itself after a system resume. This certainly worked in the past with the 4.3.28 version.

comment:21 Changed 2 years ago by jankondratowicz

@LinuxGuy thanks for that, it's the first workaround that works for me. I just had to make the argument match the adapter name (in my case "Realtek 8821AE Wireless LAN 802.11ac PCI-E NIC"), not type like I thought at first.

comment:22 Changed 2 years ago by shawguo

Met same issue. virtual box version: 5.0.22.r108108 , and bridged network.

comment:23 Changed 2 years ago by shawguo

I have upgraded to 5.1.2 r108956, it seems that this issue is fixed. @LinuxGuy, @BoxGoBoom @jankondratowicz anyone confirmed?

comment:24 Changed 2 years ago by jankondratowicz

@shawguo no, unfortunately update to 5.1.4 didn't help in my case, I still need to manually restart the interface.

comment:25 Changed 2 years ago by spuch

@LinuxGuy thanks for posting that work around! It saves a lot of time for rebooting the VM every day. Works fine for me with the following settings.

Host: Windows 7 SP1 Pro 64 bit. VirtualBox Version 5.1.2 r108956
Guest: Mageia Linux 5 with kernel 4.4.13
The guest additions have been installed

Syntax:
"C:\FULL-PATH-TO\Oracle\VirtualBox\VBoxManage.exe" controlvm "NAME-OF-VM" nic1 null
"C:\FULL-PATH-TO\Oracle\VirtualBox\VBoxManage.exe" controlvm "NAME-OF-VM" nic1 bridged "NAME-OF-NETWORK-INTERFACE"

for example
C:\>"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm "Mageia Linux" nic1 null
C:\>"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm "Mageia Linux" nic1 bridged "Intel(R) 82577LM Gigabit Network Connection"

I will now upgrade to VirtualBox Version 5.1.4 r110228 but according to the Changelog there was nothing fixed in that context

comment:26 follow-up: ↓ 27 Changed 2 years ago by dchiaramello

Hello.

I "confirm" that the version 5.1.4 did not solve this problem.

Regards, Daniel

comment:27 in reply to: ↑ 26 Changed 2 years ago by capeing

Replying to dchiaramello:

Hello.

I'm running Windows 10 Host and CentOS Guest, I fix this problem with the spuch solution, >but when I run my guest in Headless mode VBoxManage says that Virtual Machine isn't >running...

Regards, Pablo

comment:28 Changed 2 years ago by el_viejo

just to confirm this behavior on my hp envy dv6-7xxx series with intel centrino advanced n-6235 and onboard realtek 8168 gb-ethernet:

host: windows 10 pro, virtualbox 5.1.4 guest: windows 7 ultimate, vb guest additions 5.1.4

after coming up from sleep state i always have to disable/enable virtualboxes network bridge for every nic assigned to the guest.

regards, peter

ps: vb 5.1.6 does not address the issue. the problem is still existing.

Last edited 2 years ago by el_viejo (previous) (diff)

comment:29 Changed 2 years ago by BoxGoBoom

I'm also noting the network issue still occurring on build Version 5.1.6 r110634 (Qt5.5.1)

Win 10 home running a windows XP guest using a Lenovo Flex15 laptop with 6gig of ram, and a I5 processor.

Usually occurs after resume sleep/hibernate. May occur more often after physical network change (Home wifi to wired work connections)

Solve issue by saving machine state & closing the VM guest, closing the Virtual Box Manager, then open manager, and start up saved vm guest.

comment:30 Changed 2 years ago by el_viejo

no change with new maintenance release 5.1.8. workaround still seems to fix the problem.

comment:31 Changed 2 years ago by fkbreitl

I can confirm the same symptoms with VirtualBox 5.0.16 on Windows 7.

Saving, turning off/on VirtualBox and restoring fixed the network problem.

Changed 2 years ago by CliffM

Lost network connection on host-only (eth0) adapter

comment:32 Changed 2 years ago by CliffM

I have been having the same issue for several months. It started occurring after an upgrade, but I didn't keep track of which version. Unfortunately, my only workaround is to reboot the host machine! None of the other workarounds mentioned on this thread solve the problem.

VirtualBox 5.1.8 r111374 (Qt5.5.1)
Host: Windows 10 Pro
Guest: Ubuntu 14.04.4 LTS
Host-Only (same problem with Bridged)

Each time I suspend/resume or switch networks, I lose network connectivity between the host and the guest (same problem with host-only or bridged). I've tried the VBoxManager suggestion as well as all of the suspend, shutdown vbox, start combinations and nothing works. This is my development laptop, so I'm constantly switching networks and suspending. Rebooting the host each time is untenable. I added an attachment of the vbox.log

Last edited 2 years ago by CliffM (previous) (diff)

comment:33 Changed 2 years ago by hakster

Just to add, that I am seeing the same symptoms, running: Windows 10 host 14393.447 (with all mainstream updates as of 21/11/2016), VirtualBox 5.1.8r111374 and a single Linux Mint 17.2 VM with bridged networking. The NIC is a Realtek PCIe GBE on an HPE 250 Gen5 laptop. After waking up from hibernate, the VM has no connectivity at all - restarting the VM does not help. It needs to be powered off fully, then powered on. Another workaround, that others have mentioned, is to change the network of the VM while it is running from bridged to none then back again.

A fix would be great!

comment:34 Changed 2 years ago by twheeler

Another user here with the same problem. New laptop with fresh installation of everything: Windows 10 Professional, VirtualBox 5.1.8, and Ubuntu Mate 16.10.

Thanks to LinuxGuy above for the simple workaround script, that will save me a few seconds every day until this is fixed.

I don't have time to debug this, but I am happy to try debug builds of VirtualBox or collect logs/metrics to send if it helps.

comment:35 Changed 2 years ago by hakster

Just upgraded VirtualBox to 5.1.10 r112026 - same issue and workaround as in 5.1.8. Not surprising, since nothing in the changelog indicating "broken bridged networking after resume from sleep/hibernate on windows hosts" was fixed.

comment:36 follow-up: ↓ 37 Changed 2 years ago by vicpryl

VirtualBox Version 5.1.10 r112026 (Qt5.6.2) under Windows 10 - same issue

comment:37 in reply to: ↑ 36 Changed 2 years ago by SpideySpirit

Replying to vicpryl:

VirtualBox Version 5.1.10 r112026 (Qt5.6.2) under Windows 10 - same issue

Same problem here using Version 5.0.30 r112061 Windows10 host and WindowsXP guest

comment:38 Changed 2 years ago by hakster

VirtualBox 5.1.12 r112440 (latest stable Production release) on Windows 10 Host (fully patched 1607 14393.576) - same issue still persists. Dear Devs - any indication when this issue of bridged networking not working after host wakes up (workaround being to stop all VMs or detach and attach the NICs for running VMs) might be resolved?

comment:39 Changed 2 years ago by Aren Cambre

I'm running into a not identical but possibly related problem. I use a Surface Pro 4 connected to the Surface Dock. I use an Ethernet cable connected to my Surface Dock for all networking needs while in the office. I have my VM use a bridged adapter on my Surface Ethernet Adapter. My VM is Ubuntu 16.10, and my host is Windows 10 Professional.

If I need to unplug the dock, I lose all network connectivity in my guest OS. That's understandable as I've disconnected the Surface Ethernet Adapter. However, if I plug the Surface Pro back into its dock, while the Surface Ethernet Adapter is reconnected to the system, I still get no internet connectivity. My connectivity is lost until I shut down and restart the VM or if I power down while saving the machine state and power back up.

I'll attach a clean log file shortly.

Most people here seem to report issues with sleep. I wonder if the root issue is that, from the eyes of VirtualBox, that the network adapter is powering off, and once that happens, it doesn't know how to claw it back.

Last edited 2 years ago by Aren Cambre (previous) (diff)

Changed 2 years ago by Aren Cambre

comment:40 Changed 23 months ago by hakster

VirtualBox 5.1.16 (latest stable Production release) on Windows 10 Host - same issue still persists. Dear Devs - any indication when this issue of bridged networking not working after host wakes up (workaround being to stop all VMs or detach and attach the NICs for running VMs) might be resolved?

comment:41 Changed 22 months ago by Zach Anthony

I'm having the same problem, but found a workaround that I didn't see in the comments here...

The problem seems to be that the VBoxNetDHCP.exe process(es) associated with the VM stop working. Shutting down the VM leaves these processes still running.

My workaround:

  • Shutdown VM
  • taskkill /t /f /im VboxNetDHCP.exe
  • Restart VM

This will start new VboxNetDHCP processes and networking returns (for me).

comment:42 Changed 21 months ago by BoxGoBoom

@LinuxGuy

Just saw your post. "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm..... works like a charm.

Thank you.. You've save my life. This has been driving me NUTTs for years!

Paul

comment:43 Changed 21 months ago by rpatterson

TL;DR: Try upgrading your host NIC's driver to the latest from the manufacturer.

I've been bitten by this issue for a while. Today, I got WOL working which involved upgrading my NIC driver to the latest from the manufacturer (as opposed to what comes with Windows). Then I started working on implementing @LinuxGuy's workaround, so I tried to reproduce the issue to see if running the batch script would work around but, but I can no longer reproduce the issue.

So it may be that the root problem was the host NIC driver, not VirtualBox. This makes intuitive sense to me. After all, missing power management behavior (WOL) was the reason I had to upgrade the driver to get that to work. Perhaps it's some other missing power management behavior in the driver that causes this issue.

Hope this helps others. I'll try to remember to follow up here if the issue returns for me.

comment:44 Changed 21 months ago by mibh

same problem here, windows 10. it's a host-only adapter not nat or bridged, so i don't think using the lenovo driver for my nic will change anything. i've tried setting it to "not attached" and then "host-only", without result. i've also tried "disabled" for my windows driver for the virtualbox network interface and then "enabled", with no change.

symptom is, after a suspend/resume cycle on the host, my guests can still ping each other on their shared host-only network, but they cannot ping the host.

i am not having this problem with my "natnetwork" adapters. theoretically i could choose to reach the host from the guests on that network, but i don't want to. i have two interfaces, one natnetwork that i use to reach the internet; one host-only that i use to reach the host and between the guests.

this has been a problem for years. on 5.0 and 5.1. all versions. most annoying, though i feel badly about complaining since the software is so cheap (i am a pro user) and otherwise so excellent.

my workaround is to reboot the host. i think the bug is in the windows "virtualbox network adapter" driver. likely it is not fully reinitializing after a resume, due to some kind of ABI drift.

help wanted. thanks for reading.

comment:45 Changed 21 months ago by hakster

Latest VirtualBox 5.1.22 r115126 on latest Windows 10 1703 (15063.296 - "Creators Update") still same issue - bridged networking in VMs is broken when host wakes up from sleep/hibernate. Workaround is either to shutdown the VM (restart is not enough) and then start it, or as has been suggested by others:

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm MY-VM-NAME nic1 null

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" controlvm MY-VM-NAME nic1 bridged "MY-HOST-NIC-NAME"

Obviously adjust the above for your environment.

Dear VBox devs - this has been an issue for years on multiple VBox versions and Windows Hosts. I believe this is the active defect where it should be being tracked - could we please at least get an update or acknowledgement?

comment:46 Changed 21 months ago by frank

VirtualBox development

  1. is able to reproduce the problem and
  2. is investigating. No ETA for a fix.

comment:47 Changed 19 months ago by hakster

Dear @VboxDevs thanks for the update.

comment:48 Changed 19 months ago by frank

Anybody experiencing this problem when using briding to a wired interface? So far we were only able to reproduce the problem with bridged to a wireless interface.

comment:49 Changed 19 months ago by peter9999

Yes, here! Host is Windows 7, Guest is Windows 10

Last edited 19 months ago by peter9999 (previous) (diff)

comment:50 Changed 19 months ago by jankondratowicz

I'm having this issue with bridged adapter using wired interface, Windows 8.1 host, Ubuntu 14.04 guest.

Changed 19 months ago by peter9999

comment:51 Changed 19 months ago by spuch

My report in comment:25 also based on a (bridged) wired connection using a Lenovo X201 Laptop with an Intel 82577LM Gigabit Network Chip. Host and Guest OS are still the same as in the report while VirtualBox is at version 5.1.22 at the moment of writing.

comment:52 Changed 19 months ago by codesniffer

I'm experiencing the same issue with both wired & wireless connections.

The workaround mentioned several times here works for me:

  1. Disable the guest's networking
  2. Set VirtualBox network adapter(s) to "not attached"
  3. Close VirtualBox network adapter dialog (if applicable)
  4. Set VirtualBox network adapter(s) to "bridged"
  5. Enable the guest's networking

Happy to provide more info or run tests to help.

Last edited 13 months ago by codesniffer (previous) (diff)

comment:53 Changed 19 months ago by michaelcoburn

Workaround:
# Set adapter to "not attached" in VirtualBox, click Ok
# Ensure Guest no longer sees the interface (e.g. missing in top right menu in Fedora 25)
# Set adapter to "bridged" in VirtualBox, click Ok
# Connect adapter to Wired network
Fedora 25 guest on Windows 10 Pro Host and VirtualBox 5.1.22

comment:54 Changed 19 months ago by LaravelCoder

I'm on Win 10 with Laravel Homestead Ubuntu as my guest. I'm using wifi. I need to run homestead.bat reload --provision probably every time Windows wakes up.

comment:55 Changed 17 months ago by hakster

Yes, I am also experiencing this when bridging to a wired adapter.

Host: Windows 10 Pro 64bit 1703 Build: 15063.540 VirtualBox: 5.1.26 r117224 Guest: Linux Mint 17.2 64bit Kernel: 3.16.0-38-generic Host NIC used for bridging: Realtek PCIe GBE Family Controller (there are other NICs on the host, including wifi and several OpenVPN TAP adapters, but none of these are being bridged - usually, I have only the one guest VM above running)

comment:56 Changed 17 months ago by jack3636

Same issue, running vbox on Windows:

  • Windows 10 Pro 64bit
  • Vbox: 5.1.26 r117224
  • Guest: ubuntu 16.04.1 LTS

comment:57 Changed 17 months ago by Mac Jones

My unscientific bridged network fix:

  1. Close your VM
  2. Under advanced Networking, change the adaptor to a PCnet III type.
  3. restart

This fixed it for me across 3 reboots, couldn't get the other card type to give me internet without a stop and restart of the network, or turning it from bridged to unbridged and back again.

comment:58 Changed 17 months ago by Doub

I have the same issue with a Windows 10 host and a Linux guest. This is for firmware development, with an IDE and debugger on Windows and a compiler on Linux. This bug makes it very annoying to use my laptop on the go.

comment:59 Changed 15 months ago by smak

Same issue here:

OS X 10.13 High Sierra Host,

Windows 10 Guest.

Resuming from sleep on the OS X Host causes the wireless bridge to fail for the Windows 10 Guest. I keep rebooting the VM to fix, but will try the VBoxManage command lines.

Last edited 15 months ago by smak (previous) (diff)

comment:60 Changed 15 months ago by cezarq

Same issue: Windows 10 PRO (HOST) Zentyal Linux 5 (Guest)

The HOST always has connection, but sometimes I have to reboot the machine to things goes back.

comment:61 Changed 15 months ago by zlolikus

Same issue but with USB-Ethernet adapter AX88772 and DHCP service.

Host: Win7 x64, Guest: Ubuntu 14.04 x64 with , VirtualBox bridge networking

If usb disconnect/connect: host get IP from dhcp an works ok, guests dhcp request not found.

The same issue found when DHCP lease has expired but DHCP service was not available (server was at shutdown). After DHCP server start - host get IP from dhcp an works ok, guests dhcp request not found.

Workaround with set nic=null and back did not help. Only guest shutdown and start works ok.

comment:62 Changed 15 months ago by Kip

Host: Win7 Ultimate S1 x64
Guest: Win Server 2016

Limited internet acces (or read none) after waking up. Happens more than often.
Found a mere simple workaround, no need to reboot, or save state or whatever.

Open a cmd prompt and ping www.google.com, seconds after the pong comes in the internet connection is back up. Didn't try any other site, but I'm guessing any other site will work fine too.

comment:63 Changed 15 months ago by peter9999

Seems that comment #62 is a joke. There never comes a "pong" from any server...

comment:64 Changed 13 months ago by jaimecasero

One thing is working for me is to change the network adapter (this includes survival of any ongoing ssh session using MobaXterm).

Steps:
1.Open virtualbox adminitrator UI.
2.For problematix VM go to configuration/network. Change network adapter to any other one (in my case i have 2 ethernet NICS). Click ok to apply dialog conf changes.
3.For problematix VM go to configuration/network. Change network adapter to the original one. Click ok to apply dialog conf changes.

  1. Any ongoing ssh session are recovered in few seconds.
  2. Ping to internet from ssh session to check connection is recovered.

This procedure takes me around 1 minute to be executed (manually). Probably it maybe potentially automated throuhg some script. For me is better than restarting the whole VM, as my ongoing ssh sessions are surviving...

Last edited 13 months ago by jaimecasero (previous) (diff)

comment:65 Changed 12 months ago by fkbreitl

I just tried this workaround with changing the network adapter and it worked for me. However, it didn't seem faster or more convenient that saving and restoring the VirtualBox. But of course this depends on the hardware.

comment:66 Changed 11 months ago by Diplo

Same issue: Virtualbox 5.2.4.
Wired connection, Bridged network
Host: Windows 10 Pro
Guests: Cent OS 7

The network connection works after power sleep mode in Host, not after hibernation. The only solution is to fully close the VMs and restart them; rebooting the VMs won't restablish the network connection.

Last edited 11 months ago by Diplo (previous) (diff)

comment:67 follow-ups: ↓ 68 ↓ 70 Changed 11 months ago by DougC

This bug is insanely irritating. I'm on Windows 10 running an Ubuntu 16.04 Server VM and it happens every time. I'm not sure why this hasn't been fixed in 2 years, but here's the "best" automated fix that I've come up with. I noticed that changing the VM's Networking "Promiscuous Mode" allowed me to reconnect/ping the guest VM. So:

  • Add C:\Program Files\Oracle\VirtualBox to the sytem or user's PATH. (or just add it to the commands below).
  • Create a FixVirtualBox.bat file and add:
      @echo off
      VBoxManage.exe controlvm "My VM Name" nicpromisc1 allow-all
      VBoxManage.exe controlvm "My VM Name" nicpromisc1 deny
    
    • Change "My VM Name" to the VM you're using and have the 2nd nicpromisc1 option set the final value you want (deny is the default). Note that you must switch between two options for it to work as it must change for it to want to reset the networking.
  • To automate this, create a new "Basic Task" in Window's "Task Scheduler"
    • For Trigger, select "When a specific event is logged"
    • Log: Microsoft-Windows-NetworkProfile/Operational
    • Source: NetworkProfile
    • Event ID: 10000
  • Select the batch file created earlier to run for this event.

This will run the batch file automatically any time the network is restore on the Windows host. This seemed slightly more correct than from a sleep 'wake' event, but either probably work.

It's possible there's another, simpler VBoxManage command that will work to reset the networking, and I'm sure this can be automated to modify only running VMs, but I'm hoping the underlying bug is fixed soon.

comment:68 in reply to: ↑ 67 Changed 11 months ago by Diplo

Replying to DougC:

Thanks for the tip. I did try it but didn't work. The commands ran without any issues but the connection to the VMs still doesn't work.

comment:69 Changed 10 months ago by Diplo

Just installed version 5.2.8 r 121009. Issue is still present.

comment:70 in reply to: ↑ 67 ; follow-up: ↓ 71 Changed 10 months ago by Diplo

Hi DougC,

I kept trying because it is indeed an annoying bug. Your script didn't work because in my VMs nicpromisc1 is originally "allow-all," so when running the script there was no change. I inverted the commands, first "deny" then "allow-all" and it works! The bat has to be run as admin and problem solved. Thanks for your solution.

Replying to DougC:

This bug is insanely irritating. I'm on Windows 10 running an Ubuntu 16.04 Server VM and it happens every time. I'm not sure why this hasn't been fixed in 2 years, but here's the "best" automated fix that I've come up with. I noticed that changing the VM's Networking "Promiscuous Mode" allowed me to reconnect/ping the guest VM. So:

  • Add C:\Program Files\Oracle\VirtualBox to the sytem or user's PATH. (or just add it to the commands below).
  • Create a FixVirtualBox.bat file and add:
      @echo off
      VBoxManage.exe controlvm "My VM Name" nicpromisc1 allow-all
      VBoxManage.exe controlvm "My VM Name" nicpromisc1 deny
    
    • Change "My VM Name" to the VM you're using and have the 2nd nicpromisc1 option set the final value you want (deny is the default). Note that you must switch between two options for it to work as it must change for it to want to reset the networking.
  • To automate this, create a new "Basic Task" in Window's "Task Scheduler"
    • For Trigger, select "When a specific event is logged"
    • Log: Microsoft-Windows-NetworkProfile/Operational
    • Source: NetworkProfile
    • Event ID: 10000
  • Select the batch file created earlier to run for this event.

This will run the batch file automatically any time the network is restore on the Windows host. This seemed slightly more correct than from a sleep 'wake' event, but either probably work.

It's possible there's another, simpler VBoxManage command that will work to reset the networking, and I'm sure this can be automated to modify only running VMs, but I'm hoping the underlying bug is fixed soon.

comment:71 in reply to: ↑ 70 Changed 10 months ago by Diplo

The script runs when Windows is back from hibernation or sleep, but doesn't work most of the times. Now I'm just running plain "sudo service network restart" in the guest CentOS VMs and it works.

comment:72 Changed 9 months ago by Diplo

Now "sudo service network restart" doesn't work any more. The only solution is to close the VM and restart it again. Please VirtualBox team, try to fix this bug.

comment:73 Changed 9 months ago by Diplo

This morning I tried pinging the VM after hibernation: it replied, but still, the services were down. I checked "ip addr" in the VM and the NIC was missing. So I tried

sudo ifup enp0s3

(enp0s3 is the VM's NIC name)

Followed by:

sudo service network restart

And it works. Apparently it is an issue of CentOS, FAQ #2  https://wiki.centos.org/FAQ/CentOS6#head-b67e85d98f0e9f1b599358105c551632c6ff7c90.

Last edited 9 months ago by Diplo (previous) (diff)

comment:74 Changed 8 months ago by Oleh1964

Host OS: Windows 10

Guest OS: Ubuntu 16.04.4 server (x32)

VirtualBox: 5.2.10

Issue: after starting guest OS its network interface did not want to work. (I tried all virtual Intel adapters and bridge mode - results were the same, I mean negative ones)

Workaround:

Command sudo service networking restart on guest machine.

But I did not want to do it after every reboot. Therefore in original /etc/rc.local file of guest machine I have added one row (before "exit 0"):

/usr/sbin/service networking restart

(This row restarts network services immediately after starting guest OS)

And after that my guest system worked properly after every reboot.

comment:75 Changed 5 months ago by Ronen

Same here. Host: Windows 10 Pro. Virtualbox 5.2.18 r24319.

Gusts: Oracle Linux 7.5 x64.

After sleep hostonly adaptor is down.

Host can ping itself (10.0.10.1) but not guests (10.0.10.11 & 10.0.10.12). Guests can ping eachother. Guests cannot ping host (10.0.10.1).

Restart guests, deattaching, disabling the adaptor on the host or any other workaround won't help - only HOST reboot fixes it.

Super annoying.

comment:76 Changed 4 months ago by Disassembler

Another affected user here.

VirtualBox: 5.2.18
Host: Windows 10 Pro
Guests: Multiple. Another Win 10 Pro, Ubuntu 18.04, RHEL 6, ...

Wired connection. After the router is rebooted, all VMs lose connection indefinitely. Host needs to be rebooted in order to reestablish the connection.

comment:77 Changed 4 months ago by aleksey

Could you please try any test build later than r125350 from here?

comment:78 Changed 4 months ago by Jim Hume

@aleksey I tried build r125384. At first, the issue seemed resolved when allowing my laptop to sleep 'naturally' (by walking away/coming back after a brief period of time). But when resuming from a hibernation (overnight), the network error reappeared.

Virtual Box 5.2.19 r125384 (Qt5.6.2) Host: Windows 10 Pro (build 17134 / 1804) Guest: Windows 7 Pro SP1 (build 7601) Guest Additions: r125339 (this seems odd?)

Last edited 4 months ago by Jim Hume (previous) (diff)

comment:79 Changed 4 months ago by Mahn

@aleksey I tested the development snapshot 125396 and I can confirm what Jim Hume describes above: it appears to retain the connection coming from light/short sleep, but after the sleep/hibernation hybrid by windows 10 kicks in the connection is lost. Additionally I had this dev snapshot crash the running machine once after coming back from this state (I did not note the error sadly, but I think it mentioned something about unexpected memory access violation).

If it helps, the fix described above by DougC of changing the "Promiscuous Mode" setting to force the machine "reconnect" after sleep worked for me on a stable build (but it's far from ideal).

Last edited 4 months ago by Mahn (previous) (diff)

comment:80 Changed 4 months ago by Disassembler

Tried 5.2.19-125396. VMs still lose connection indefinitely after roouter is rebooted.

comment:81 Changed 3 months ago by Jim Hume

I've confirmed that the issue is partially fixed in 5.2.20 r125813 (Qt5.6.2) with the same behaviour as r125384 (5.2.19) that I reported in comment 78, and @Mahn confirmed in comment 79.

comment:82 Changed 3 months ago by Leo01

First I thought it is still a problem in Version 5.2.20 r125813 (Qt5.6.2). I am using NAT Network, host is Windows 10, and few Centos 7 guests. They communicated between each other fine, until the host went to sleep. After waking up, even ping did not work: says host unreachable. On the other hand, the network outside this virtual router was perfectly visible, including internet. So only the in-subnet communication was lost. However, because of some other network issues, I had to fix my /etc/sysconfig/network-scripts/ifcfg-enp0s3 on all virtual machines, and looks like it is working now. I tested it by letting the host sleep for 30 minutes, and it is fine after waking up.

Last edited 3 months ago by Leo01 (previous) (diff)

comment:83 Changed 2 months ago by filimonov

I have the same issue and found quite simple workaround: "replug" the cable of network card after waking up from hibernation. Can be done by toggling checkbox in Settings of running machine (Network / Advanced / Cable connected). The same can be done by

VBoxManage controlvm "machine_name" setlinkstate1 off # and on afterwards

I've created simple script for that  https://gist.github.com/filimonov/58779d1495e81568fb36a52463d2bdb1. You can schedule that script to on wakeup event.

If that will help also in other cases listed here - thta workaround is quite safe and may be can be added in VirtualBox itself?

PS. My configuration is VirtualBox 5.2.22 (host: Windows 10 Home, guest: Ubuntu Trusty 14.04.5 LTS), AMD Ryzen 5 based laptop (rather it's not important, but Ryzen is known to have issues / 'freezes' when running Linux, latest version of linux kernel address some of those issues).

Last edited 2 months ago by filimonov (previous) (diff)

comment:84 Changed 8 weeks ago by mkokidko

New Datapoint: Network gone after return from suspend in guest debian stretch, host win10. restarting network service and "disconnecting" the virtual network cable did nothing. switching promiscuous mode from on to off fixed it immediately without needing to reboot nor restart network services. I don't think I need it on so I'll know after a few more days if the problem goes away or the switch is the crucial trigger.

Vbox v.5.2.18 r124319.

comment:85 Changed 7 weeks ago by Mahn

@mkokidko the switch is the trigger, a change in promiscuous mode forces a reset in the virtual network interface of some sort, but the connectivity is always lost on waking from hibernation, hence you need to trigger the network reset every time the computer awakes. That's why several people here on this ticket are writing scripts to do this with every awake event.

It seems like this reset trigger is something that could be built into VirtualBox itself like @filimonov suggests.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use