IncludeOS
IncludeOS copied to clipboard
IncludeOS/VirtualBox - DHCP timeout
Trying to run an IncludeOS/acorn image on Virtualbox DHCP is timing out so an unusable static ip is assigned, see below.
Host is running Fedora27, VirtualBox 5.1.30.
Network adaptor was configured as Host-only adapter / vboxnet0.
VBoxNet DHCP is running on vboxnet0.
mjb 14069 13886 0 10:03 ? 00:00:00 /usr/lib/virtualbox/VBoxNetDHCP --ip-address 192.168.56.100 --lower-ip 192.168.56.101 --mac-address 08:00:27:14:74:70 --netmask 255.255.255.0 --network HostInterfaceNetworking-vboxnet0 --trunk-name vboxnet0 --trunk-type netflt --upper-ip 192.168.56.254
Console output shows DHCP is timeing out:
[ Network configure ] Configuring network
[ Network ] Creating stack for VirtioNet on eth0
[ Inet4 ] Bringing up eth0 on CPU 0
[ Inet4 ] Negotiating DHCP (10.0s timeout)...
[ Network configure ] Configuration complete
[ Autoconf ] Finished
================================================================================
IncludeOS v0.11.0-rc.2 (x86_64 / 64-bit)
+--> Running [ Acorn Web Appliance ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ DHCPv4 ] Negotiation timed out (eth0)
[ Network configure ] DHCP timeout (eth0) - falling back to static configuration
[ Inet4 ] Network configured
IP: 10.0.0.42
Netmask: 255.255.255.0
Gateway: 10.0.0.1
DNS Server: 10.0.0.1
[ Memdisk ] Initializing
[ FAT ] Initializing FAT12 filesystem
[ofs=0 size=1380 (706560 bytes)]
Tested with e1000 driver (Intel PRO/1000 MT Server) and both NAT and Host-only networks are working fine for me. Does time out with VirtioNet for me.
Tried the same image on VirtualBox (macOS). Works fine with e1000 driver, but times out on VirtioNet.
After more investigation it seems like some things aren't supported with virtionet in VirtualBox
[ Virtio ] Attaching to PCI addr 0x18
[x] Vendor ID is VIRTIO
[x] Device ID 0x1000 is in a valid range (Virtio LEGACY)
[x] Device Revision ID (0x0) supported
| |- BAR I/O @ 0xd020, size 32
[x] Unit has valid I/O base (0xd020)
[*] Reset device
[ ] No MSI-X vectors
[x] Unit has legacy IRQ 9
Enabled redirected entry 9 ioapic 0 -> 9 on apic 0
[ Virtio ] Initialization complete
[ VirtioNet ] Driver initializing
[x] Negotiated needed features
[x] Negotiated wanted features
[x] Device handles packets w. partial checksum
[x] Guest handles packets w. partial checksum
[x] There's a control queue
[ ] Queue can handle any header/data layout
[ ] We can use indirect descriptors
[ ] There's a Ring Event Index to use
[ ] There are multiple queue pairs
[x] Merge RX buffers
[x] RX queue (256) assigned (0x5f6000) to device
[x] TX queue (256) assigned (0x5fa000) to device
[x] CTRL queue (16) assigned (0x5fe000) to device
[ VirtioNet ] Adding 128 receive buffers of size 2048
[x] Valid Mac address: 08:00:27:5f:88:6a
[x] Signalled driver OK
[x] Link up
|
o
VirtioNet::legacy_handler()
isn't being called. Proof (in VirtioNet constructor):
Timers::periodic(3s, 1ms, [this](auto){
this->legacy_handler();
});
This makes the network working (DHCP resolution, demo_service TCP works etc).