Page 1 of 2
Added possibility to start VMs during system boot
Posted: 17. Sep 2012, 14:18
by Andrew Brehm
Has anyone got this to work on Mac OS X (Mountain Lion)?
I added org.virtualbox.vboxautostart.plist to launchctl and made sure it runs. I also created the configuration and pointed the plist to it.
I then configured a VM with vboxanage modifyvm "myvm" --autostart-enabled on and --autostop-type savestate.
But the VM neither saves its state when the host shuts down nor does it start automatically at boot.
What am I doing wrong?
(I don't mean details, like typos above, I mean am I missing an entire step?)
Re: Added possibility to start VMs during system boot
Posted: 17. Sep 2012, 14:59
by ChipMcK
Andrew Brehm wrote: and made sure it runs
You got past
Code: Select all
launchctl: Dubious ownership on file (skipping): /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist
nothing found to load
with
And same for the configuration file?
Edited: correct chmod to chown
Re: Added possibility to start VMs during system boot
Posted: 17. Sep 2012, 16:23
by Andrew Brehm
ChipMcK wrote:Andrew Brehm wrote: and made sure it runs
You got past
Code: Select all
launchctl: Dubious ownership on file (skipping): /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist
nothing found to load
with
And same for the configuration file?
Edited: correct chmod to chown
Not so much got past. I never saw that error. I think file permissions for the plist are correct. (I added several other plists for launchctl myself.)
Re: Added possibility to start VMs during system boot
Posted: 17. Sep 2012, 21:25
by Andrew Brehm
Andrew Brehm wrote:ChipMcK wrote:Andrew Brehm wrote: and made sure it runs
You got past
Code: Select all
launchctl: Dubious ownership on file (skipping): /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist
nothing found to load
with
And same for the configuration file?
Edited: correct chmod to chown
Not so much got past. I never saw that error. I think file permissions for the plist are correct. (I added several other plists for launchctl myself.)
Still doesn't work.
The autostart service is loaded.
Code: Select all
$ sudo launchctl list |grep org.virtualbox.vboxautostart
- 13 org.virtualbox.vboxautostart
And the VM is set to autostart.
$ vboxmanage showvminfo "Windows Server 2008"|grep Auto
Autostart Enabled: on
Autostart Delay: 1
However, the VM simply doesn't start.
Re: Added possibility to start VMs during system boot
Posted: 25. Sep 2012, 13:16
by Andrew Brehm
Did anyone get this to work at all?
Re: Added possibility to start VMs during system boot
Posted: 25. Sep 2012, 15:06
by ChipMcK
The
13 says an error occurred; if the process sccessfully started, the return would have been Zero
from the
man page
With no arguments, list all of the jobs loaded into launchd in three columns. The first column displays the PID of the job if it is running. The second column displays the last exit status of the job. If the number in this column is negative, it represents the negative of the signal which killed the job. Thus, "-15" would indicate that the job was terminated with SIGTERM. The third col- umn is the job’s label.
Edited to add the quote from man launchctl
Re: Added possibility to start VMs during system boot
Posted: 27. Sep 2012, 10:42
by Andrew Brehm
ChipMcK wrote:The
13 says an error occurred; if the process sccessfully started, the return would have been Zero
from the
man page
With no arguments, list all of the jobs loaded into launchd in three columns. The first column displays the PID of the job if it is running. The second column displays the last exit status of the job. If the number in this column is negative, it represents the negative of the signal which killed the job. Thus, "-15" would indicate that the job was terminated with SIGTERM. The third col- umn is the job’s label.
Edited to add the quote from man launchctl
So the service didn't start because of a broken pipe (signal 13)?
SIGPIPE 13 Term Broken pipe: write to pipe with no readers
How could that be? How did you get it to start (if you did)?
Re: Added possibility to start VMs during system boot
Posted: 27. Sep 2012, 15:15
by ChipMcK
Andrew Brehm wrote:How did you get it to start (if you did)?
I have not tried. Just pointing out what you ignored.
Update: Tried the plist on my system
Re: Added possibility to start VMs during system boot
Posted: 27. Sep 2012, 18:18
by Andrew Brehm
ChipMcK wrote:Andrew Brehm wrote:How did you get it to start (if you did)?
I have not tried. Just pointing out what you ignored.
Update: Tried the plist on my system
Interesting.
Will have to find out what pipe the thing is talking about.
Re: Added possibility to start VMs during system boot
Posted: 27. Sep 2012, 18:51
by ChipMcK
To the basic trouble shooting steps you bypassed? ? ?
Re: Added possibility to start VMs during system boot
Posted: 27. Sep 2012, 20:16
by Andrew Brehm
ChipMcK wrote:To the basic trouble shooting steps you bypassed? ? ?
What do you mean "bypassed"? I have done all the steps listed in this thread.
The problem is, as it turns out, that starting the service does an error 13. All the file permissions and settings are correct as per the things listed in this thread. That's why I wanted to know if anyone got this to work. I followed all the instructions.
Re: Added possibility to start VMs during system boot
Posted: 27. Sep 2012, 20:19
by Andrew Brehm
I don't know why it showed a 13.
It now (and I haven't changed anything) reports this:
$ sudo launchctl list |grep org.virtualbox.vboxautostart
- 0 org.virtualbox.vboxautostart
However, when this machine last booted, none of the VMs started up automatically.
Re: Added possibility to start VMs during system boot
Posted: 27. Sep 2012, 22:30
by ChipMcK
Try a google search:
virtual machines automatic startup site:forums.virtualbox.org
Also suggest checking out VirtualBox on Linux Hosts
viewforum.php?f=7
Re: Added possibility to start VMs during system boot
Posted: 28. Sep 2012, 09:15
by Andrew Brehm
ChipMcK wrote:Try a google search:
virtual machines automatic startup site:forums.virtualbox.org
Also suggest checking out VirtualBox on Linux Hosts
viewforum.php?f=7
I tried Google searches. And I also searched this forum.
Could you please just for a short moment pretend that this is not solely about my inability to use Google, follow instructions or read this forum and give me a hint what might be wrong, if you know?
Re: Added possibility to start VMs during system boot
Posted: 28. Sep 2012, 10:35
by ChipMcK
Andrew Brehm wrote:I also searched this forum.
This forum is for OS X Hosts. The feature was developed for
Linux Hosts viewforum.php?f=7 .
There are a number of posts on that forum for the feature.