FIX: VirtualBox Host-Only Network Adapter Creates a Virtual “Public Network” Connection That Causes Windows to Disable Services

vbox-host-only-net-net-n-sharing

vbox-host-only-net-connectletVirtualBox creates a “VirtualBox Host-Only Network” device which is essentially a loopback adapter for creating network connections between virtual machines and between the host and virutal machines. Unfortunately, it shows up to Windows as an unidentified public network. Connecting to a “public network” ratchets up your firewall and disables network discovery and SMB/CIFS network shares. This is kind of a big side effect of installing some VM software.Fortunately, Windows does have a way to mark a network device as virtual by creating a registry value.

The type of the device. The default value is zero, which indicates a standard networking device that connects to a network. Set *NdisDeviceType to NDIS_DEVICE_TYPE_ENDPOINT (1) if this device is an endpoint device and is not a true network interface that connects to a network. For example, you must specify NDIS_DEVICE_TYPE_ENDPOINT for devices such as smart phones that use a networking infrastructure to communicate to the local computer system but do not provide connectivity to an external network.

This powerhsell script will find the “VirtualBox Host-Only Ethernet Adapter device entry in the registry and adds the ‘*NdisDeviceType’ value of 1. After reboot, the “VirtualBox Host-Only Ethernet Adapter” will no longer be monitored by the Network and Sharing center.

# tell windows that VirtualBox Host-Only Network Adapter
# is not a true network interface that connects to a network
# see http://msdn.microsoft.com/en-us/library/ff557037(VS.85).aspx
pushd
echo 'Marking VirtualBox Host-Only Network Adapter as a virtual device.'
cd 'HKLM:\system\CurrentControlSet\control\class\{4D36E972-E325-11CE-BFC1-08002BE10318}'
ls ???? | where { ($_ | get-itemproperty -name driverdesc).driverdesc `
-eq 'VirtualBox Host-Only Ethernet Adapter' } |`
new-itemproperty -name '*NdisDeviceType' -PropertyType dword -value 1
echo 'After you reboot the VirtualBox Host-Only Network unidentified public network should be gone.'
popd


12 Responses to FIX: VirtualBox Host-Only Network Adapter Creates a Virtual “Public Network” Connection That Causes Windows to Disable Services

  1. sysprv says:

    Thanks for the tip!

    Looks like VMware Workstation does the same thing, at least version 7.1.4 build-385536, on Windows 7.
    Net devices “VMware Network Adapter VMnet1” and “VMware Network Adapter VMnet8”.

  2. Pingback: Can't access VirtualBox host-only network from windows host - Just just easy answers

  3. Smitty says:

    A reboot is not necessary. Just disable and re-enable the network adapter and the change will be in effect. (Thanks to this comment on HowToGeek.com: http://www.howtogeek.com/forum/topic/virtualbox-host-only-network-un-identified-network-public-network#postContent-204211)

  4. Oleg Malii says:

    Thank alot!!! You saved day!

  5. Pingback: How-to: Can't access VirtualBox host-only network from windows host #dev #answer #solution | SevenNet

  6. Pingback: Resolved: Can't access VirtualBox host-only network from windows host #answer #it #dev | Good Answer

  7. Pingback: Fix: Can't access VirtualBox host-only network from windows host #development #fix #computers | IT Info

  8. Pingback: xdebug Time-out connecting to client. :-( using phpstorm 7.1.3/vagrant/virtualbox/magento - Technology

  9. Pingback: Can't access VirtualBox host-only network from windows host – segmentfault

  10. Pingback: How To Build A Virtual Network With Virtualbox | Africabank

  11. Pingback: Hide VMWare Virtual Network Interfaces from Windows Firewall and Network and Sharing Center – Eduardo Mozart

  12. Pingback: Escondendo Dispositivos de Rede Virtuais do VMWare e VirtualBox do Firewall do Windows e da Central de Rede e Compartilhamento – Eduardo Mozart

Leave a comment