DHCP server sometimes unable to assign a dynamic IP address to a host only network interface

Discussions related to using VirtualBox on Linux hosts.
Post Reply
SaveMeTenMinutes
Posts: 5
Joined: 28. Sep 2018, 03:21

DHCP server sometimes unable to assign a dynamic IP address to a host only network interface

Post by SaveMeTenMinutes »

I found several threads/bug reports (though much older) on the issue:
https://www.virtualbox.org/ticket/7905
viewtopic.php?f=6&t=37402
viewtopic.php?f=3&t=84811

The issue seems to occur at random. Roughly every other time I start the box. Worth noting (like the threads I've linked) that the NAT interface doesn't experience dynamic IP address assignment issues. I suspect that the DHCP component crashes at runtime as well because sometimes, after having been connected via SSH to the guest for awhile, the connection hangs and the interface becomes unusable.

Host:

Code: Select all

uname -a
Linux localhost.localdomain 3.10.0-862.9.1.el7.x86_64 #1 SMP Mon Jul 16 16:29:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Code: Select all

vboxmanage list hostonlyifs
Name:            vboxnet0
GUID:            786f6276-656e-4074-8000-0a0027000000
DHCP:            Disabled
IPAddress:       192.168.56.1
NetworkMask:     255.255.255.0
IPV6Address:     fe80::800:27ff:fe00:0
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:00
MediumType:      Ethernet
Wireless:        No
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0

Code: Select all

vboxmanage list dhcpservers
NetworkName:    HostInterfaceNetworking-vboxnet0
IP:             192.168.56.100
NetworkMask:    255.255.255.0
lowerIPAddress: 192.168.56.101
upperIPAddress: 192.168.56.254
Enabled:        Yes

Code: Select all

vboxmanage showvminfo centos7-i386
Name:            centos7-i386
Groups:          /
Guest OS:        Red Hat (32-bit)
UUID:            ace673ec-9a52-4415-b668-a8449151b4b7
Config file:     /home/VirtualBox/boxes/centos7-i386/centos7-i386/centos7-i386.vbox
Snapshot folder: /home/VirtualBox/boxes/centos7-i386/centos7-i386/Snapshots
Log folder:      /home/VirtualBox/boxes/centos7-i386/centos7-i386/Logs
Hardware UUID:   ace673ec-9a52-4415-b668-a8449151b4b7
Memory size:     1024MB
Page Fusion:     off
VRAM size:       16MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
PAE:             on
Long Mode:       off
Triple Fault Reset: off
APIC:            on
X2APIC:          on
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Not Assigned
Boot Device (2): HardDisk
Boot Device (3): Not Assigned
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          off
BIOS APIC mode:  APIC
Time offset:     0ms
RTC:             local time
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
Effective Paravirt. Provider: KVM
State:           running (since 2018-10-02T04:21:14.070000000)
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):            SATA Controller
Storage Controller Type (0):            IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  30
Storage Controller Port Count (0):      30
Storage Controller Bootable (0):        on
Storage Controller Name (1):            IDE Controller
Storage Controller Type (1):            PIIX4
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  2
Storage Controller Port Count (1):      2
Storage Controller Bootable (1):        on
SATA Controller (0, 0): /home/VirtualBox/boxes/centos7-i386/disks/centos7-i386.vdi (UUID: 7cbcc0e8-b24c-41f3-8b61-536615753c03)
IDE Controller (0, 0): /home/VirtualBox/iso/CentOS-7-i386-Minimal-1804---VagrantBox-SaveMeTenMinutes.iso (UUID: 434463a7-5451-4fd2-b337-9eb1471b6015)
NIC 1:           MAC: 080027CF293A, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2:           MAC: 0800271C6E7B, Attachment: Host-only Interface 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           disabled
Audio playback:  disabled
Audio capture: disabled
Clipboard Mode:  Bidirectional
Drag and drop Mode: disabled
Session name:    headless
Video mode:      720x400x0 at 0,0 enabled
VRDE:            enabled (Address 0.0.0.0, Ports 50000, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
VRDE port:       50000
Video redirection: disabled
VRDE property: TCP/Ports  = "50000"
VRDE property: TCP/Address = <not set>
VRDE property: VideoChannel/Enabled = <not set>
VRDE property: VideoChannel/Quality = <not set>
VRDE property: VideoChannel/DownscaleProtection = <not set>
VRDE property: Client/DisableDisplay = <not set>
VRDE property: Client/DisableInput = <not set>
VRDE property: Client/DisableAudio = <not set>
VRDE property: Client/DisableUSB = <not set>
VRDE property: Client/DisableClipboard = <not set>
VRDE property: Client/DisableUpstreamAudio = <not set>
VRDE property: Client/DisableRDPDR = <not set>
VRDE property: H3DRedirect/Enabled = <not set>
VRDE property: Security/Method = <not set>
VRDE property: Security/ServerCertificate = <not set>
VRDE property: Security/ServerPrivateKey = <not set>
VRDE property: Security/CACertificate = <not set>
VRDE property: Audio/RateCorrectionMode = <not set>
VRDE property: Audio/LogPath = <not set>
USB:             disabled
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:    active
Clients so far:     2
Start time:         2018/10/02 04:24:59 UTC
Sent:               1254142 Bytes
Average speed:      772 B/s
Sent total:         1254142 Bytes
Received:           74251 Bytes
Speed:              45 B/s
Received total:     74251 Bytes
User name:
Domain:
Client name:        PCPC
Client IP:          192.168.0.2
Client version:     17134
Encryption:         RDP4

Capturing:          not active
Capture audio:      not active
Capture screens:    0
Capture file:       /home/VirtualBox/boxes/centos7-i386/centos7-i386/centos7-i386.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25
Capture options:

Guest:

Configured memory balloon size:      0 MB
OS type:                             Linux26
Additions run level:                 2
Additions version:                   5.2.19 r125028


Guest Facilities:

Facility "VirtualBox Base Driver": active/running (last update: 2018/10/02 04:21:58 UTC)
Facility "VirtualBox System Service": active/running (last update: 2018/10/02 04:22:14 UTC)
Facility "Seamless Mode": not active (last update: 2018/10/02 04:21:58 UTC)
Facility "Graphics Mode": not active (last update: 2018/10/02 04:21:58 UTC)
Guest:

Code: Select all

uname -a
Linux localhost.localdomain 3.10.0.-862.11.6.el7.centos.plus.1.i686 #1 SMP Mon Aug 20 14:00:28 UTC 2018 i686 i686 i386 GNU/Linux

Code: Select all

nmcli device connect enp0s8
Error: Connection activation failed: (5) IP configuration could not be reserved (no available address, timeout, etc.).
Last edited by socratis on 2. Oct 2018, 10:48, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
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 server sometimes unable to assign a dynamic IP address to a host only network interface

Post by socratis »

The threads that you quoted are 1) ancient and 2) mostly resolved.

There is a bug in the output of "VBoxManage list hostonlyifs" where the DHCP server is always shown as "Disabled", even though it's not. Can you make sure that this is indeed the case? Or even better, can you post the VirtualBox.xml file (ZIPPED)? It should be in your "/home/<you>/.VirtualBox" directory.

We're also going to need to see a complete VM log, from a complete VM run:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe error / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
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.
Post Reply