VirtualBox

Ticket #3625 (closed defect: fixed)

Opened 5 years ago

Last modified 2 years ago

guest lose network connectivity after host resumes from sleep => Fixed in SVN

Reported by: kauer Owned by:
Priority: major Component: network/hostif
Version: VirtualBox 3.0.4 Keywords:
Cc: Guest type: Linux
Host type: Linux

Description

Ubuntu 8.04LTS guests running on Ubuntu 8.04LTS host. VirtualBox 2.1.4 for Linux.

When the host resumes from suspend (to RAM, haven't tested with suspend to disk) the guests no longer have network connectivity. The interface is present, they can ping themselves, but they cannot ping the host or any address outside the guest.

Running /etc/init,d/networking restart on the guest does not help. Running /etc/init,d/networking restart on the host does not help. The only sure found thus far is powering the guest off and restarting it.

Attachments

VBox.log Download (40.7 KB) - added by kauer 5 years ago.
VBox.2.log Download (227.6 KB) - added by drossier 5 years ago.
Failure when resuming a VM with a different subnetwork
VBox.3.log Download (79.8 KB) - added by lhankins 3 years ago.
attaching full virtualbox log referenced in comment : 2011-02-28 18:36:11 by lhankins

Change History

Changed 5 years ago by kauer

comment:1 Changed 5 years ago by kauer

Further information:

Just to be clear: This is the *host* being suspended and resumed, while the guests are running.

There is no need to wait for time to pass in suspended mode. Suspending and resuming the host is sufficient to clag guest connectivity, even if the host remains suspended only for a few seconds.

The problem is still there if I manually suspend the guest, then suspend the host, then resume the host, then resume the guest.

Note that pausing and resuming the guest (without suspending/resuming the host) does NOT cause a problem. The guest still has connectivity after being paused and resumed.

The guests are clones of an original which has a line in /etc/udev/rules.d/75-persistent-net-generator.rules to ignore VBox interfaces:

ATTR{address}=="08:00:27:*", GOTO="persistent_net_generator_end"

comment:2 Changed 5 years ago by frank

  • Host type changed from other to Linux
  • Guest type changed from other to Linux

comment:3 Changed 5 years ago by frank

We tried this here with a Gentoo host and were not able to reproduce the problem. After resume (from hibernation to RAM) the guest was still able to ping the host.

comment:4 Changed 5 years ago by mrbarletta

I can confirm this in a kubuntu 9.04, virtualbox 2.2.2

To reproduce just suspend/resume in RAM the host machine and then try to renew the IP(guest) or change the network card in use in the guest os (XP SP3).

comment:5 Changed 5 years ago by drossier

I also confirm with Ubuntu 9.04.

I've also figure out a *annoying* workaround: after resuming the host, you can save the guest, restart vboxdrv (/etc/init.d/vboxdrv restart), and restart the guest; the network is restored.

comment:6 Changed 5 years ago by frank

By doing this you restart the kernel module. So probably some internal state of the kernel module is screwed up.

comment:7 Changed 5 years ago by drossier

hmm, it has not been fixed in the 3.0.0, although the priority is set to "major". Is this really complicated to be solved? Now, I can even not restart vboxdrv. Maybe something goes wrong with my config. Thx for any feedback.

comment:8 Changed 5 years ago by drossier

Just a precision regarding this bug. It actually appears when there are new network settings (subnetwork change, with a new IP address). Otherwise, suspend following by a resume works well (with the same IP address). (Now, restarting vboxdrv reworks for me)

comment:9 Changed 5 years ago by frank

  • Version changed from VirtualBox 2.1.4 to VirtualBox 3.0.4

drossier, thanks for this information. Please could you attach a VBox.log file of such a VM session when the host was suspended + resumed? Thank you!

comment:10 Changed 5 years ago by frank

And can the other reporters confirm that this only happens when the host network settings were changed during the suspended state?

comment:11 Changed 5 years ago by mrbarletta

I can confirm this only happens when I move from one network to another (home/office). thanks frank

Changed 5 years ago by drossier

Failure when resuming a VM with a different subnetwork

comment:12 Changed 5 years ago by drossier

Done Frank. I've attached the VBox.log right after resuming in a different subnet. Daniel

comment:13 follow-up: ↓ 14 Changed 5 years ago by LosD

For me, it only happens when changing networks (or when the network has been down), and when using NAT.

  • The host connectivity is fine, it's the outside world that is inaccessible.
  • No need to restart vboxdrv, just saving and loading the guest is enough.

comment:14 in reply to: ↑ 13 Changed 5 years ago by Hachiman

Replying to LosD:

For me, it only happens when changing networks (or when the network has been down), and when using NAT.

regarding NAT does it looks like #4343 for you?

comment:15 in reply to: ↑ description Changed 5 years ago by faflu

I have similar problem with Win XP Pro SP3 as a host and xubuntu 8.10 (kernel 2.6.27-14-generic). After resuming host from sleep - the network doesn't work on the guest system. Saving guest state and starting back - fixes the problem. I use VBox 3.06.

comment:16 Changed 4 years ago by drossier

Any chance to see a fix in the next weeks?? It's so annoying to make some save/restore when changing on different subnets...

comment:17 Changed 4 years ago by ifreecarve

Same problem for me. My host-only adapter (vboxnet0) stops working when I suspend and resume.

I'm running:

  • Ubuntu (Kubuntu) 9.04,
  • Virtualbox 3.1.6 r59338
  • Linux 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 18:57:07 UTC 2009 i686 GNU/Linux

My network settings are managed by nm-applet. I would have imagined that all the host-only adapter stuff is bound to the loopback interface. Could the problem be that nm-applet is messing with the loopback interface (or that vboxnet0 isn't)?

comment:18 Changed 4 years ago by drossier

I'm a bit surprised of the very long delay in response time to this bug (more than 1 Year though considered as priority "major")...

Some further information in the meantime: I found a better workaround instead of saving/resuming the VM. Simply, detach the network adapter, and re-attach to NAT (using the Network Adaptaters option in Virtualbox). The guest will request a new IP address and refresh the NAT data.

Hope it helps.

comment:19 Changed 4 years ago by esword

I have a slightly different case that I hope will help narrow this down. I have a Windows XP guest running on a Fedora 12 host using VB 3.1.8. The guest has two interfaces - NAT and host-only. If I pause the guest, put the host to sleep, wake up the host, and resume the guest, the NAT interface on the guest works fine, but the host-only one will not initialize properly. It gets a 169.54.x.x address. This is without changing networks or any other settings on the host.

The same guest VM/disk worked fine when doing the same sequence of steps on a Windows XP host.

comment:20 Changed 4 years ago by cefn

I can confirm I'm still experiencing this on version 3.2.6 r63112 with a Karmic host and a Centos guest.

I discovered independently that switching the networking device type from Host-only to NAT, then back to Host-only, followed by invoking... /etc/init.d/network restart ...restores connectivity without a full restart of the guest OS, but it's still pretty annoying.

comment:21 Changed 4 years ago by aleksey

Cannot reproduce on my Karmic laptop. Could you attach the output of 'ifconfig -a' and 'route -n' from both guest and host after resuming? If the output looks identical before suspending and after resuming, could you please provide the packet capture logs from both host and guest after resuming?

comment:22 Changed 3 years ago by frank

Is this ticket still relevant? If so, please post the information aleksey was asking for, otherwise I will close the ticket.

comment:23 Changed 3 years ago by esword

The case I listed on 2010-06-02 appears to be fixed under 3.1.10. I'd swear I just saw it relatively recently (in the past month), but I just tried the steps now (launch Windows XP VM from Fedora 12 host, pause VM, put host to sleep, wake host up, resume VM) and both NICs in the VM (nat and host only) work fine. Many thanks if this was something you fixed.

comment:24 Changed 3 years ago by dbrand666

I'm still seeing this problem on 3.2.12. It's not happening consistently, then again, it was never consistent for me.

Ubuntu Lucid 64 host, both Lucid 32 and Windows XP guests. The way I've been working around it for XP is to disable and re-enable the connection via control panel. For Linux, I use "rmmod e1000" followed by "modprobe e1000".

comment:25 Changed 3 years ago by lhankins

This is still a problem for me, and easily reproducible. I've been living with it for over a year (have to restart my xp based VM each time I suspend / resume my unbuntu host laptop).

Here's the background

  • Host OS : Dell Precision Laptop M6300, running Ubuntu 10.04 (64 bit)
  • VM : 32-bit Windows XP ("xp-dev"), with two virtual network adapters
    • Adapter1 : PCnet-FAST III (NAT)
    • Adapter2 : Intel PRO/1000 MT Desktop (Host-only adapter, 'vboxnet0')

How to reproduce :

  1. start the "xp-dev" VM
  2. start a couple of server based apps on it (I run dev instances of SQLServer, Oracle, etc. on this VM)
  3. suspend the laptop
  4. resume the laptop

After 3-30 minutes, Adapter2 (the "host only network") on the "xp-dev" VM will cease working (things work fine up until that point). It shows up in windows as a connection with "Limited or no connectivity." It acts like its no longer able to get a DHCP address from the Host only network.

ipconfig /all output :

Ethernet adapter Local Area Connection 2:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Desktop Adapter
        Physical Address. . . . . . . . . : 08-00-27-3F-70-09
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        Autoconfiguration IP Address. . . : 169.254.249.128
        Subnet Mask . . . . . . . . . . . : 255.255.0.0
        Default Gateway . . . . . . . . . :

Things I've tried to rectify the situation :

  1. I've tried "pausing" the VM before suspending the laptop, and resuming it afterwards. This doesn't fix it.
  2. I've tried switching to a different virtual network adapter

NOTE: There are also several other people who work with me who have had the exact same issue. During this time we've seen the issue on the following 3 laptop models

  • Dell Precision M6300
  • Dell Latitude E6500
  • Dell Latitude D830

And the following Host OS's

  • Ubuntu 9.04 32-bit
  • Ubuntu 9.04 64-bit
  • Ubuntu 9.10 32-bit
  • Ubuntu 9.10 64-bit
  • Ubuntu 10.04 64-bit

Here's a brief excerpt from the Virtual Box logs during that timeframe (full log attached) :

00:57:33.143 Changing the VM state from 'RUNNING' to 'SUSPENDING'.
00:57:33.144 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'.
00:58:47.406 Changing the VM state from 'SUSPENDED' to 'RESUMING'.
00:58:47.412 Changing the VM state from 'RESUMING' to 'RUNNING'.
00:58:56.261 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:58:57.244 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:58:57.294 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:01.808 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:01.857 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:03.517 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:09.395 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:10.435 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:10.453 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:11.438 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:11.448 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:25.343 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:25.413 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:26.445 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:26.536 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:27.565 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:27.634 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:28.679 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:28.749 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:29.781 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:29.872 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:33.114 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:33.164 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:34.232 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:34.301 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
00:59:35.350 PIT: mode=2 count=0x2ead (11949) - 99.85 Hz (ch=0)
00:59:35.422 PIT: mode=2 count=0x4ad (1197) - 996.81 Hz (ch=0)
01:29:48.318 PCNet#0: Init: ss32=1 GCRDRA=0x0966d420[64] GCTDRA=0x0966d020[64]
01:29:48.321 PCNet#0: Init: ss32=1 GCRDRA=0x0966d420[64] GCTDRA=0x0966d020[64]
01:30:49.470 PCNet#0: Init: ss32=1 GCRDRA=0x0966d420[64] GCTDRA=0x0966d020[64]
01:30:49.472 PCNet#0: Init: ss32=1 GCRDRA=0x0966d420[64] GCTDRA=0x0966d020[64]

Changed 3 years ago by lhankins

attaching full virtualbox log referenced in comment : 2011-02-28 18:36:11 by lhankins

comment:26 Changed 3 years ago by lhankins

A couple of other pieces of information which might prove helpful in diagnosing the root cause of this bug :

  1. When this happens, its only the "host only network" connection which looses connectivity ("Adapter2" from my original description above)
  2. Restarting the XP VM via Start | Shutdown | Restart (in XP) does NOT fix the problem. To fix the problem you have to totally shutdown the XP VM (Start | Shutdown | Shutdown), and then restart it from the Virtual Box UI.

Is anyone looking at this issue? Its been open for 2 years (with a priority of MAJOR), and seems to be a reasonably serious issue IMO.

comment:27 Changed 3 years ago by ifreecarve

I continue to have this problem with VirtualBox 4.0.2 r69518. It doesn't happen every time I sleep/resume, but usually by the 2nd time and ALWAYS by the 3rd time.

My setup is also a 2-network-adapter guest, with a NAT and a host-only network. I've noticed that when the host loses connectivity to the guest, the guest can still ping the host sometimes.

I've also noticed a condition where things worked fine after resuming the first time, but changing my wireless settings to a different network caused the problem. I was unable to reproduce this by simply starting the VM and changing my wireless network a bunch of times (without sleeping in between).

comment:28 Changed 3 years ago by aleksey

lhankins,

Did you install Intel drivers for PRO/1000 MT Desktop into XP guest? Which version are those?

comment:29 Changed 3 years ago by lhankins

@aleksey - I didn't do anything special to install the drivers for the PRO/1000 NIC on the XP guest, but XP did auto-recognize this NIC. The driver used on the guest is :

Driver Provider: Intel
Driver Date: 8/20/2008
Driver Version : 8.10.3.0

I'd be surprised if its a guest OS driver issue though, here's why :

  1. The issue is not specific to the type of virtual NIC. I originally used the PCnet-FAST III virtual NIC. When I could never get around this issue, I tried switching to the PRO/1000 (the problem persisted).
  2. The issue doesn't go away if you simply restart the XP Guest from within the Guest (via Start | Shutdown | Restart). You have to do a full shutdown from within the guest (via Start | Shutdown | Shutdown), wait for it to shutdown, then restart the VM from the Host OS Virtual Box UI to get the host only network to come back.

comment:30 Changed 3 years ago by aleksey

VBoxNetDHCP process dies when the host gets suspended. The fix will be included into the next maintenance release. As a workaround you can restart VBoxNetDHCP manually after resuming the host. This will prevent the guest from loosing connectivity. To obtain the exact command line for restarting the process(es) use the following command before suspending the host:

ps -eo args | grep [V]BoxNetDHCP

comment:31 Changed 3 years ago by aleksey

  • Summary changed from guest lose network connectivity after host resumes from sleep to guest lose network connectivity after host resumes from sleep => Fixed in SVN

comment:32 Changed 3 years ago by ifreecarve

I experience a problem related to both sleeping and changing network settings. Here is my method to reproduce it:

  1. Connect host computer (ubuntu linux) to wired network.
  2. Start virtual ubuntu linux guest. Has a NAT adapter and host-only adapter (host is 192.168.56.1, guest is 192.168.56.3)
  3. Suspend host
  4. Disconnect wired network
  5. Resume host
  6. Connect to wireless network (on different subnet than wired)
  7. Ping host from guest, guest from host. Note that both work.
  8. Turn off wireless AP

The host can now ping itself, but not the guest. The guest can ping both itself and the host (but why?). Neither host nor guest can ping 192.168.0.2.

killall -9 VBoxNetDHCP cannot kill the process, which is listed as defunct. I still need to shutdown and restart the guest OS.

Is the fix for this covered by the fix you mentioned in SVN, or should I file a separate bug for this?

comment:33 Changed 3 years ago by frank

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

comment:34 Changed 2 years ago by ckng

  • Status changed from closed to reopened
  • Resolution fixed deleted

Sorry for reopening this. I'm on VirtualBox 4.1.8, yet still experiencing the same problem.

Host: Windows 7 Guest: Ubuntu 10.0.4

After resume from suspend/sleep host, the guest network is no longer functioning. Since the host is Windows, there is no VBoxNetDHCP to restart AFAICT.

comment:35 Changed 2 years ago by ckng

Sorry my mistake, turn out to be faulty router.

comment:36 Changed 2 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use