Opened 13 years ago

Closed 9 years ago

#8512 closed defect (duplicate)

Host-Only Network Problems After Upgrade

Reported by: galesteven Owned by:
Component: network/hostif Version: VirtualBox 4.0.4
Keywords: Cc:
Guest type: other Host type: Windows

Description (last modified by Valery Ushakov)

Host: Windows-7 64-bit Guest: Oracle Linux

I configured 2 network interfaces to my guest: NAT and Host-Only using VirtualBox 4.0. The Host-Only has a static IP for both the Host ( and the Guest (

It worked like a charm.

Then I Upgraded from VB 4.0 to 4.0.4.

My network set-up before upgrading had a Host-Only adapter with IP= and Mask= After upgrading this changed to IP= and Mask=

I tried to change the Host-Only settings back the pre-upgrade values via File->Preferences->Network. It appears to work. It popped-up the security warning which I ok'ed. But it didn't REALLY change the IP config. The Windows "ipconfig" command displays the wrong IP and Mask. Pinging my guest also fails with "Destination host unreachable"

Then I started VirtualBox running "as Administrator" and tried to change the Host-Only IP configuration via File->Preferences->Network. This time it also appeared to work, but the Windows "ipconfig" command displays the wrong IP and Mask. Pinging my guest also fails with "Destination host unreachable".

So I do not believe that this is a Windows Security problem.

Each time restart Virtual Box and check the IP settings in File->Preferences->Network, I see that the Host-Only configuration reverted back to the wrong IP and Mask!

Change History (2)

comment:1 by VBFixer, 9 years ago

I had this exact problem, I posted my workaround in a related bug, but it might be more relevant here.

Details of my debugging steps follow. Hopefully there are some bread crumbs that lead to a real solution. My current suspicion is that this is affects people like me who have upgraded VirtualBox in Windows and thus had the Host-Only Adapter driver updated. I think something goes wrong in the update process and Windows no longer recognizes the adapter as connected and enabled (see details below), but here's what fixed it for me:

1) Open windows command prompt as admin

2) Enter the command:

 netsh interface ip set address name="VirtualBox Host-Only Network" static

Note: Obviously, you need to change the IP & subnet mask to what you want, but you might also need to change the "name" parameter to match whatever is listed in "View Network Connections". Since there are two identifiers listed there, the one you need for this command is the top identifier (the one that is user modifiable). Other Windows commands use the other identifier, so this may be confusing since the default names are similar ("VirtualBox Host-Only Network" vs "VirtualBox Host-Only Ethernet Adapter"). I also believe it is case sensitive.

3) Verify change with the command:

 netsh interface ip show addresses

When I ran VB, the manually entered settings now appeared in the VB GUI under Preferences->Network->Host-Only. Issuing the following the command also confirmed that DHCP was disabled now:

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe list hostonlyifs

Name:            VirtualBox Host-Only Ethernet Adapter
GUID:            947c0311-30ce-4761-819c-959280a2518c
DHCP:            Disabled
IPV6Address:     fe80:0000:0000:0000:9c26:7468:8103:8d22
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:00
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter

Background for developers: I have encountered this issue with v4.3 and v5 running Windows 8.1 x64. I needed to change my Host-Only adapter's ip address to a static ip. Using the VB GUI or the VBoxManage command line interface both failed silently (it would take my settings, but when I checked them afterward, the settings reverted to a ip).

I tried removing and re-adding the host-only adapter from the VB GUI and VBoxManage CLI. I tried uninstalling the Host-Only adapter from device manager (with delete driver option checked). I uninstalled VB 4.3, deleted all registry keys I could find related to VB, rebooted, reinstalled VB v5. Same issue. I rebooted more times than I could count, trying every permutation of commands with a reboot in between. Nothing worked.

The key problem seems to be that the adapter refuses to disable DHCP, and gets stuck with the failure IP. Using:

VBoxManage.exe list hostonlyifs

Always showed "DHCP: Enabled" even though I had used VboxManage and VB GUI to assign a static-ip and disable DHCP and no errors were given.

I saw other users were able to access the IPv4 settings through Windows via: View Network Connections -> Host-Only Adapter -> Properties -> IPv4 -> Properties. But I get the error:

Microsoft TCP/IP
In order to configure TCP/IP, you must install and enable a network adapter card. 

which is another indication that Windows thinks the card is missing or disabled, which may indicate why attempting to change the IP address fails silently. I'm not sure why the "netsh" interface (above) works differently, but it works.

Microsoft's Knowledge Base article #308939 describes this error (in 2007) as:

This behavior can occur if your network adapter has been changed 
to another model of network adapter without first being properly
uninstalled by using the Add/Remove Hardware tool in Control Panel. 


To resolve this behavior after the restoration process, uninstall 
the network adapter in Device Manager, and then run the Add/Remove 
Hardware tool in Control Panel to reinstall the network adapter.

Unfortunately, their "resolution" doesn't seem to work, but this may be a sign than there is a problem during upgrading VB versions since the Host-Only Adapter is updated every time. If it's not being removed properly before the new version is installed, that could be why some people have problems and others don't.

At any rate, I hope this solution works for other people and it saves them some trouble.

comment:2 by Valery Ushakov, 9 years ago

Description: modified (diff)
Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use