Opened 9 years ago
Last modified 2 years ago
#15308 new defect
guest does not regain network connectivity if cable unplugged for for 5+ secs
Reported by: | Tim Riley | Owned by: | |
---|---|---|---|
Component: | network | Version: | VirtualBox 5.0.16 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Windows |
Description
Host = Windows 10 Version 1151 (Build 10586.164) Guest = CentOS7.2.1511 x86_64 (Kernel 3.10.0-327.el7.x86_64)
VirtualBox VM has 2 adapters
- 1 = Host-only Adapter (VirtualBox Host-Only Ethernet Adapter)
- 2 = Bridged Adapter (Intel Ethernet Connection I219-LM)
Networking functions 100% between the VM and LAN if I power on the VM with the Ethernet cable plugged in to the bridged interface (Intel Ethernet Connection I219-LM). The VM can communicate with my LAN and vice versa.
If I start a ping from within the Linux VM and disconnect the Ethernet cable from the bridged interface (Intel Ethernet Connection I219-LM) and plug it back in within 5 seconds, the ping picks back up where it left off.
If it takes more than 5 seconds for me to plug the cable back in, the ping does not pick back up and I need to shut down the VM and cold boot it in order to restore networking between the VM and LAN. Restarting the guest Linux networking, a VM reboot, or a disable/enable of all Windows' interfaces does not regain network connectivity to the Linux VM. Only a shutdown and cold boot of the VM.
I've tried the various "Adapter Types" in VirtualBox to no avail.
I run static IPs in the guest.
Virtual LAN = 192.168.184.0/24 VirtualBox NIC in PC = 192.168.184.1/24 Linux enp0s8 = 192.168.184.2/24 (default gw 192.168.184.1)
Physical LAN = 10.70.0.0/24 Windows physical NIC = 10.70.8.139/16 Linux enp0s17 = 10.70.8.130/16
Note: If I put the PC to sleep (tested up to 5 mins) and wake it back up, pings pick back up. It's just when I disconnect the cable to more than 5 seconds and plug it back in, the pings do not pick back up.
Attachments (3)
Change History (22)
by , 9 years ago
Attachment: | VB_Log.zip added |
---|
follow-up: 4 comment:1 by , 8 years ago
comment:3 by , 8 years ago
Which VirtualBox version? And please attach a VBox.log file for such a VM session.
comment:4 by , 8 years ago
Replying to LeonMF:
See this forum post for the full dialogue: https://forums.virtualbox.org/viewtopic.php?f=6&t=80140
I'm the one that did that "full dialogue" (or range of outcomes) in that post. I've been meaning to get it re-tested with the latest VirtualBox (5.1.10 just came out) and post the results. I haven't had the time (it takes quite some time to run the whole matrix of tests), but I might try it later today. I'll update the post.
Plus, as I said in the forums, I've been meaning to search for an open ticket. Glad it found me instead ;)
comment:5 by , 8 years ago
Tried it with the latest version 5.1.10 r112026 and the problem still exists. The guest (Windows 7) doesn't get an information if the Ethernet cable is unplugged. The host (Windows 10) works fine and show the disconnection of the network.
But if I reconnect the cable the connection in the guest doesn't work anymore. I have to restart the guest to get it to work again.
comment:6 by , 8 years ago
Tried to get my Network to work with the current Version 5.1.12. Same error. The guest VM (this time an old Windows XP) doesn't rekongnise if I pull the Network cable. Nor if I plug the cable back in.
After pulling the cable the Network is offline. This is a Problem of Virtualbox. Tried one of my VM with Hyper-V on the same Notebook (T460) and it works fine.
Added the Logfiles of my Tests.
comment:7 by , 7 years ago
The error is still there with VB 5.2, but not all systems seem to have the problem. In my case Intel I219-V network card the error is there. On the host system (Win10 1709) you find in the event log source: "NDIS, eventid 10400. The network driver requested that it be reset" after ~5 seconds without network link. As soon as you had this error, you'll have to shut the vm down and up again (simple reboot doesnt help) or you reset the network binding by choosing another bridge adapter and switch back to the one in the first place. Hope somebody is able to fix this issue soon.
comment:8 by , 7 years ago
Just tested 5.2.8 on my Win10 1709 host. Same issue.
Intel NIC is I219-LM.
Please fix this issue soon.
comment:10 by , 6 years ago
I'm having the same issue, tested with 6.0 (r127566) and 5.2.22. Bridged networking does not work when the cable is plugged in after the VM has been booted. As a workaround, I can set the network adapter to "not connected" and then back to "bridged network" while the VM is running to connected to the network.
My network adapter is Intel I219-V.
comment:11 by , 6 years ago
Tested this again with the most current stable version (6.0.2) and still have this issue.
comment:12 by , 5 years ago
This issue is reproduced on 6.0.10, with Win10 1903 for host and CentOS 7.6 for guest. Has anyone found a solution or a workaround?
comment:13 by , 4 years ago
This issue still an issue.... Is anyone going to address this bug? Has ANYONE found a resolution or workaround for this?
comment:14 by , 4 years ago
Think I've found a solution, although only tested on a few devices so far. Have tested on devices with both -V and -LM network adapters.
This should all be done on the host machine.
Update to the latest drivers for the i219 network adapter, either through device manager or grab them from Intel (Same driver pack for both -V and -LM https://downloadcenter.intel.com/product/82185/Intel-Ethernet-Connection-I219-LM Intel). I'm not sure this step is needed but it rules out old drivers being a problem.
I only installed the device drivers (unticked 'Intel PROSet' and 'Intel Advanced Network Services' on the Setup Options page of the installer).
On to the fix!
Open powershell as admin then run the following command to find the name of your i219 network adapter
Get-NetAdapter
Then use that name in the following command. For me, the name was Ethernet
Get-NetAdapterAdvancedProperty -name Ethernet | Reset-NetAdapterAdvancedProperty
With this done any time the network cable is unplugged then reconnected connectivity always returns. If you had a VM running already you'll need to power it off and back on.
It also continues to function correctly after restarting windows.
I should also highlight that at no point have I modified any of the advanced properties on the network adapter so this isn't resetting a change made by a user.
comment:15 by , 4 years ago
I just wanted to confirm that this solution worked for me (Win10/i219-LM). Many thanks! It was driving me mad having to switch between NAT and Bridged every time I repowered the embedded board that I have connected to my VM.
comment:16 by , 2 years ago
I too want to confirm that, after trying all sorts of other things without success, this did work on my Win10/i219-LM. Many thanks as almost all my hair is now gone. I too had not changed any properties of the NIC so not sure what this is doing. Very odd.
comment:17 by , 2 years ago
I wanted to know what was happening here.
Some searching told me I could display the entire list of advanced NIC properties with this command line: Get-NetAdapterAdvancedProperty -Name "*" -AllProperties so I did this before and after running the above command line: Get-NetAdapterAdvancedProperty -name Ethernet | Reset-NetAdapterAdvancedProperty and captured the information in text files which I then ran through a difference app.
It turns out that a change is made to only a single property in this NIC called Link Speed Battery Saver. Before it was disabled, after it was enabled. Absolutely no other differences were detected. It seems this can be changed via Device Manager in the advanced properties of the NIC...
comment:18 by , 2 years ago
Some explanation of this property's function can be seen in the section 6.3.1.7 here <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwji_-vymYz9AhUtMzQIHZhiAscQFnoECAgQAQ&url=https%3A%2F%2Fdatasheet.octopart.com%2FWGI218LM-S-LK3B-Intel-datasheet-76215422.pdf&usg=AOvVaw1mKjLicIq8vvs-r4lBVsyF>.
I am still in the dark as to why this was having the impact I was seeing. But this is about as far as I can go. Best wishes and thanks so much to AD_PDS for finding this out and letting us know!
I'm experiencing similar problems on Windows 10 host.
Host: Windows 10 Guest: Windows 7 (plus many others. Linux not tested) Machine: Dell Precision 7510 Network Adapter: Intel 1219-LM VirtualBox Version: 5.0.X (don't remember when first observed) - 5.1.6
About a year ago, me and my colleagues started noticing a problem where a bridged network connection would work fine when a VM was started but unplugging the network cable and plugging it back in would result in VirtualBox never resuming the network connection on the guest.
I did a follow up test:
Based on the investigation above I did a test where I did a pull/plug cycle. After re-plug, trying an ipconfig /release and /renew cycle resulted in the error:
"No operation can be performed on Local Area Connection while it has its media disconnected."
I take that to mean that, on Windows 10, my host is being notified of the pull event but not the plug event.
See this forum post for the full dialogue: https://forums.virtualbox.org/viewtopic.php?f=6&t=80140