Nat Network stops working after a couple days

Discussions related to using VirtualBox on Linux hosts.

Re: Nat Network stops working after a couple days

Postby Michael37 » 4. Jul 2018, 16:41

@socratis

Tracing did not seem to show me anything useful. I believe this issue to either be with the VBox Virtual Networking or with the host (Windows 10)

Is there a way to cycle the Virtual Network?
Michael37
 
Posts: 11
Joined: 2. Jan 2017, 18:28
Primary OS: MS Windows 10
VBox Version: OSE other
Guest OSses: MS 7, 8.x, 10, Server 2k8, 2k12, *nix

Re: Nat Network stops working after a couple days

Postby dmaster97 » 17. Aug 2018, 10:30

I have the same issue. My host is a laptop with win10 pro, the guest is debian strecth. Except the issue is reappearing in random time. sometimes 5 minute, sometimes 1 hour.

I can restart the nat network using command
"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" natnetwork start --netname natnetname

Using bridge network is normal for days.

I need nat network for specific issue. A vm proxy. So the other guest is connected to the vm proxy for caching purpose. Using bridge will troube me if i moved from place to place using wifi.

No log is generated when the nat network is failed. So the only way i can make sure the nat network is working is by using unlimited ping to guest.

I'm almost positive this is a virtualbox network issue. But since no log is generated, i wonder ......
dmaster97
 
Posts: 3
Joined: 17. Aug 2018, 10:20

Re: Nat Network stops working after a couple days

Postby socratis » 17. Aug 2018, 11:22

dmaster97 wrote:But since no log is generated
Did you enable logging? Are you 100% sure? Please try again, but this time post the exact command that you used to enable logging/tracing...
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.
socratis
Site Moderator
 
Posts: 27690
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Nat Network stops working after a couple days

Postby dmaster97 » 19. Aug 2018, 05:07

this is the log generated by virtualbox.
natnet1.log
nat network log
(1.4 KiB) Downloaded 61 times

VBoxSVC.log
virtual box service
(5.03 KiB) Downloaded 42 times

which command / menu that can generate verbose / debug level log?
the windows event viewer did trap error on the virtualbox nat
Code: Select all   Expand viewCollapse view
Log Name:      System
Source:        VBoxNetLwf
Date:          19/08/2018 08.51.44
Event ID:      12
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      DM97-LEGION
Description:
The driver detected an internal driver error on \Device\VBoxNetLwf.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="VBoxNetLwf" />
    <EventID Qualifiers="49156">12</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2018-08-19T01:51:44.174712100Z" />
    <EventRecordID>83202</EventRecordID>
    <Channel>System</Channel>
    <Computer>DM97-LEGION</Computer>
    <Security />
  </System>
  <EventData>
    <Data>\Device\VBoxNetLwf</Data>
    <Binary>0000180001000000000000000C0004C00800000000000000000000000000000000000000000000000228F869891CC85B76D8DF590028F869891C0028F869891D</Binary>
  </EventData>
</Event>
dmaster97
 
Posts: 3
Joined: 17. Aug 2018, 10:20

Re: Nat Network stops working after a couple days

Postby socratis » 19. Aug 2018, 16:28

00:00:00.398400 Executable: C:\Program Files\Oracle\VirtualBox\VBoxNetNAT.exe

What in the seven kingdoms are you doing? Are you running directly VBoxNetNAT? :shock: ? I asked for a log of the VM:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe error / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
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.
socratis
Site Moderator
 
Posts: 27690
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Nat Network stops working after a couple days

Postby dmaster97 » 28. Aug 2018, 04:22

What?
Do you think I'm high?

I've told you. No log generated from the event of vbox nat not working.
The error is happening at random. No log generated inside the vm also.
the log i previously attached is from "%userprofile%/.VirtualBox".
How long have you been using virtualbox to not know that?
This is a network issue, it is only normal i look for network error anywhere in the host that generated in the exact time.
This morning i've experienced another network shutdown for 3-4 times. In 5-30 minutes range.
I managed to trace it to the host's windows system log error. Again.

Here is vbox log as requested.
I might be wrong, but, i don't catch any error from that log when the network has trouble.
Attachments
VBox.zip
(29.48 KiB) Downloaded 22 times
Last edited by socratis on 28. Aug 2018, 08:01, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
dmaster97
 
Posts: 3
Joined: 17. Aug 2018, 10:20

Re: Nat Network stops working after a couple days

Postby socratis » 28. Aug 2018, 09:06

00:00:02.512008 NumCPUs <integer> = 0x0000000000000004 (4)
00:00:03.039281 CPUM: Physical host cores: 4
You have assigned all your CPUs to the VM. The host is going to run low on resources, since VirtualBox cares about physical processors (cores), not logical ones (threads). See "CPU Cores versus threads" and "Why is it a bad idea to allocate as many VCPUs as there are physical CPUs?".

00:00:02.472631 File system of 'D:\vbox\deb-x86\deb-x86.vhd' is ntfs
Why not the default VDI format, but the fragile VHD one? Was this VM created from scratch? Did you move the VM after it was created, or did you change the VirtualBox preferences?

00:00:02.512219 VRamSize <integer> = 0x0000000001000000 (16 777 216, 16 MB)
I would increase that to 32, 64 or even 128 MB.

00:00:02.512200 [/Devices/usb-ohci/] (level 2)
Since you already have the ExtPack installed, you might as well enable USB3 instead of USB1.

00:40:04.625611 Changing the VM state from 'RUNNING' to 'SUSPENDING'
I counted 11 suspensions. At the same time I see things like (this is just a sample below, non-sequential):
00:42:45.629457 Audio: Host audio device configuration has changed
06:25:31.001497 GUI: UIMachineLogic: Host-screen count changed
10:47:44.133571 GUI: UIMachineLogic: Host-screen geometry changed
11:22:02.173081 GUI: UIMachineLogic: Host-screen available-area changed
Given the fact that you're on a laptop:
00:00:02.273059 DMI Product Version: Lenovo Y520-15IKBN
are you changing locations and/or conditions? Do these changes involve the network? For example moving from the home-network to the office-network and/or some place else?

dmaster97 wrote:The error is happening at random. No log generated inside the vm also.
Losing the network is not necessarily an error condition that's going to be flagged. Not unless the network specific logging has been enabled, as per the instructions I gave a couple of post back.

dmaster97 wrote:How long have you been using virtualbox to not know that?
I just started, but I think I have the basics nailed down...

dmaster97 wrote:I managed to trace it to the host's windows system log error. Again.
If you're talking about the "VBoxNetLwf" entry in the Event Viewer, a quick search for "VBoxNetLwf event 12" will point you to the main thread being discussed: ID Event 12 for VBoxNetLwf. This is an entry that tells you that the driver does not behave correctly when the system goes to sleep, i.e. it doesn't sleep. That's all.
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.
socratis
Site Moderator
 
Posts: 27690
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Nat Network stops working after a couple days

Postby vm_guy » 11. Mar 2019, 14:12

did anyone ever figure this out?

this is still happening, even on vb 6.0 :(
vm_guy
 
Posts: 47
Joined: 16. Apr 2017, 18:42

Re: Nat Network stops working after a couple days

Postby lpc10 » 20. Jun 2019, 15:52

Hello,

I have a similar issue, using Virtualbox 6.0.8. My host is Windows 7, guests are Ubuntu LTS 18.04.

The nat network is used to make all nodes communicate between them and outside. All nodes have an additional host-to-host interface.
After some time the guests stop being able to access internet (cannot even ping the default gw), but still can communicate between them using the nat network interface.

The host-interface works without issues.

Has someone managed to workaround this?

Regards
lpc10
 
Posts: 4
Joined: 20. Jun 2019, 15:43

Re: Nat Network stops working after a couple days

Postby socratis » 20. Jun 2019, 17:01

What could help is to enable tracing:

    VBoxManage modifyvm <uuid|vm> --nictrace<1-N> on --nictracefile<1-N> <filename>
For more information, see the user manual. You should have a searchable PDF in the "%VirtualBox_Install%/doc" directory. Also, consider installing Wireshark in the guest and see what it has to say...

lpc10 wrote:All nodes have an additional host-to-host interface.
What's a "host-to-host" interface?
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.
socratis
Site Moderator
 
Posts: 27690
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Nat Network stops working after a couple days

Postby lpc10 » 20. Jun 2019, 17:05

socratis wrote:What's a "host-to-host" interface?

I meant host-only adapter
lpc10
 
Posts: 4
Joined: 20. Jun 2019, 15:43

Re: Nat Network stops working after a couple days

Postby lpc10 » 20. Jun 2019, 17:20

socratis wrote:What could help is to enable tracing:

    VBoxManage modifyvm <uuid|vm> --nictrace<1-N> on --nictracefile<1-N> <filename>
For more information, see the user manual. You should have a searchable PDF in the "%VirtualBox_Install%/doc" directory. Also, consider installing Wireshark in the guest and see what it has to say...

I will try that later when I have to stop my env again.

I will also try rebooting just one VM to see if the issue is resolved on that particular VM. So far I have stopped all VMs then started again.
lpc10
 
Posts: 4
Joined: 20. Jun 2019, 15:43

Re: Nat Network stops working after a couple days

Postby lpc10 » 21. Jun 2019, 13:55

I have enabled the trace but I can't find the trace file.
There is nothing particular on VM logs but that's not surprising as the issue does not seem to come from the VMs but the nat network service itself.

The best workaround I come so far is to run:

VBoxManage.exe natnetwork stop --netname NatNetwork
VBoxManage.exe natnetwork start --netname NatNetwork

That makes the NAT network to work again without restarting any VM.
lpc10
 
Posts: 4
Joined: 20. Jun 2019, 15:43

Re: Nat Network stops working after a couple days

Postby dan908e2 » 4. Mar 2020, 10:59

Has anyone found a permanent solution to this problem?
It's still happening on Version 6.1.4 r136177 (Qt5.6.2)
dan908e2
 
Posts: 1
Joined: 4. Mar 2020, 10:56

Previous

Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 13 guests