Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED]Virtualbox No Longer Assigns IPs to HostOnly Network

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

[SOLVED]Virtualbox No Longer Assigns IPs to HostOnly Network

  • Quote

Post by jagdpanther » Thu Oct 21, 2021 10:26 pm

Virtualbox-6.1.26 was working without issue. Portage upgraded to virtualbox-6.1.28. Now when I launch a VM that uses host-only networking, the host's VirtualBox network device (ex: vboxnet0) no longer is assigned its IP address. The address is still listed in VirtualBox's "Host Network Manager" but it is not assigned. As root I can run "ip add" to solve the issue and then the VM can "talk" to the host.

Any idea why the VirtualBox host-only network devices on the host no longer are assigned an IP?

(Yes I did upgrade to virtualbox-modules-6.1.28 )
Last edited by jagdpanther on Tue Oct 26, 2021 6:28 pm, edited 1 time in total.
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Sat Oct 23, 2021 3:44 am

Go back to stable virtualbox (6.1.24).
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
Hu
Administrator
Administrator
Posts: 24389
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Oct 23, 2021 4:10 pm

While that might be a short term solution, OP will eventually need to upgrade, if for no other reason than VirtualBox's dependency on kernel module ABIs, which will force a VirtualBox upgrade if OP wishes to continue updating the host kernel. If, as seems likely, this is a bug in VirtualBox, then the bug needs to be isolated and a fix implemented. I see many open bug reports for VirtualBox, but none that, based on their subject lines, report OP's problem.
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Sat Oct 23, 2021 4:58 pm

Thanks for the replies.

I reverted from virtualbox-6.1.28 to virtualbox-6.1.26 and Virtualbox is working as expected.

I should have posted that I am running Linux kernel 5.14.14 from gentoo-sources-5.14.14.

I have also posted a similar message to the virtualbox forums:
https://forums.virtualbox.org/viewtopic ... 7&t=104198
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Sun Oct 24, 2021 12:37 am

With VirtualBox I use the access by bridge in the network configuration. Than I use tap0 from the host network interfaces as the VirtualBox network interface. On the host tap0 is in the br0 bridge who have a 255.255.255.0 ip address. Like this I can configure the VirtualBox guest network interface eth0 to be in the same network than br0 on the host with the br0 ip address as the default route on the guest. All is fine for Internet and the local network services.

I don't need VirtualBox to act as a dhcp and dns servers but if I do so it work too when I configure the VirtualBox machine network interface to use NAT.
Paul
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Mon Oct 25, 2021 5:28 pm

As was pointed out on the VirtualBox forum there are now restrictions by default on host-only network IP ranges for several platforms including Linux.

I should have read the change log more carefully:
Network: More administrative control over network ranges, see user manual

From Virtualbox-6.1.28 user manual on page 116:
On Linux, Mac OS X and Solaris Oracle VM VirtualBox will only allow IP addresses
in 192.68.56.0/21 range to be assigned to host-only adapters. For IPv6 only link-local
addresses are allowed. If other ranges are desired, they can be enabled by creating
/etc/vbox/networks.conf and specifying allowed ranges there. For example, to allow
10.0.0.0/8 and 192.168.0.0/16 IPv4 ranges as well as 2001::/64 range put the following lines
into /etc/vbox/networks.conf:
* 10.0.0.0/8 192.168.0.0/16
* 2001::/64
After I try this, I'll report back.
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Mon Oct 25, 2021 7:00 pm

Creating the /etc/vbox/networks.conf file did NOT solve this issue for me. My /etc/vbox networks.conf contains the following (excluding some commented lines at the top):

Code: Select all

* 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12

# * 0.0.0.0/0 ::/0
I have tried the following on my Linux host (running kernel 5.14.14):
1. Re-installing virtualbox.
2. removing the three virtualbox kernel modules and putting them back with "modprobe -r <module>" and "modprobe <module" for
vboxdrv, vboxnetadp, and vboxnetflt
3. In the Virtualbox "Host Network Manager" removing all the vboxnet* devices and putting them back. However, I am no longer allowed to change the default IP suppllied by the "Host Network Manager" I receive a little error window when I do stating: "Failed to save host network interface parameter" Details: Callee RC: NS_ERROR_FAILURE (0x80004005)"
4. Trying different entries in /etc/vbox/networks.conf. (Including "* 0.0.0.0/0" which according to the docs should allow any IPV4 address.)

In all cases when Virtualbox is launched, if they don't already exist, I see the network devices added, without assigned IPs and in the down state. (Ex vboxnet0). When I launch a VM, the host-only network device (ex: vboxnet0) stays "down" and no IP is assigned. (I can add an IP by hand (as root, "ip addr add ...") and bring the device UP to get networking working.

I also see entries in /var/log/messages like the following. (In this case I assigned the IP by hand in a previous attempt.)

Code: Select all

Oct 25 11:53:39 fangorn kernel: vboxdrv: 00000000cf9ae7cc VMMR0.r0
Oct 25 11:53:39 fangorn kernel: VBoxNetAdpCtl[59927]: segfault at 0 ip 000056407deadc44 sp 00007ffe88286310 error 4 in VBoxNetAdpCtl[56407deac000+4000]
Oct 25 11:53:39 fangorn kernel: Code: ff 48 8b bd 98 fb ff ff be 00 04 00 00 e8 f4 e5 ff ff 48 85 c0 0f 84 db 01 00 00 48 8b bd 98 fb ff ff 48 89 de e8 dc e4 ff ff <80> 38 2a 0f 85 e3 00 00 00 80 78 01 00 0f 85 d9 00 00 00 66 0f 1f
Oct 25 11:53:39 fangorn kernel: vboxdrv: 0000000018273ff1 VBoxDDR0.r0
Oct 25 11:53:39 fangorn kernel: VBoxNetFlt: attached to 'vboxnet0' / 0a:00:27:00:00:00
Oct 25 11:53:39 fangorn kernel: vboxdrv: 00000000220e232f VBoxEhciR0.r0
Oct 25 11:53:39 fangorn kernel: VMMR0InitVM: eflags=246 fKernelFeatures=0x0 (SUPKERNELFEATURES_SMAP=0)
Oct 25 11:53:39 fangorn kernel: device vboxnet0 entered promiscuous mode
Oct 25 11:53:41 fangorn ntpd[2729]: Listen normally on 16 vboxnet0 192.168.15.1:123
Oct 25 11:53:41 fangorn ntpd[2729]: Listen normally on 17 vboxnet0 [fe80::800:27ff:fe00:0%14]:123
Any suggestions?
Top
CerealP0rt
n00b
n00b
Posts: 1
Joined: Tue Oct 26, 2021 9:48 am

  • Quote

Post by CerealP0rt » Tue Oct 26, 2021 9:55 am

I had to delete all affected hostonly networks and recreate them to have /etc/vbox/networks.conf take effect.
This can be done with the "File > Host Network Manager" or on cli "vboxmanage hostonlyif remove <networkname>"
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Tue Oct 26, 2021 6:28 pm

Solved.

There were three issues with HostOnly networks when migrating to Virtualbox-6.1.28.

1. I needed to create a /etc/vbox/networks.conf file as described in the Virtualbox-6.1.28 user manual on page 116.

2. I needed to remove all blank lines from /etc/vbox/networks.conf file. As VirutalBox forum user aleksey-vb points out:
There is a bug in VBoxNetAdpCtl that stumbles on empty lines. It will be fixed in the next maintenance release. A workaround solution is to remove all empty lines in /etc/vbox/networks.conf.
3. I removed and added back all of the VirtualBox HostOnly networks using the VirtualBox "Host Network Manager". (Thanks CerealP0rt)

Now Virtualbox-6.1.28 is working as expected.
Top
alfattal
n00b
n00b
Posts: 1
Joined: Fri Jan 28, 2022 9:35 pm

  • Quote

Post by alfattal » Fri Jan 28, 2022 9:45 pm

jagdpanther wrote:Solved.

There were three issues with HostOnly networks when migrating to Virtualbox-6.1.28.

1. I needed to create a /etc/vbox/networks.conf file as described in the Virtualbox-6.1.28 user manual on page 116.

2. I needed to remove all blank lines from /etc/vbox/networks.conf file. As VirutalBox forum user aleksey-vb points out:
There is a bug in VBoxNetAdpCtl that stumbles on empty lines. It will be fixed in the next maintenance release. A workaround solution is to remove all empty lines in /etc/vbox/networks.conf.
3. I removed and added back all of the VirtualBox HostOnly networks using the VirtualBox "Host Network Manager". (Thanks CerealP0rt)

Now Virtualbox-6.1.28 is working as expected.
@jagdpanther I'm having the same issue on macOS Monterey with the latest Virtualbox 6.1.32. tried to find the /etc/vbox/networks.conf but couldn't find it. You mentioned that you created this file and that solved the issue for you, where did you create it? There seems to be NO /vbox/ directory anywhere on my machine, should I create that directory as well?
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Fri Jan 28, 2022 11:30 pm

alfattal:

Yes, create the directory /etc/vbox and then create the file networks.conf inside /etc/vbox.

See VirtualBox User's guide (V. 6.1.32) page 116 for details and a small example of networks.conf.
Top
Post Reply

11 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic