LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Have to issue /etc/rc.d/rc.vboxdrv start every time I start virtual machine (https://www.linuxquestions.org/questions/slackware-14/have-to-issue-etc-rc-d-rc-vboxdrv-start-every-time-i-start-virtual-machine-4175458905/)

lihongwu 04-20-2013 11:06 AM

Have to issue /etc/rc.d/rc.vboxdrv start every time I start virtual machine
 
I have set the executable bit for /etc/rc.d/rc.vboxdrv. But every time I start virtual machine, I have to start the service first. Or VirtualBox would give a message saying it failed to open a session for the virtual machine and that my kernel driver was not installed.

I am using -current and virtualbox 4.2.10 in the slackbuilds.

Would someone help me fix this? thanks.

kite 04-20-2013 11:18 AM

Put a line "sh /etc/rc.d/rc.vboxdrv start" into /etc/rc.d/rc.local

mrclisdue 04-20-2013 11:23 AM

Did you do this?

from the README.SLACKWARE included with the slackbuild;

Code:


You'll need to add the following lines to /etc/rc.d/rc.local:

        # Start vboxdrv
        if [ -x /etc/rc.d/rc.vboxdrv ]; then
          /etc/rc.d/rc.vboxdrv start
        fi

This will load the support kernel module for VirtualBox.


You'll then need to add the following lines to /etc/rc.d/rc.local_shutdown:

        # Stop vboxdrv
        if [ -x /etc/rc.d/rc.vboxdrv ]; then
          /etc/rc.d/rc.vboxdrv stop
        fi

cheers,

Woodsman 04-20-2013 12:51 PM

For years I have had the following in my rc.local:

Code:

  # Is this box providing virtualbox host services?
  # VirtualBox driver.
  if [ -x /etc/rc.d/rc.vboxdrv ] && [ ! -e /lib/modules/`uname -r`/misc/vboxadd.ko ]; then
    if [ -e /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then
      /etc/rc.d/rc.vboxdrv start
    else
      /etc/rc.d/rc.vboxdrv setup
    fi
  fi
  # VirtualBox network.
  if [ -x /etc/rc.d/rc.vboxnet ] && [ ! -e /lib/modules/`uname -r`/misc/vboxadd.ko ]; then
    /etc/rc.d/rc.vboxnet start
  fi


lihongwu 04-21-2013 12:04 AM

Thank you all for the informative post. Problem solved by adding specific commands to /etc/rc.d/rc.local :-)


All times are GMT -5. The time now is 05:45 PM.