Page 1 of 2

DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 29. May 2017, 14:22
by Immancy
Hi All,
My virtual box been running fine on Windows 10 OS, for the past one year without any issue.
Recently after the Windows 10 update, the virtual box stopped working citing the in compatibility issue.
So I installed the latest version of virtual box 5.1.22 for Windows Host
After Which I couldn't communicate with the virtual machine ( Running on Linux platform) through the Host-only network.
Which had worked earlier.
When i tried to diagnose the network connection on the windows host, I got an error on the windows "DHCP is not enabled for VirtualBox Host-only Network"
And on the virtual machine I checked the network preferences, which has DHCP button enabled for the Host-Only network.
and ifconfig -a doesn't display any ip addr for eth0 configuration.

I tried uninstalling and installing the virtual box software several times along with the latest ext pack.
And followed some of the solution available in the forum
1. to set the ip address on both windows and virtual machine
2. Virtual box NDIS6 Bridged Networking Driver enabled by default, disabled and enabled again
3. Set the static ip address instead of DHCP

nothing helped me to fix this issue.


VB Version: 5.1.22 Windows Host
Windows 10, 64 bit
Linux version installed : ubuntu-14.04.4-server-amd64


Point to be noted, I do not need any internet, I'm only trying to communicate between the Virtual machine and Host using HOST-Only network.

Highly appreciate any help in this regard.

Nancy

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 29. May 2017, 14:27
by socratis
Immancy wrote:When i tried to diagnose the network connection on the windows host
How? What did you do?

Go to VirtualBox preferences » Network » Host-only Networks » Dbl-click on the Host-Only network adapter » DHCP server. Is it enabled?

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 29. May 2017, 14:32
by Immancy
I didnt do anything other than installing the new version of the virtual box.
socratis wrote:Go to VirtualBox preferences » Network » Host-only Networks » Dbl-click on the Host-Only network adapter » DHCP server. Is it enabled?
Yes the option you have mentioned in enabled on my network preferences.

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 29. May 2017, 14:35
by socratis
The question was "what did you do to diagnose the network connectivity"?

Follow the steps below. If there is a failure, please state exactly which step failed:
  1. Uninstall VirtualBox. Your VMs are going to be untouched. Reboot.
  2. You may want to clean up your registry and/or filesystem at this point. CCleaner is a freeware utility that could help you. Mind the installation, it comes with "offers" from 3rd parties, known as "bundleware".
  3. Download (if you haven't already) the latest VirtualBox and its matching ExtPack. Store them in a common location, i.e. not on "Desktop", or "Documents", but to "Public/Downloads" for example.
  4. Locate the downloaded file in Windows Explorer. Right-click on the installer and select "Run-as-Administrator", even if you are the administrator. At the end of the installation, choose to "Start Oracle VM VirtualBox". Do not worry if your VMs do not show.
  5. If you're going to install the ExtPack, go to File » Preferences » Extensions. Click on the icon with the orange, down-pointing arrow on the right. Select the ExtPack from the previous steps.
  6. Quit VirtualBox. Re-start VirtualBox as you would normally, i.e. from the Desktop shortcut or the Start menu.

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 29. May 2017, 14:51
by Immancy
socratis wrote:The question was "what did you do to diagnose the network connectivity"?
In the Network and Sharing Center -> Change Adapter Seting -> lists down all the available network
right click the "VirtualBox Host-Only Network", there is an option that says "Diagnose"

I have done this before uninstalled and installed, But i will repeat it again.
There is no problem with the installation though, the software gets installed without any issue.

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 29. May 2017, 15:56
by Immancy
Hi,
I tried as you suggested, I could install with no issues.
But still the problem persist.
While booting, it still waits on the network configuration.
Waiting for network configuration...
Waiting up to 60 more seconds for network configuration...
ifconfig didnt list the ip addr of eth0 as well.

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 29. May 2017, 16:11
by socratis
Immancy wrote:right click the "VirtualBox Host-Only Network", there is an option that says "Diagnose"
You do not diagnose the host-only adapter from within the host. That doesn't make any sense at all. You should forget altogether diagnosing the host-only adapter like that.

There are a couple of things you can try. First of all, create a new Ubuntu VM, booting from a LiveCD. Change the network adapter from NAT to HostOnly. Reboot the VM and once booted, check the 'ifconfig' output. Did you get an IP?

For your original Ubuntu, open a Command Prompt in your Win host. Post the output of the commands:
  • 
    cd "C:\Program Files\Oracle\VirtualBox"      <-- change it if not the default installation
    VBoxManage list hostonlyifs
    VBoxManage list dhcpservers
    VBoxManage showvminfo "Your_Virtual_Machine_Name"

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 29. May 2017, 16:27
by Immancy
My present Ubuntu settings.

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage list hostonlyifs
Name:            VirtualBox Host-Only Ethernet Adapter #2
GUID:            543c4eef-1608-4a88-a142-4d51beaa7f9b
DHCP:            Disabled
IPAddress:       192.168.56.1
NetworkMask:     255.255.255.0
IPV6Address:     fe80:0000:0000:0000:100a:1acc:8e6f:510e
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:22
MediumType:      Ethernet
Status:          Up

Code: Select all

C:\Program Files\Oracle\VirtualBox>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

NetworkName:    HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2
IP:             192.168.56.2
NetworkMask:    255.255.255.0
lowerIPAddress: 192.168.56.110
upperIPAddress: 192.168.56.200
Enabled:        Yes

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage showvminfo "red_git"
Name:            red_git
Groups:          /
Guest OS:        Ubuntu (64-bit)
UUID:            d95f5c8d-e236-4054-961e-bfffd59341a0
Config file:     ****\red_git.vbox
Snapshot folder: ****\Snapshots
Log folder:      ****\Logs
Hardware UUID:   d95f5c8d-e236-4054-961e-bfffd59341a0
Memory size:     768MB
Page Fusion:     off
VRAM size:       12MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
PAE:             off
Long Mode:       on
Triple Fault Reset: off
APIC:            on
X2APIC:          off
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
BIOS APIC mode:  APIC
Time offset:     0ms
RTC:             UTC
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     on
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
Effective Paravirt. Provider: KVM
State:           running (since 2017-05-29T13:50:05.010000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Default Frontend:
Storage Controller Name (0):            IDE
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            SATA
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      1
Storage Controller Bootable (1):        on
IDE (1, 0): Empty
SATA (0, 0): ****\red_git.vdi (UUID: 7f543a05-ac4c-43e9-a001-208a3f10b35a)
NIC 1:           MAC: 08002712EB63, Attachment: Host-only Interface 'VirtualBox Host-Only Ethernet Adapter #2', Cable connected: off, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           enabled (Driver: DSOUND, Controller: AC97, Codec: AD1980)
Clipboard Mode:  disabled
Drag and drop Mode: disabled
Session name:    GUI/Qt
Video mode:      640x480x32 at 0,0 enabled
VRDE:            disabled
USB:             enabled
EHCI:            disabled
XHCI:            disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups:  <none>

Shared folders:  <none>

VRDE Connection:    not active
Clients so far:     0

Video capturing:    not active
Capture screens:    0
Capture file:       *****\red_git.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25

Guest:

Configured memory balloon size:      0 MB
OS type:                             Linux26_64
Additions run level:                 1
Additions version:                   5.0.0_Ubuntu r101573


Guest Facilities:

Facility "VirtualBox Base Driver": active/running (last update: 2017/05/29 13:50:21 UTC)
Facility "Seamless Mode": not active (last update: 2017/05/29 13:50:21 UTC)
Facility "Graphics Mode": not active (last update: 2017/05/29 13:50:21 UTC)
For security reason, i have replaced the paths mentioned as ****

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 29. May 2017, 16:54
by socratis
Immancy wrote:For security reason, i have replaced the paths mentioned as ****
Don't! Because if you do *** ******* man, I'm going to **** *** ** the ******** and then none is *****. I hope it makes sense.

There is ABSOLUTELY NOTHING secure about your username. It might however cover a bug. Just like my username "Σωκράτης" does fool and trip some programs. So, do NOT hide your username, it's not a security issue. Unless you read it on the Internet in which case, I'm typing this from my underground banker...


Did you try the LiveCD/DVD that I mentioned? Also, shutdown VirtualBox and wait for all Virt*, VBox* and VM* processes to quit. reboot your computer and before you start VirtualBox, send me the file C:\Users\****\.VirtualBox\VirtualBox.xml. ZIPPED. If you're still paranoid about security, send me a PM. But I need the unfiltered file, because I think I know what's going on.

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 30. May 2017, 09:53
by BillG
The host only setup is pretty simple. There is an interface created in the host which has a DHCP server enabled. When you switch a vm NIC to host only and start it, it gets an IP from DHCP on the host.

Have you dried disabling the host only adapter (from the host OS network settings) then re-enabling it while the vm is shut down, then restarting the vm? Have you tried to release the IP of the guest and force it to request a new one from DHCP? (Not sure how you do that in Linux - in Windows you do an ipconfig /release followed by ipconfig /renew).

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 30. May 2017, 10:15
by socratis
Here's what I think is going on. During an installation/upgrade (without an uninstallation) a second host-only adapter got created in the host (VirtualBox Host-Only Ethernet Adapter #2).

In the VirtualBox.xml file a second entry for that adapter got registered, so now you have two DHCP servers giving addresses. In the same range, with overlapping ranges:

Code: Select all

VBoxManage list dhcpservers
NetworkName:    HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter
NetworkName:    HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2
I'm not sure if they're both active at the same time, but I can see a potential conflict there...

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 30. May 2017, 10:33
by Immancy
socratis wrote:Here's what I think is going on. During an installation/upgrade (without an uninstallation) a second host-only adapter got created in the host (VirtualBox Host-Only Ethernet Adapter #2).
I agree with you, very first time, i did the installation without uninstalling the previous software, How can i get rid of this conflict now?

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 30. May 2017, 10:45
by socratis
It's kind of complicated, but not really at the same time:
  1. Go through each and every network adapter in each and every VM that you have available. If there's a "HostOnly" adapter, change it to "None".
  2. Go to the VirtualBox preferences and delete the HostOnly network.
  3. Uninstall VirtualBox. Reboot and go in the Device Manager, search the web for how to remove inactive devices. Search foe "DeviceCleanup" by Uwe Sieber. Delete your "VirtualBox.xml" (you could skip that, but I don't know your level of expertise). Any custom settings that you had in VirtualBox, will be gone. Actually, renaming it might be a better idea after all...
  4. Reboot. Install VirtualBox as described earlier.
  5. Create a HostOnly network. Hopefully, if everything is done correctly, you won't have two of them.
  6. Add all your VMs back to the VirtualBox Manager, either from the menu, or by double-clicking on each VM's .vbox file.
  7. Re-create a HostOnly network. Go to each VM that had its HostOnly adapter changed to None, and change it back to HostOnly.

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 30. May 2017, 11:59
by Immancy
I followed the step as instructed i'm still seeing the same problem.
VirtualBox.xml at the beginning after installation had no dhcp servers.
As soon as i added the host only, it created 2 DHCP servers by default.
I'm not sure, where its fetching the first adapter from, since i used the device cleaner as suggested to delete the unused devices.

Code: Select all

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
I have been using VB for the last 3 years, but never had any issues before so I didn't touch any of the configuration until i had this problem.
I'm a newbie in changing these settings.

Re: DHCP is not enabled for "VirtualBox Host-Only Network"

Posted: 31. May 2017, 06:21
by socratis
I need two things:
  1. Create a new VM. Use a Linux LiveCD but change the network card from NAT (the default) to HostOnly. Does the guest get an address?
  2. I would still need to see that "VirtualBox.xml" file please.