hostonlyif ipconfig problem

Discussions related to using VirtualBox on Linux hosts.

hostonlyif ipconfig problem

Postby mgogala » 17. Aug 2022, 20:57

I am testing Docker on Fedora and it works fine. However, when I try docker machine, I am getting the following error:

Code: Select all   Expand viewCollapse view
docker-machine create default
Running pre-create checks...
Creating machine...
(default) Copying /home/mgogala/.docker/machine/cache/boot2docker.iso to /home/mgogala/.docker/machine/machines/default/boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Found a new host-only adapter: "vboxnet4"
Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: /usr/bin/VBoxManage hostonlyif ipconfig vboxnet4 --ip 192.168.99.1 --netmask 255.255.255.0 failed:
VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp



The code in the error fails even when I execute it as root:

Code: Select all   Expand viewCollapse view
[root@medo Downloads]# /usr/bin/VBoxManage hostonlyif ipconfig vboxnet4 --ip 192.168.99.1 --netmask 255.255.255.0
VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp


This looks like a VirtualBox bug
Regards
mgogala
 
Posts: 12
Joined: 20. Nov 2011, 23:44
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: OL 6.1, Centos 6, Ubuntu 11.10

Re: hostonlyif ipconfig problem

Postby mgogala » 17. Aug 2022, 21:00

BTW, this is the latest Fedora 36 and the latest VirtualBox:

[root@medo Downloads]# uname -a
Linux medo.home.com 5.18.17-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 11 14:36:06 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@medo Downloads]# rpm -qa|grep -i virtualbox
VirtualBox-6.1-6.1.36_152435_fedora36-1.x86_64
mgogala
 
Posts: 12
Joined: 20. Nov 2011, 23:44
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: OL 6.1, Centos 6, Ubuntu 11.10

Re: hostonlyif ipconfig problem

Postby scottgus1 » 17. Aug 2022, 21:44

mgogala wrote:Error setting up host only network on machine start: /usr/bin/VBoxManage hostonlyif ipconfig vboxnet4 --ip 192.168.99.1 --netmask 255.255.255.0 failed:

https://www.virtualbox.org/manual/ch06. ... k_hostonly
On Linux, Mac OS X and Solaris Oracle VM VirtualBox will only allow IP addresses in 192.168.56.0/21 range to be assigned to host-only adapters. ... 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
scottgus1
Site Moderator
 
Posts: 16555
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: hostonlyif ipconfig problem

Postby mgogala » 18. Aug 2022, 00:10

Thanks, this works!
mgogala
 
Posts: 12
Joined: 20. Nov 2011, 23:44
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: OL 6.1, Centos 6, Ubuntu 11.10

Re: hostonlyif ipconfig problem

Postby scottgus1 » 18. Aug 2022, 00:24

Great! Glad you're up and running.
scottgus1
Site Moderator
 
Posts: 16555
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: Google [Bot] and 18 guests