Automatic start of the StaffСop virtual machine in VirtualBox

After installing StaffСop Server it often requires to automatically start the virtual machine when the physical server is rebooted.

This issue is solved quite easily and with the help of the functionality built into the Windows scheduler.

How to do that:

  • Open Windows Scheduler - Start - Run - Taskschd.msc or enter Windows in the Windows search bar - Taskschd.msc

  • Click the button Create basic task ..

../_images/virtualbox_autostart_1.png
  • Specify the name of our task, for example, test or staffcop

../_images/virtualbox_autostart_2.png
  • Select in which period or at which event the task will be executed, choose - When the computer starts

../_images/virtualbox_autostart_3.png
  • Action - Start a program

../_images/virtualbox_autostart_4.png
  • Then specify the launch parameters of the program, as an executable file, we specify

C:\Program Files\Oracle\VirtualBox\VBoxManage.exe

And in addition we specify command line arguments

startvm Staffcop --type headless
../_images/virtualbox_autostart_5.png
  • Click Finish

../_images/virtualbox_autostart_6.png

After that, when we restart the system, we will automatically start a virtual machine with the name “Staffcop”.