VirtualBox guests that use the vboxnet0 host-only network fail to start when the underlying host has no default route. Fix: To work around this bug, set a bogus default route: # route add default 127.0.0.1 With this, there is no error pop-up, and the guests starts normally. Also, the name "vboxnet0" appears again in the network settings dialog for the guest. Of course the default route disappears after my laptop has had connectivity at a hotspot or via (ugh) dialup. Having to set back the bogus route is an annoyance. How-To-Repeat: Take a machine that has no network connectivity, like my road warrior laptop. Or take a networked machine and remove its default route(s). # route delete default # netstat -nr | grep default I can reproduce the problem below on machines with ip forwarding on or off; with IPv6 off; and with the VirtualBox DHCPServer enabled or disabled. On both machines and I have single-cpu guest configurations for Linux and Windows that use vboxnet0 host-only networking. Starting any of these guest machines results in an error pop-up window. Note the "NetworkAttachmentType_HostOnly: FindByName failed" error record in the logfile below. It suggests that VirtualBox was unable to find the vboxnet0 host-only interface. Also, in the network settings dialog for the guest, the name "vboxnet0" is changed into "Not selected". This is consistent with the "interface not found" error. Logfile: 00:00:00.510 VirtualBox 3.1.2_OSE r56127 freebsd.x86 (Feb 6 2010 17:17:00) release log 00:00:00.510 Log opened 2010-02-25T22:03:15.370623000Z 00:00:00.510 OS Product: FreeBSD 00:00:00.510 OS Release: 8.0-RC1 00:00:00.510 OS Version: FreeBSD 8.0-RC1 #0: Sun Dec 6 12:26:36 EST 2009 wietse@tail.porcupine.org:/usr/src/sys/i386/compile/D10 00:00:00.510 Host RAM: 3054MB RAM, available: 2633MB 00:00:00.510 Executable: /usr/local/lib/virtualbox/VirtualBox 00:00:00.510 Process ID: 2427 00:00:00.510 Package type: BSD_32BITS_GENERIC (OSE) 00:00:00.516 Your keyboard type does not appear to be known to VirtualBox. If 00:00:00.516 you would like to help us improve the product, please submit a bug 00:00:00.516 report, attach this logfile and provide information about what type 00:00:00.516 of keyboard you have and whether you are using a remote X server or 00:00:00.516 something similar. 00:00:00.516 00:00:00.516 The tables for your keyboard are: 00:00:00.516 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 00:00:00.516 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 00:00:00.516 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 00:00:00.516 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 00:00:00.516 0x38, 0x39, 0x11d, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x145, 0x46, 0x47, 00:00:00.517 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x0, 0x138, 0x56, 0x57, 00:00:00.517 0x58, 0x147, 0x148, 0x149, 0x14b, 0x0, 0x14d, 0x14f, 0x150, 0x151, 0x152, 0x153, 0x11c, 0x11d, 0x45, 0x137, 00:00:00.517 0x135, 0x138, 0x0, 0x15b, 0x15c, 0x15d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x138, 0x0, 0x0, 0x0, 00:00:00.517 0x0, 0x16d, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 00:00:00.517 0x110, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15f, 0x0, 0x0, 0x119, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 00:00:00.517 0x120, 0x0, 0x122, 0x0, 0x124, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12e, 0x0, 00:00:00.517 0x130, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 00:00:00.517 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 00:00:00.517 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x15e, 0x0, 00:00:00.517 0x0, 0x0, 0x0, 0x163, 0x0, 0x165, 0x166, 0x167, 0x168, 0x169, 0x16a, 0x16b, 0x16c, 0x16d, 0x0, 0x0, 00:00:00.517 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 00:00:00.517 and 00:00:00.517 NULL, 0x25, 0x32, 0x0, 0x17, 0x9, 0x24, 0x62, 0x68, 00:00:00.517 0x64, 0x66, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a 00:00:00.520 SUP: Loaded VMMR0.r0 (/usr/local/lib/virtualbox/VMMR0.r0) at 0xc8541060 - ModuleInit at 00000000c85553d0 and ModuleTerm at 00000000c8555390 00:00:00.520 SUP: VMMR0EntryEx located at 00000000c8555260, VMMR0EntryFast at 00000000c8555450 and VMMR0EntryInt at 00000000c85544c0 00:00:00.546 NetworkAttachmentType_HostOnly: COMGETTER(HostInterface): vboxnet0 00:00:00.546 NetworkAttachmentType_HostOnly: FindByName failed, rc (0x80004005) 00:00:00.546 VMSetError: /usr/ports/emulators/virtualbox-ose/work/VirtualBox-3.1.2_OSE/src/VBox/Main/ConsoleImpl2.cpp(2684) static int Console::configNetwork(Console*, const char*, unsigned int, unsigned int, INetworkAdapter*, CFGMNODE*, CFGMNODE*, CFGMNODE*, bool) 00:00:00.546 VMSetError: Inexistent host networking interface, name 'vboxnet0' 00:00:00.548 VMSetError: /usr/ports/emulators/virtualbox-ose/work/VirtualBox-3.1.2_OSE/src/VBox/VMM/VM.cpp(323) int VMR3Create(uint32_t, void (*)(VM*, void*, int, const char*, unsigned int, const char*, const char*, char*), void*, int (*)(VM*, void*), void*, VM**) 00:00:00.548 VMSetError: Unknown error creating VM 00:00:00.548 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={6375231a-c17c-464b-92cb-ae9e128d71c3} aComponent={Console} aText={Inexistent host networking interface, name 'vboxnet0' (VERR_INTERNAL_ERROR). 00:00:00.548 Unknown error creating VM (VERR_INTERNAL_ERROR)} aWarning=false, preserve=false 00:00:00.551 Power up failed (vrc=VERR_INTERNAL_ERROR, rc=NS_ERROR_FAILURE (0X80004005))
Responsible Changed From-To: freebsd-ports-bugs->vbox Over to maintainer(s).
Please try the attached patch. Basically, what is happening is that the code to load the network interfaces aborts if there is no default route interface. What it should do instead is continue to enumerate the available Ethernet devices. I double-checked the linux and solaris code and that is how they behave as well (they don't give up if they can't find the default interface). Cheers. Mike
I'm resending the patch for two reasons: 1. The previous patch was incomplete 2. I think the bug-tracker rejected it because it wasn't: text/plain So I'm resending the correct patch.... Please try the attached patch. Basically, what is happening is that the code to load the network interfaces aborts if there is no default route interface. What it should do instead is continue to enumerate the available Ethernet devices. I double-checked the linux and solaris code and that is how they behave as well (they don't give up if they can't find the default interface). Cheers. Mike
I confirm that this fixes the problem with virtualbox-ose-3.1.6 and 3.1.2 on i386. Thanks, Wietse
beat 2010-06-29 19:01:08 UTC FreeBSD ports repository Modified files: emulators/virtualbox-ose Makefile distinfo Added files: emulators/virtualbox-ose/files extrapatch-include-iprt-string.h patch-src-VBox-Main-freebsd-NetIf-freebsd.cpp Log: - Update to 3.2.6 - Fix build on recent CURRENT - Don't abort if there is no default route interface while loading the network interfaces otherwise virtualbox can't find host-only interfaces. [1] Feature safe: yes PR: ports/144305 [1] Reported by: Wietse Venema <wietse AT porcupine.org> [1] Submitted by: mtm@ [1] Revision Changes Path 1.25 +5 -1 ports/emulators/virtualbox-ose/Makefile 1.13 +6 -6 ports/emulators/virtualbox-ose/distinfo 1.1 +10 -0 ports/emulators/virtualbox-ose/files/extrapatch-include-iprt-string.h (new) 1.1 +30 -0 ports/emulators/virtualbox-ose/files/patch-src-VBox-Main-freebsd-NetIf-freebsd.cpp (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed. Thanks!
We would like to submit your patch upstream. Could you please read the last chapter of the VirtualBox Contributor informations [1] and reply if it is okay for you that your patch is submitted under the MIT License? We will take care of everything else. [1] http://www.virtualbox.org/wiki/Contributor_information -- Bernhard Froehlich http://www.bluelife.at/
Hi Mike. We would like to submit your patch upstream. Could you please read the last chapter of the VirtualBox Contributor informations [1] and reply to the PR if it is okay for you that your patch is submitted under the MIT License? [1] http://www.virtualbox.org/wiki/Contributor_information -- Bernhard Froehlich http://www.bluelife.at/
Thanks, patch was committed upstream. http://www.virtualbox.org/changeset/35961 -- Bernhard Froehlich http://www.bluelife.at/ On Fri, 18 Feb 2011 09:40:47 +0300, Mike Telahun Makonnen wrote: > Hi Bernhard, > > Please submit my patch under the MIT license. > > Thanks, > Mike. > > On Mon, Feb 14, 2011 at 6:02 PM, Bernhard Froehlich > <decke@freebsd.org> wrote: >> Hi Mike. >> >> We would like to submit your patch upstream. Could you please read >> the last chapter of the VirtualBox Contributor informations [1] and >> reply to the PR if it is okay for you that your patch is submitted >> under the MIT License? >> >> [1] http://www.virtualbox.org/wiki/Contributor_information >> >> -- >> Bernhard Froehlich >> http://www.bluelife.at/