Sporadic network losses using the Host-only Adapter

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
Sven_
Posts: 11
Joined: 26. Apr 2013, 16:18

Sporadic network losses using the Host-only Adapter

Post by Sven_ »

Edit: I thought it was solved with virtio-net at first, it just became less frequent however. I added an updated log in this post.

Hi,

I have an Ubuntu 18.04 server installed as guest on my mac host. I can use the Host-only Adapter as my adapter and for some time this works, but after 10 to 20 minutes, suddenly my connection to the guest is lost. I simultaneously can ping the host from the guest, and cannot ping the guest from the host:

Code: Select all

PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data.
64 bytes from 192.168.56.1: icmp_seq=1 ttl=255 time=0.195 ms
64 bytes from 192.168.56.1: icmp_seq=2 ttl=255 time=0.445 ms
64 bytes from 192.168.56.1: icmp_seq=3 ttl=255 time=0.243 ms

Code: Select all

PING 192.168.56.101 (192.168.56.101): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
I found a ten year old thread with people having the same problem, but no solution posted and guessed I'd better start a new one, because the other one is too old. The difference for me is, that after waiting one or two minutes, I can connect again, but of course all my ssh-sessions break, and it's really annoying to work with.

I don't know if this is caused by some energy-saving stuff of the Ubuntu guest, but it's a server without any desktop environment and I didn't configure anything like this. It happens while being connected via ssh and/or http, with the latter definitely even when I'm actively using the connection. Also those pings really run simultaneosly, and I never have this problem when using NAT, or a network bridge. Any hints on how to debug this are appreciated. I'll provide a log-file, in which, as I noticed later, I had a duplicate of my Host-only Adapter running. I already deactivated the second one, but ran into the same problem, so that is not the cause.
Attachments
Ubuntu 18.04-2019-09-24-11-44-30.log.zip
(34.24 KiB) Downloaded 16 times
Last edited by Sven_ on 2. Dec 2019, 15:15, edited 5 times in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Sporadic network losses using the Host-only Adapter

Post by mpack »

Am I seeing two network cards enabled in the log? Are they both connected? Can you disable the second one?

I'm wondering if something isn't happening along the lines of: you are using IntNet#0 when you get some kind of glitch, perhaps related to power saving. In the meantime your overly smart guest OS switches to the other network card and takes a certain time to switch back.

Another thing I'd consider doing is switching to the VirtIO network "card". Remove NIC simulation overhead from the equation. Ubuntu probably already has the guest drivers for it, if not you'd need to install them. I believe they're from the KVM project.
Sven_
Posts: 11
Joined: 26. Apr 2013, 16:18

Re: Sporadic network losses using the Host-only Adapter

Post by Sven_ »

Thanks mpack! You're right, I had two adapters active in the log, but as I wrote in the post, I already switched one off, before, so I'm pretty sure this was not the problem.
mpack wrote:Another thing I'd consider doing is switching to the VirtIO network "card". Remove NIC simulation overhead from the equation. Ubuntu probably already has the guest drivers for it, if not you'd need to install them. I believe they're from the KVM project.
This however seemingly solved it. I switched to virtio-net (in the extended options, if someone else has this problem), and now I worked for 1.5 h without this occuring, so I think it's gone.

Thanks! :)

(Edit: I don't find an option to mark this as solved, do you have one? - I could edit the subject, at least...^^)
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Solved] Sporadic network losses using the Host-only Adapter

Post by socratis »

Sven_ wrote:(Edit: I don't find an option to mark this as solved, do you have one? - I could edit the subject, at least...^^)
Yep, that's the option, you found it, thank you for marking the thread as [Solved]... ;)
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.
Sven_
Posts: 11
Joined: 26. Apr 2013, 16:18

Re: Sporadic network losses using the Host-only Adapter

Post by Sven_ »

Unfortunately it still happens. I think it's less frequent, but especially with some time inbetween, that's hard to judge. It definitely occurs even when I'm actively using the virtual machine, both via ssh and via http. The Ubuntu installed is a standard 18.04 server without desktop environment, besides apache2 and some perl libraries there is not much installed or configured. I'll attach a recent log, containing my updated settings to this post. I'd be happy about any further tips on what I could try to debug this.
Attachments
Ubuntu 18.04-2019-12-02-13-49-56.log.zip
(32.89 KiB) Downloaded 10 times
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Sporadic network losses using the Host-only Adapter

Post by fth0 »

VBox.log file wrote:00:00:00.036013 VirtualBox VM 6.0.14 r133895 darwin.amd64 (Oct 15 2019 13:11:11) release log
00:00:18.101740 VMMDev: Guest Additions information report: Version 5.2.8 r120774 '5.2.8_KernelUbuntu'
00:00:26.086023 VMMDev: Guest Log: VBoxService 5.2.22 r126460 (verbosity: 0) linux.amd64 (Nov 8 2018 20:49:41) release log
Although I think it will not solve your problem, you should uninstall both GA versions (the Ubuntu 5.2.8 and the VirtualBox 5.2.22 versions) and install the GA that are part of the VirtualBox host installation (see Installing and Maintaining Guest Additions).

Regarding your network problem, I don't see any indications of it in the VBox.log file. I'd run both pings permanently and use Wireshark to capture the network traffic inside the host OS at the Host-Only network interface, inside the guest OS at the used network interface, and maybe even capture inside the internal VirtualBox network interface (https://www.virtualbox.org/wiki/Network_tips). Please note the time(s) when the problem occurs.
Post Reply