Sheduling VMs to auto-start auto-close with Win8

Discussions related to using VirtualBox on Windows hosts.
Post Reply
r0k
Posts: 6
Joined: 18. Jan 2013, 19:34
Primary OS: MS Windows 8
VBox Version: OSE other
Guest OSses: Ubuntu

Sheduling VMs to auto-start auto-close with Win8

Post by r0k »

Hi, either there is nothing on the subject, or the search engine is currently out of use as searching for sched* gives 0 results :?

What's the best way to have a VM automatically start (preferably in seamless mode) when i boot my computer, and save it's state when i shut down?
  • For starting, it seems easy enough : i've put this in the task scheduler with an "at session opening" trigger.

    Code: Select all

    C:\VirtualBox\VirtualBox.exe --startvm <UUID>
    Now, maybe there is a better way to do this, if so i'd be glad to know it. Also, are there specific options to set in the task parameters?
  • My main issue is for shutdown. I was thinking of using

    Code: Select all

    VBoxManage controlvm <vm> savestate
    However, there is neither an "at session close" or "at shutdown" trigger in task sheduler. There is a "session disconnected" but it seems to be made for remote sessions more than local ones. There is also the possibility to trigger based on a log event, but i don't know whether there is a log event recorded when i choose to "shut-down".
    Also, i need to be sure the CPU doesn't actually shut-down before the save is complete and I'm note sure if there is something special to do.
Most of the time, i was happy to put shortcuts in the startup programms folder so i never paid to much attention to the task scheduler but obviously the startup programs won't help me for a shutdown task.
Post Reply