The thing is I happen to have a monitor near me where I can watch my server boot and at boot it never makes it to the login prompt. It is just staying at right after it runs my Upstart Job.

VRDE server is listening on port 9000
* Start CUPS     [OK]
* Start Samba    [OK]
* Stopping Samba [OK]

Here is the script and how I made it

# Start VirtualBox @boot 
# Script = /etc/init.d/StartVM

#Edit these variables!

start on filesystem and static-network-up
stop on runlevel [016]

sudo -u $VMUSER VBoxHeadless --startvm $VMNAME

I created it via:

sudo nano /etc/init.d/StartVM

sudo chmod +x /etc/init.d/StartVM

sudo update-rc.d StartVM defaults 99 01
  • I should mention that the script also causes my reboot command to fail, but thats kinda a seperate thread, tho I am sure its related, I got the idea, but It needs some fine tuning, I think the problem lies in the command at the end of the script and perhaps the start/stop and or defaults # # – FreeSoftwareServers Oct 24 '15 at 2:01

Changed the last line to >>

sudo -u $VMUSER VBoxHeadless --startvm $VMNAME &

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.