Configure Virtualbox VM to autostart after Windows reboot?
his requires a couple of pretty easy steps, but I will explain them in detail to ensure anyone from any technical background can set this up:
- Identify your virtual machine name
- Create a task in Task Scheduler
1. Identify your virtual machine name
Navigate to C:\Users\YourUserNameHere\VirtualBox VMs
The folder name above generally reflects the virtual machine name. You can confirm this by checking VirtualBox Manager itself:
The machine name is WindowsXPSP3
.
2. Create a task in Task Scheduler
First click the start button and type “task scheduler” without the quotes. Then open the Task Scheduler:
Inside the task scheduler, we’re going to see a structure tree on the left side. Right-click on Task Scheduler Library
. Left-click on New Folder...
:
Name the folder something memorable, like User Custom
and hit OK (if you already have an existing folder that you would prefer to use, that’s fine as well, skip to the next paragraph instead):
Click your newly created folder, in my case User Custom
, to highlight it. Right-click in the empty list to the right and Left-click on Create New Task...
:
Now comes the tricky stuff. Follow my instructions verbatim. If you feel like downvoting because it didn’t work, or say “this didn’t work for me” in the comments, I’m betting you skipped a step here. Come back and try it again.
The Name
and Description
can be whatever you like, it is merely aesthetic and will not affect functionality. I’m going to name mine after my virtual machine and put a brief description. What IS important is that you choose Run whether user is logged on or not
and Run with highest privileges
:
Switch to the Triggers
tab at the top and Left-click New...
. Switch the Begin the task:
combination box to At Startup
and then Left-click OK:
Switch to the Actions
tab at the top and Left-click New...
. Click browse (do not try to type this manually, you will cause yourself headaches) and navigate to C:\Program Files\Oracle\VirtualBox
. Highlight VBoxManage.exe
and Left-click Open
:
Copy everything except the executable and the quotation marks from Program/script:
into Start in (optional):
:
Finally, put the following line into Add arguments (optional):
and hit OK:
startvm "YourVirtualMachineNameFromStep1" --type headless
in my case, I will use:
startvm "WindowsXPSP3" --type headless
My Conditions
tab is generally set to the following:
Make sure your Settings
tab looks like the following, but absolutely ensure you have set the items marked in yellow to match mine. This will make sure that if some pre-requisite wasn’t ready yet that it will retry a few times to start the virtual machine and that the virtual machine won’t be terminated after 3 days. I would leave everything else as default unless you know what you are doing. If you don’t do what I show you here, and it ends up not working, it’s your problem:
Finally, hit OK at the bottom of the Create Task
window. You are done!
Testing the solution
Testing My Fake Scenario Above (and how you can test yours)
When I restart my computer, I can log in and open the VirtualBox Manager and see that my VM is running:
I can also open Task Scheduler back up, and verify that it ran successfully, or see what the error was if it did not (most errors will be directory errors from people trying to manually enter where I told them not to):
Thank you for the good writeup It in fact was a amusement account it Look advanced to far added agreeable from you However how could we communicate