DHCP for host-only doesn't work

Discussions related to using VirtualBox on Windows hosts.
Sharkoff
Posts: 8
Joined: 22. Mar 2019, 08:52

DHCP for host-only doesn't work

Post by Sharkoff »

Hello.
I've got windows 10 host system and VBox 6.0.6.
DHCP for host-only network stopped work for any guest OS several days ago. I can't find any reasons for this problem. Nothing changed on host machine, except for any windows updates...
What I already did?
1. Turn off/on dhcp server for host-only adapter;
2. Change ip settings for dhcp server;
3. Delete/add host-only adapter;
4. Reinstall VBox.
This actions doesn't solve the problem.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: DHCP for host-only doesn't work

Post by andyp73 »

Can you run the following commands on the host and post the output here...
C:\Program Files\Oracle\VirtualBox\VBoxManage list hostonlyifs
C:\Program Files\Oracle\VirtualBox\VBoxManage list dhcpservers
-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
Sharkoff
Posts: 8
Joined: 22. Mar 2019, 08:52

Re: DHCP for host-only doesn't work

Post by Sharkoff »

Thanks for your answer.
C:\Users\user>"C:\Program Files\Oracle\VirtualBox\VBoxManage" list hostonlyifs
Name:            VirtualBox Host-Only Ethernet Adapter
GUID:            1ccde019-6cfe-48e0-90aa-d87ade156571
DHCP:            Disabled
IPAddress:       192.168.212.1
NetworkMask:     255.255.255.0
IPV6Address:     fe80::f864:4300:4b41:9aaf
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:0c
MediumType:      Ethernet
Wireless:        No
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter

C:\Users\user>"C:\Program Files\Oracle\VirtualBox\VBoxManage" list dhcpservers
NetworkName:    HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
IP:             192.168.212.2
NetworkMask:    255.255.255.0
lowerIPAddress: 192.168.212.3
upperIPAddress: 192.168.212.254
Enabled:        Yes
Global options:
   1:255.255.255.0
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: DHCP for host-only doesn't work

Post by mpack »

C:\Users\user>"C:\Program Files\Oracle\VirtualBox\VBoxManage" list hostonlyifs
Name: VirtualBox Host-Only Ethernet Adapter
GUID: 1ccde019-6cfe-48e0-90aa-d87ade156571
DHCP: Disabled
A clue perhaps.
Attachments
Capture.PNG
Capture.PNG (24.29 KiB) Viewed 11894 times
Sharkoff
Posts: 8
Joined: 22. Mar 2019, 08:52

Re: DHCP for host-only doesn't work

Post by Sharkoff »

Enabled
C:\Users\user>"C:\Program Files\Oracle\VirtualBox\VBoxManage" list hostonlyifs
Name: VirtualBox Host-Only Ethernet Adapter
GUID: 1ccde019-6cfe-48e0-90aa-d87ade156571
DHCP: Disabled
I think it's dhcp client interface option. Disabled, because inteface has static ip.
Attachments
Снимок3.JPG
Снимок3.JPG (44.8 KiB) Viewed 11890 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: DHCP for host-only doesn't work

Post by mpack »

Well, it is extremely odd that "list hostonlyifs" says something else. Also that the "list dhcpservers" feature shows a completely different available IP range.

I don't see how "Static IP" can affect the DHCP server. Static IP isn't a host or interface setting, it's simply a decision by the guest OS not to call the DHCP function.

Could you perhaps have configured two DHCP servers to answer on the same IP address? I.e. physical and virtual with conflicting configs.
Sharkoff
Posts: 8
Joined: 22. Mar 2019, 08:52

Re: DHCP for host-only doesn't work

Post by Sharkoff »

Also that the "list dhcpservers" feature shows a completely different available IP range.
Where is the difference? Different with what?
I don't see how "Static IP" can affect the DHCP server. Static IP isn't a host or interface setting, it's simply a decision by the guest OS not to call the DHCP function.
"Static IP" doens not affect the DHCP server. Option "DHCP" in "list hostonlyifs" is dhcp client option, not dhcp server. When host-only interface have static ip ("Configure Adapter Manually") it's disabled, when I choose "Configurу Adapter Automatically" it's enabled.
Could you perhaps have configured two DHCP servers to answer on the same IP address? I.e. physical and virtual with conflicting configs.
No, I tried to change DHCP server ip in Vbox settings
Sharkoff
Posts: 8
Joined: 22. Mar 2019, 08:52

Re: DHCP for host-only doesn't work

Post by Sharkoff »

Update to 6.0.8 fixed the problem.
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: DHCP for host-only doesn't work

Post by socratis »

Just to clear one thing, the output of "list hostonlyifs" *IS* reporting wrongly that the DHCP is not enabled. Pointed to the devs, begged, shouted, yelled, but not a fix yet. It's been like that for years... :(
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.
marcorifo
Posts: 2
Joined: 10. Jul 2019, 10:18

Re: DHCP for host-only doesn't work

Post by marcorifo »

Dear all

I got 3 DHCP servers, 2 of which (host-only) are enabled but not running.
Virtualbox is 6.0.8 version with last extension pack installed.

Code: Select all

NetworkName:    HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
IP:             192.168.56.100
NetworkMask:    255.255.255.0
lowerIPAddress: 192.168.56.201
upperIPAddress: 192.168.56.254
Enabled:        Yes
Global options:
   1:255.255.255.0

NetworkName:    NatNetwork
IP:             10.0.2.3
NetworkMask:    255.255.255.0
lowerIPAddress: 10.0.2.4
upperIPAddress: 10.0.2.254
Enabled:        Yes
Global options:
   1:255.255.255.0
   3:10.0.2.1
   6:8.8.8.8 8.8.4.4
   15:lan

NetworkName:    HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2
IP:             192.168.57.100
NetworkMask:    255.255.255.0
lowerIPAddress: 192.168.57.101
upperIPAddress: 192.168.57.254
Enabled:        Yes
Global options:
   1:255.255.255.0
This about IF

Code: Select all

Name:            VirtualBox Host-Only Ethernet Adapter
GUID:            73269be8-aa21-488f-9b2b-0039196295aa
DHCP:            Enabled
IPAddress:       169.254.38.183
NetworkMask:     255.255.0.0
IPV6Address:     fe80::b85a:69a5:8970:26b7
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:0e
MediumType:      Ethernet
Wireless:        No
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter

Name:            VirtualBox Host-Only Ethernet Adapter #2
GUID:            d755eb02-7cf0-40e0-9758-7997f45d0873
DHCP:            Enabled
IPAddress:       169.254.24.20
NetworkMask:     255.255.0.0
IPV6Address:     fe80::5551:17b8:70a8:1814
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:14
MediumType:      Ethernet
Wireless:        No
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2
Could someone help me starting DHCP servers?

Thanks
Marco
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: DHCP for host-only doesn't work

Post by socratis »

@marcorifo
How do you know they're not running, since they're clearly labelled as running? The "Enabled: Yes" part? Do your guests fail to get an IP address when configured for a DHCP lease?
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.
marcorifo
Posts: 2
Joined: 10. Jul 2019, 10:18

Re: DHCP for host-only doesn't work

Post by marcorifo »

@socratis
That is the problem.
IFs are configured to get IP addr from a DHCP server (in fact, DHCP is enabled), but if you look at the IFs you will see that IP address are "not valid" (169.254.38.183, 169.254.24.20).
If I ping DHCP servers (192.168.56.100, 192.168.57.100) I get no response.
Firewall id down. I'm on a Windows machine.
Marco
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: DHCP for host-only doesn't work

Post by socratis »

By "IF" I think you mean the NICs in the guest. I need to see:
  • The file in "C:\Users\<you>\.VirtualBox\VirtualBox.xml". Note the dot (.) before the VirtualBox directory.
  • The ".vbox" file: right-click on the VM in the VirtualBox Manager. Select "Show in Explorer". That's the VM's .vbox file.
ZIP them both and attach the ZIPPED file to your response.
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.
pianoko
Posts: 2
Joined: 18. Oct 2019, 15:44

Re: DHCP for host-only doesn't work

Post by pianoko »

I know this is an older post, but for what it's worth, I was dealing with the exact same issue with both Ubuntu and CentOS installs. Upgrading to the latest version of VB (6.0.14 at the moment) did the trick. There must have been a little bug or an improvement to deal with different environments regarding this DHCP, although I do not see any mention of it in the changelog. I, too, was pulling my hair out trying to figure this out.
squarky
Posts: 1
Joined: 28. Nov 2019, 15:18

Re: DHCP for host-only doesn't work

Post by squarky »

I'm running 6.0.14 on windows 10 v.1903 and still have the same issue. I can manually assign an IP to the guest OS and connection is fine, but there's no DHCP on the host-only network.

After a clean install and wipe of all configurations (delete .VirtualBox folder) it looks like this:

Code: Select all

> VBoxManage list hostonlyifs
Name:            VirtualBox Host-Only Ethernet Adapter
GUID:            514ee5b5-78ec-49e1-8c14-0eab204965b7
DHCP:            Disabled
IPAddress:       192.168.56.1
NetworkMask:     255.255.255.0
IPV6Address:     fe80::5d54:8941:6645:a1fd
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:3a
MediumType:      Ethernet
Wireless:        No
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter

Code: Select all

>VBoxManage list dhcpservers
NetworkName:    HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
IP:             192.168.56.100
NetworkMask:    255.255.255.0
lowerIPAddress: 192.168.56.101
upperIPAddress: 192.168.56.254
Enabled:        Yes
Global options:
   1:255.255.255.0
I started a Live-CD with only the host adapter above and got the "VERR_INTNET_FLT_IF_NOT_FOUND" error.

Disable/Enable adapter did the trick and now the guest os can boot, but there's no DHCP so I have to manually assign IP to the guests on the host-only networks. If I run NAT IF it assigns an IP with no issues.

Any ideas are much appreciated.
Post Reply