Opened 10 years ago
Last modified 10 years ago
#14582 new defect
Hostonlyif not fully initialized after create returns successful
Reported by: | ronwilliams | Owned by: | |
---|---|---|---|
Component: | network/hostif | Version: | VirtualBox 5.0.4 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | Windows |
Description ¶
When creating a new hostonlyif it appears that the adapter is not fully initialized when create returns success
Host OS - Windows 10 Build 10240 Virtual 5.0.4 - release and 5.0.5 102614
Example (note the garbage netmask returned)
vboxmanage hostonlyif create && vboxmanage list hostonlyifs 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interface 'VirtualBox Host-Only Ethernet Adapter #3' was successfully created Name: VirtualBox Host-Only Ethernet Adapter #3 GUID: 336f5edf-a838-43a1-a55f-7955e605ee59 DHCP: Enabled IPAddress: 192.168.56.1 NetworkMask: 15.0.0.0 IPV6Address: fe80:0000:0000:0000:384b:5e06:3257:bdb1 IPV6NetworkMaskPrefixLength: 64 HardwareAddress: 0a:00:27:00:00:00 MediumType: Ethernet Status: Up VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #3
Here's the same example with ipconfig
vboxmanage hostonlyif create && ipconfig 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interface 'VirtualBox Host-Only Ethernet Adapter #3' was successfully created Windows IP Configuration Ethernet adapter VirtualBox Host-Only Network #3: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::8d8e:d529:1359:8373%22 Default Gateway . . . . . . . . . :
If we wait ~5 seconds after creation and use list hostonlyifs we get the correct information
vboxmanage hostonlyif create && timeout 5 && vboxmanage list hostonlyifs 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interface 'VirtualBox Host-Only Ethernet Adapter #3' was successfully created Waiting for 0 seconds, press a key to continue ... Name: VirtualBox Host-Only Ethernet Adapter #3 GUID: c0b80be6-b9d2-499e-855b-b7043f26eec5 DHCP: Enabled IPAddress: 192.168.56.1 NetworkMask: 255.255.255.0 IPV6Address: fe80:0000:0000:0000:a541:cd37:5679:1f0c IPV6NetworkMaskPrefixLength: 64 HardwareAddress: 0a:00:27:00:00:00 MediumType: Ethernet Status: Up VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #3
This is big problem for tools like docker-machine,etc.
Change History (5)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Here's the output from VirtualBox 5.0.2
vboxmanage hostonlyif create && vboxmanage list hostonlyifs 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Interface 'VirtualBox Host-Only Ethernet Adapter #3' was successfully created Name: VirtualBox Host-Only Ethernet Adapter #3 GUID: 17414a7f-cd06-4b9b-a53d-545e5be07b2a DHCP: Enabled IPAddress: 192.168.56.1 NetworkMask: 255.255.255.0 IPV6Address: fe80:0000:0000:0000:1c6a:e1dc:c8cd:ab9c IPV6NetworkMaskPrefixLength: 64 HardwareAddress: 0a:00:27:00:00:00 MediumType: Ethernet Status: Up VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #3
comment:3 by , 10 years ago
Disregard the ipconfig example in my original post. But I still think we should see output consistent with what VirtualBox 5.0.2 outputs with the proper netmask. I believe that's what we were seeing with the 4.x.x series of VirtualBox.
comment:4 by , 10 years ago
comment:5 by , 10 years ago
Nice find and I know it's a it late for most folks around the world but happy belated programmers day!
Creating a network interface is one thing, setting up its network protocols is another.