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 ..
Specify the name of our task, for example, test or staffcop
Select in which period or at which event the task will be executed, choose - When the computer starts
Action - Start a program
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
Click Finish
After that, when we restart the system, we will automatically start a virtual machine with the name “Staffcop”.