#!/bin/sh
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local startup commands in here. Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.
# Start vboxdrv
if [-x /etc/rc.d/rc.vboxdrv]; then
/etc/rc.d/rc.vboxdrv start
fi
# Start vboxnet
if [-x /etc/rc.d/rc.vboxnet]; then
/etc/rc.d/rc.vboxnet start
fi
Create /etc/rc.d/rc.local_shutdown and add the script below.
# Stop vboxdrv if [-x /etc/rc.d/rc.vboxdrv]; then /etc/rc.d/rc.vboxdrv stop fi # Stop vboxnet if [-x /etc/rc.d/rc.vboxnet]; then /etc/rc.d/rc.vboxnet stop fi
chmod 755 /etc/rc.d/rc.local_shutdown
The Virtualbox need a group owner vboxusers. So create vboxusers group:
groupadd -g 103 vboxusers
Add user to the group:
usermod -G packager, vboxusers luzar
groups luzar