I was working on a old version of VirtualBox (3.2.6) in which I can edit /etc/sysconfig/vbox, there I can add as many VM to start when the host boots up.Now on the this new version 4.2.6 can't edit that file because it's no longer supported. Checking on the forum I found something but I does not work.cat /etc/default/virtualbox# /etc/default/virtualbox## -------------------------------------------------------------------------------------------------# In the SHUTDOWN_USERS list all users for which a check for runnings VMs should be done during# shutdown of vboxdrv resp. the server:# SHUTDOWN_USERS=foo bar## Set SHUTDOWN to one of poweroff, acpibutton or savestate depending on which of the# shutdown methods for running VMs are wanted:# SHUTDOWN=poweroff# SHUTDOWN=acpibutton# SHUTDOWN=savestate# -------------------------------------------------------------------------------------------------##SHUTDOWN_USERS=foo bar#SHUTDOWN=savestateVBOXAUTOSTART_DB=/etc/vbox#VBOXAUTOSTART_CONFIG=/etc/vbox/vbox.cfgVBOXAUTOSTART_CONFIG=/etc/vbox/vboxauto.confthis is vboxauto.conf:cat /etc/vbox/vboxauto.conf# Default policy is to deny starting a VM, the other option is allow.default_policy = denyroot = {    allow = true}then I do this:VBoxManage setproperty autostartdbpath /etc/vboxand thisVBoxManage modifyvm <the_machine> --autostart-enabled onwhen i try to look at the status rcvboxes statusVirtualbox machines: no virtual machines running.                                                                                                                       skippedvboxes.service - LSB: Autostart Virtual Box VMs          Loaded: loaded (/etc/init.d/vboxes)          Active: active (exited) since Tue, 2013-02-05 23:34:57 UYST; 32min ago         Process: 30764 ExecStart=/etc/init.d/vboxes start (code=exited, status=0/SUCCESS)          CGroup: name=systemd:/system/vboxes.serviceFeb 05 23:34:57 my.machine vboxes[30764]: Starting Virtualbox machines: no virtual machines configured..unusedFeb 05 23:34:57 my.machine systemd[1]: Started LSB: Autostart Virtual Box VMs.why won't VirtualBox see my virtual machines to leave them headless?Edit 30 - mayI did configure it in /etc/sysconfig/vbox, but get this when I run it under init.d/etc/init.d/vboxes statusVirtualbox machines: no virtual machines running.                    skippedvboxes.service - LSB: Autostart Virtual Box VMs          Loaded: loaded (/etc/init.d/vboxes)          Active: inactive (dead) since Sat, 2013-02-02 22:00:49 UYST; 1 day and 21h ago         Process: 4155 ExecStop=/etc/init.d/vboxes stop (code=exited, status=0/SUCCESS)         Process: 3955 ExecStart=/etc/init.d/vboxes start (code=exited, status=0/SUCCESS)          CGroup: name=systemd:/system/vboxes.serviceI did a small test and move the script to /root/bin an it worked just fine../vboxes_test status test (user: root):                                       running (since 2013-02-04 21:55:46)                                                        running test (user: root):                                       running (since 2013-02-04 21:55:46)small edit:So far this is what I was talking about.... anyway did the old configuration (add the vm in /etc/sysconfig/vbox) and now then I reboot the host the vms also do that. The thing is I don want the vms to reboot when I poweroff the host: t*he vms must do savestate before the host shutdown*. small_coment:If I previous do a savestate and the reboot the host.. the vms do work as I wanted...Is there any info to make it work?
Do savestate before power off host (Virtualbox/OpenSUSE)
opensuse;virtualbox
I think the command you're looking for is this:VBoxManage modifyvm <Machine Name> --autostop-type savestateThe following are alternatives to savestate: [disabled|savestate|poweroff|acpishutdown].If that doesn't work I believe you can use the acpishutdown option to configure the VM so that when it receives the trigger to acpishutdown to savestate as well.If the above doesn't work there is always manually doing the savestates yourself using this command:VBoxManage controlvm <vm> savestateAnd then rebooting the host system.ReferencesInstalling VirtualBox on our Linux ClientsHow To Set Your VirtualBox 4.2 VM to Automatically StartupVirtualbox 4.2 VM autostart on Debian SqueezeStart VMs at boot (new in 4.2.0)