I am running two VirtualBox headless VMs on an Ubuntu 12.04 host. I would like these VMs to start automatically when the system boots.
I have two crontab entries set like this (under the user which owns the VMs):
@reboot /usr/bin/vboxheadless -startvm io @reboot /usr/bin/vboxheadless -startvm pbx
But it seems that doesn't do the trick. If I run the command directly from the terminal, the machines start up without a hitch, but I can't seem to get them to start once the system starts. I'm thinking maybe the crontab is running before the VirtualBox program/library is loaded.
How do I start these VMs automatically?