Getting error while adding host=-only server in virtual box. [ E_INVALIDARG (0x80070057) ]


I need to create a new Host-only network, in VirtualBox, as a part of this tutorial to learn Puppet tool. I went to File -> Preferences -> Network -> Host-only network, and clicked on "Add host-only network". On clicking ok, it generated default values of DHCP as 0, in the end (screesnshots below). Which gave the following error:

Failed to save the settings.

Invalid server address.

Result Code: E_INVALIDARG (0x80070057)
Component: VirtualBoxWrap
Interface: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}
Callee: IDHCPServer {00c8f974-92c5-44a1-8f3f-702469fdd04b}

How should I configure DHCP? so my host-only network is created?

asked on Stack Overflow Aug 26, 2018 by Raj • edited Aug 26, 2018 by Raj

3 Answers


Your DHCP server address values do not appear to be the defaults. Are you sure you didn't change something?

The values I see in there by default match those in the Youtube video and they are:

enter image description here

In your screenshot, you have

  • Server Address:
  • Server Mask:
  • Lower Address Bound:
  • Upper Address Bound:

That lower/upper address bound are outside of the network specified in Address/Subnet so it is invalid. See here in the VirtualBox docs for the meaning of lower and upper address bound.

Try using ipcalc to calculate valid settings:

$ ipcalc
Address:        11000000.10101000.01110011. 00000000
Netmask: = 24   11111111.11111111.11111111. 00000000
Wildcard:            00000000.00000000.00000000. 11111111
Network:     11000000.10101000.01110011. 00000000
HostMin:        11000000.10101000.01110011. 00000001
HostMax:      11000000.10101000.01110011. 11111110
Broadcast:      11000000.10101000.01110011. 11111111
Hosts/Net: 254                   Class C, Private Internet

You can use HostMin and HostMax for your Lower and Upper Address Bound respectively.

Hope that helps.

answered on Stack Overflow Aug 26, 2018 by Alex Harvey • edited Aug 26, 2018 by Alex Harvey

Uninstalling current VirtualBox and reinstalling with new version (5.2) resolved the issue.

answered on Stack Overflow Aug 26, 2018 by Raj

I don't know if related but I was getting the same E_INVALIDARG error message at importing another image. I'm guessing a naming conflict was happening because once I renamed the old image the import was successful.

answered on Stack Overflow Feb 27, 2020 by Fierascu Gheorghe

User contributions licensed under CC BY-SA 3.0