Cannot get virtualbox to use host only adapter 169.254

Discussions related to using VirtualBox on Windows hosts.
IrishG
Posts: 11
Joined: 11. May 2018, 15:15

Cannot get virtualbox to use host only adapter 169.254

Post by IrishG »

Hi all,

I've reviewed topics with similar errors but have been unable to resolve my issue, which is that I cannot get my VMs to work with host only adapter on Windows 10.

I've tried uninstalling and reinstalling both virtual box and the adapter numerous times but every time I wish to run my vbox files they cannot receive an IP address and have 169.254.x.x assigned.

I have no issues running in NAT.

On running the following I see that DHCP is disabled despite being enabled within the settings.

Code: Select all

C:\Program Files\Oracle\VirtualBox>vboxmanage list hostonlyifs
Name:            VirtualBox Host-Only Ethernet Adapter
GUID:            7b5d27c8-3ccf-4130-b375-2ba31395fae0
DHCP:            Disabled
IPAddress:       192.168.56.1
NetworkMask:     255.255.255.0
IPV6Address:     fe80::51d6:7b6f:4b41:236d
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:48
MediumType:      Ethernet
Wireless:        No
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
I'm running
Virtualbox version is 5.2.12 r122591
Windows 10 Enterprise.

Can anyone give me a couple of pointers.
Last edited by socratis on 12. May 2018, 00:44, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot get virtualbox to use host only adapter 169.254

Post by mpack »

1. IPv4 addresses in the 169.x.x.0 range are not real addresses, they are dummy values that a Windows PC assigns itself, on a particular NIC, until a DHCP server assigns it an actual IP address (Google for "APIPA").

2. The host only virtual NIC has built in DHCP, so there's no way that a VirtualBox host only virtual ethernet card was using a 169.x address.

If you mean that the guest OS is using that IP address then you need to configure it to acquire IP addresses automatically, i.e. via DHCP. But, I do notice that your text dump says "DHCP Server: Disabled" on the host, which would explain why the guest OS has not received an address. The DHCP server is enabled by default, so you must have disabled it. You need to run the manager, choose File|Host Network Manager, and re-enable DHCP. Then restart the VM.

You understand that host only network mode can ONLY be used to communicate with the host, right? If you want Internet access then you should be using NAT or bridged.
IrishG
Posts: 11
Joined: 11. May 2018, 15:15

Re: Cannot get virtualbox to use host only adapter 169.254

Post by IrishG »

Thanks for your reply.

I understand that to get internet access that NAT needs to be applied, and that is working for a guest.

I'm trying to get a private IP address in the 192.168.56.100/24 range applied when Host Only Adapter is selected for a guest but it just has 169.254

The setting state the DHCP server is active in the Host Network Manager and reports the adapter settings are 192.168.56.1/24 while the DHCP server is 192.168.56.100/24 with the lower and upper being 101 and 254, the standard settings from what I understand, but on running the command mentioned in my first post it reports that DHCP is disabled
Last edited by socratis on 11. May 2018, 17:26, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot get virtualbox to use host only adapter 169.254

Post by mpack »

Hmm. I just tried it, and I too get "DHCP: Disabled" on the command line even though it's enabled in the GUI. Admittedly quite surprising, perhaps it only turns on when a VM starts that uses host only.
 Edit: . Nope, just tried it, and nothing changed. However "VBoxManage list dhcpservers" shows "HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter" as a working server.

Anyway, if the DHCP server is running and the guest isn't getting an IP address then the DHCP client must be disabled in your guest OS.

Incidentally, what is the guest OS? Recent Windows versions sometimes default to disabling particular networks if they can't identify it. You'd have to Google for how to verify and correct that. 
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: Cannot get virtualbox to use host only adapter 169.254

Post by socratis »

mpack wrote:I just tried it, and I too get "DHCP: Disabled" on the command line even though it's enabled in the GUI.
Yeap, it's a bug. See "#15975: VBoxManage always shows host only interfaces as disabled", although the OP meant "VBoxManage always shows host only interface DHCP server as disabled".
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.
IrishG
Posts: 11
Joined: 11. May 2018, 15:15

Re: Cannot get virtualbox to use host only adapter 169.254

Post by IrishG »

mpack wrote:Incidentally, what is the guest OS? Recent Windows versions sometimes default to disabling particular networks if they can't identify it. You'd have to Google for how to verify and correct that.
Thanks for your reply.

The guest os are windows 10 enterprise and windows server 2012 r2
Both have the dhcp client service running.

Looks like it is something to do with the host as I set up virtualbox on a windows 7 machine and the same guest images receive an ip address so trying to figure out what is blocking the addresses being assigned on the original Windows 10 machine in my op.
IrishG
Posts: 11
Joined: 11. May 2018, 15:15

Re: Cannot get virtualbox to use host only adapter 169.254

Post by IrishG »

socratis wrote:Yeap, it's a bug.
Thanks for confirming what I'm seeing with the command is a known issue.
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: Cannot get virtualbox to use host only adapter 169.254

Post by socratis »

Any 3rd party antivirus running? What are your settings for the HostOnly NIC in the host?
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.
ausadba
Posts: 9
Joined: 7. May 2018, 08:21

Re: Cannot get virtualbox to use host only adapter 169.254

Post by ausadba »

Did you try assigning a static IP address like 192.168.56.2? With the default gateway being the HOST ONLY adaptor (eg: VirtualBox Host-Only Network #2) IP address.
I believe host only adaptor is to connect from the VM to the host and vice versa.
IrishG
Posts: 11
Joined: 11. May 2018, 15:15

Re: Cannot get virtualbox to use host only adapter 169.254

Post by IrishG »

socratis wrote:Any 3rd party antivirus running? What are your settings for the HostOnly NIC in the host?
Hi sorry for the delay, away from home and the site is not showing up great on my mobile.

No third party av warnings.

When you say host only, do you mean if I run ipconfig /all on the host machine what is displayed for the virtual host adapter,if yes its 192.168.56.1/24
IrishG
Posts: 11
Joined: 11. May 2018, 15:15

Re: Cannot get virtualbox to use host only adapter 169.254

Post by IrishG »

ausadba wrote:Did you try assigning a static IP address like 192.168.56.2? With the default gateway being the HOST ONLY adaptor (eg: VirtualBox Host-Only Network #2) IP address.
I believe host only adaptor is to connect from the VM to the host and vice versa.
I'm going to try static next when back, but I have used the dhcp assignment before on a windows 7 host to have two guests connect to each other on the same host and need to do so again on this new machine.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cannot get virtualbox to use host only adapter 169.254

Post by mpack »

Using a static address would be a kludge. This feature works for others, you should find out why it isn't working for you and not just force a temporary solution (if it even does that).

Did you check whether the Windows guest was blocking that network? I.e. did you Google for reasons why Windows might be using an APIPA address for a port? ISTM this is the most likely way to find a genuine solution.
IrishG
Posts: 11
Joined: 11. May 2018, 15:15

Re: Cannot get virtualbox to use host only adapter 169.254

Post by IrishG »

Working on that brought me to this forum, but I'm still searching outside of virtualbox itself

But some of the most common reasons I found is that the client cannot find a DHCP server, which is appearing in the event viewer of the guest. I'm assuming that Virtualbox 192.168.56.100 should be the DHCP server.
Last edited by socratis on 13. May 2018, 15:27, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
IrishG
Posts: 11
Joined: 11. May 2018, 15:15

Re: Cannot get virtualbox to use host only adapter 169.254

Post by IrishG »

Can anyone suggest some logging in virtualbox in relation to this issue?

Thanks
kimiryu
Posts: 1
Joined: 15. May 2018, 04:54

Re: Cannot get virtualbox to use host only adapter 169.254

Post by kimiryu »

hi, im using 5.2.12, but the adapter on client cant get any ip, im using bridge and nat

edit:
sorry, false alarm, its because my pulse and juniper makes my adapter messed up
Last edited by kimiryu on 15. May 2018, 09:00, edited 1 time in total.
Post Reply