VirtualBox

Opened 20 months ago

Last modified 20 months ago

#21817 new defect

Impossible to change IP of Host-Only network

Reported by: johndoe213198 Owned by:
Component: network/hostif Version: VirtualBox-7.0.10
Keywords: host-only, vboxmanage Cc:
Guest type: all Host type: Linux

Description (last modified by johndoe213198)

Hello, I want to create a new Host-Only Network. I use this command:

me@me-computer:~$ VBoxManage hostonlyif create
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface 'vboxnet0' was successfully created

I try to change the IP with this command:

me@me-computer:~$ VBoxManage hostonlyif ipconfig vboxnet0 --ip 172.16.0.1 --netmask 255.255.0.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 252 of file VBoxManageHostonly.cpp

I have the same error even if I am sudo:

me@me-computer:~$ sudo VBoxManage hostonlyif ipconfig vboxnet0 --ip 172.16.0.1 --netmask 255.255.0.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 252 of file VBoxManageHostonly.cpp

I already edited the file /etc/vbox/networks.conf, permission are -rw-r--r--:

me@me-computer:~$ cat /etc/vbox/networks.conf
10.0.0.0/8 192.168.0.0/16 172.16.0.0/16

Same problem with the GUI. I am running Ubuntu 22.04.3 LTS. How can fix this problem?

Change History (5)

comment:1 by fth0, 20 months ago

See the last few paragraphs in 6.7. Host-Only Networking.

comment:2 by johndoe213198, 20 months ago

Description: modified (diff)

in reply to:  1 comment:3 by johndoe213198, 20 months ago

Replying to fth0:

See the last few paragraphs in 6.7. Host-Only Networking.

Thanks, I already modified the configuration.

comment:4 by fth0, 20 months ago

You overlooked the "* " prefix. ;)

Last edited 20 months ago by fth0 (previous) (diff)

comment:5 by johndoe213198, 20 months ago

Indeed, it works. Thanks.

Note: See TracTickets for help on using tickets.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette