[PC-BSD Testing] VBox and PCBSD 8.1

M. Warner Losh imp at bsdimp.com
Tue Sep 28 08:36:46 PDT 2010


In message: <201009280734.30915.josh at tcbug.org>
            Josh Paetzel <josh at tcbug.org> writes:
: On Tuesday, September 28, 2010 01:02:44 am M. Warner Losh wrote:
: > In message: <201009280748.35992.jhugo at meraka.csir.co.za>
: > 
: >             Johann Hugo <jhugo at meraka.csir.co.za> writes:
: > : According to the http://wiki.freebsd.org/VirtualBox page the bridging
: > : modules should be loaded from some scrip after the kernel has booted.
: > : 
: > : At the moment I do a kldload vboxnetflt vboxnetadp manually, but I was
: > : wondering if PCBSD could load them automatically if one installed the
: > : virtualbox pbi.
: > 
: > I have VirtualBox on my FreeBSD (not PC-BSD boxes).  I have the
: > following changes:
: > 
: > /etc/rc.conf:
: > 
: > vboxnet_enable=YES
: > 
: > /boot/loader.conf:
: > 
: > vboxdrv_load=YES
: > 
: > and I have a bridging virtual machine that pops up on my local
: > network.  I have virtualbox-ose-3.1.8 and virtualbox-ose-kmod-3.1.8
: > installed on this box.  I've not tried newer versions.  I'd try the
: > above settings, and if that fails, see if you can snag an older
: > version somehow.
: > 
: > I've not installed virtual box on any of my PC-BSD boxes, so I can't
: > comment about that.
: > 
: > Warner
: 
: The PBI doesn't install any sort of startup script that can read the rc.conf 
: entry.  Do your FreeBSD systems have one?

/usr/local/etc/vboxnet gets installed, the meat of which is:

vboxnet_start()
{
        if ! kldstat -q -m ng_vboxnetflt;
        then
                if ! kldload vboxnetflt > /dev/null 2>&1;
                then
                        warn "Can't load vboxnetflt module."
                        return 1
                fi
        fi

        if ! kldstat -q -m vboxnetadp;
        then
                if ! kldload vboxnetadp > /dev/null 2>&1;
                then
                        warn "Can't load vboxnetadp module."
                        return 1
                fi
        fi
}

Warner


More information about the Testing mailing list