Autostart issues

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Marko73
Posts: 39
Joined: 28. Jun 2010, 13:42
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, Debian, CentOS, Windows 7 x64

Autostart issues

Post by Marko73 »

Hello all!

I've been trying to get autostart working in VirtualBox but I'm running into problems. I'm having the same issues as described at https://www.virtualbox.org/ticket/12812 - I've created all files in that tutorial, set permissions and the autostartdb path. I run VMs as vboxuser, and I've altered the config files accordingly. Interestingly, if I run 'VBoxManage modifyvm "Ubuntu Server Machine" --autostart-enabled on', no vboxuser.start file is created in /etc/vbox, but if I run 'VBoxManage modifyvm "Ubuntu Server Machine" --autostop-type savestate' then a vboxuser.stop~ file is created. Needless to say, no VMs start when the host boots or when I run 'service vboxautostart-service start'. I'm running Debian Jessie, which has systemd rather than init as the virtualbox help file assumes, but I suspect this should not affect the creation of .start and .stop files.

I've searched the forums here and googled as well, but it looks like this unfortunately just isn't going to work for me - and I'm by no means alone in this - so now I'm looking for something else: can anyone offer me a solution that doesn't use autostart, and lets me start virtual machines when the host starts up, and saves their state or shuts them down when the host shuts down?

As an absolute last resort, I could install Windows 7 on the host and run VBoxHeadless, which is what I used to do, but I'm trying to keep my server PC on linux if possible.

Brief system specs:
Linux zeus 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u5 (2015-10-09) x86_64 GNU/Linux
Asrock Q1900-ITX mobo with Intel J1900 CPU, 8GB RAM
VirtualBox 5.0.10-104061

Thanks for reading.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Autostart issues

Post by Perryg »

I'm running Debian Jessie, which has systemd rather than init as the virtualbox help file assumes, but I suspect this should not affect the creation of .start and .stop files.
I disagree. I think it has everything to do with it and you should raise a ticket about it at bugtracker.
Oh and be sure to attach the proper log files and scripts you use.
Marko73
Posts: 39
Joined: 28. Jun 2010, 13:42
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, Debian, CentOS, Windows 7 x64

Re: Autostart issues

Post by Marko73 »

I fail to see the point of raising a new ticket when both the fault symptoms and my config files are identical to the ones in the previous noted bug report, save for the username I'm using, not to mention the fact that the previous ticket was completely ignored. Also, when this fails, it does so without logging anything as far as I can tell - the files in the virtual machine's log directory have not changed at all since the last time I ran the machine from the GUI, there's no VirtualBox-related directory under the user's home dir, and there's nothing in syslog. BTW, the command 'VBoxManage modifyvm "Ubuntu Server Machine" --autostop-type savestate' also fails silently now, although I haven't changed a thing since my previous post.

I don't agree that this is a new bug at all, and I have nothing useful from any log files or scripts to add over what's already been added. Therefore I'm still looking for an alternative way to launch and shutdown these virtual machines.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Autostart issues

Post by Perryg »

As you wish.
Marko73
Posts: 39
Joined: 28. Jun 2010, 13:42
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, Debian, CentOS, Windows 7 x64

Re: Autostart issues

Post by Marko73 »

I've been able to fix this now by writing my own init.d script (although it uses systemd, debian can still run init scripts for now) and a small python script to go with it. I won't post it here unless someone specifically asks for it, as it's more or less tailored for my own setup, and would need some modifying to be of use to anyone else. Plus my code's a bit messy :)
_sly_
Posts: 3
Joined: 1. May 2016, 15:07

Re: Autostart issues

Post by _sly_ »

Hi,

A bit late, but this thread pops up with some google searches, so hope it might help :

The creation of /etc/vbox/vbox.st(art|op) files isn't working for me either with --autostart-enabled on but it used to, with other version/OSes I don't remember.

However, working that around is very easy, just create the files yourself with simply a "1" in it :

Code: Select all

echo 1 > /etc/vbox/vbox.start
echo 1 > /etc/vbox/vbox.stop
Post Reply