virtualbox's virtual machine start on boot
i'm looking for a way for a server to start a virtual machine using virtual box on boot?
the host PC boots up and once it's finished booting it then starts a virtual machine running inside of virtualbox.
I'm using virtual box too, but the server is running on Windows :(
Never than less, starting an application on boot is pretty simple:
First: Do you have to start the VBox as root? If not, you should create a new user that is used by the process running VBox. You can disable the user.
Second: Create a shell script that can starts and stop the VBox, based on a parameter value start/stop. Test is as vbox user. If it works, no problem
Third: add a script as root into /etc/init.d that runs the vbox user script as vbox user (usually su - vbox -c /home/vbox/vboxcrtl start on $1=start and similar when stop). Test this script as root. It should now start and stop the VM based on the parameter
Fourth: add two links with name S21VBoxVM and K21VBoxVM to /etc/init.d/rc5.d pointing to your script in /etc/init.d
Restart your system and vola it should work
|All times are GMT -5. The time now is 11:45 PM.|