Create a text file with .bat extension containing the following line. Let's call it autostart_oracle_vm.bat
C:\Program Files\Oracle\VirtualBox\vboxheadless.exe --startvm MYVM
Now create a text file with the extension .vbs with following content, let's call this autostart_oracle_vm.vbs
Set oShell = CreateObject ("Wscript.Shell")
Dim strArgs
strArgs = "cmd /c D:\autostart_oracle_vm.bat"
oShell.Run strArgs, 0, false
Now add a short-cut to autostart_oracle_vm.vbs in the following location
C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
..and that's it. You're all set. Enjoy your auto-starting VM.
Sources:
https://blogs.oracle.com/danielc/entry/autostarting_a_virtualbox_vm_headless
http://superuser.com/questions/140047/how-to-run-a-batch-file-without-launching-a-command-window
Sources:
https://blogs.oracle.com/danielc/entry/autostarting_a_virtualbox_vm_headless
http://superuser.com/questions/140047/how-to-run-a-batch-file-without-launching-a-command-window