I'm new to Ubuntu/Debian (but not to linux). I'm coming from a long-time Arch linux background which eschews SysV style init scripts, so this may be a newbie question.
It also may be in the wrong forum--I apologize if that is the case. The virtual machine I am starting is Ubuntu Server, but the host (and the system for the question here) is a Ubuntu Desktop. It just seemed much more of a server type of question.
I want to start a Virtualbox virtual machine on boot. I copied /etc/init.d/skeleton and modified it to start (and stop) the virtual machine. My script works perfectly if run manually as:
/etc/init.d/homestar_vm start
I then ran update-rc.d to create the needed symlinks. Essentially I wanted to have this be the last thing to start (it certainly needs to start after all filesystems are mounted) and the first thing to shutdown.
I think that I did it correctly, giving it a priority of 99 for both cases. This has resulted in the following symlinks:
root@strongbad:/etc# find . -name "*homestar*"
./rc2.d/S99homestar_vm
./rc6.d/K99homestar_vm
./rc1.d/K99homestar_vm
./rc4.d/S99homestar_vm
./rc0.d/K99homestar_vm
./rc3.d/S99homestar_vm
./rc5.d/S99homestar_vm
./init.d/homestar_vm
My reading of the man page seems to indicate I have done things correctly, but being new to SysV init scripts I am not sure.
Do those look they will do what I want them to do.
What happens is that the virtual machine is not started. With Ubuntu Desktop the service starting messages are not displayed, and I am having trouble seeing what is going wrong. If I launch the service manually once I log in everything is fine.
Where does stdout/stderr from the init scripts get logged to (if anywhere)? The only related error messages I am seeing in /var/log/messages are some problems with the shutdown (which does appear to be running on a shutdown).
Any help would be appreciated.
Bookmarks