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:

  1. Identify your virtual machine name
  2. Create a task in Task Scheduler

1. Identify your virtual machine name

Navigate to C:\Users\YourUserNameHere\VirtualBox VMs

VirtualBox VMs Folder

The folder name above generally reflects the virtual machine name. You can confirm this by checking VirtualBox Manager itself:

VirtualBox GUI

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:

Task Scheduler Search

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...:

Task Scheduler 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):

Name New Folder

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...:

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:

Create Task: General

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:

New Trigger

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:

Browse to VBoxManage

Copy everything except the executable and the quotation marks from Program/script: into Start in (optional)::

Copy Directory Path

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

Enter Arguments

My Conditions tab is generally set to the following:

Conditions Tab

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:

Settings Tab

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:

Running VM

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):

Task Scheduler Success

One thought on “Configure Virtualbox VM to autostart after Windows reboot?

  1. 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

Leave a Reply

Your email address will not be published. Required fields are marked *

RELATED POST

How to Create a PowerShell Scheduled Task with Error SecurityError PSSecurityException FullyQualifiedErrorId

Use Task Scheduler to Run a PowerShell Script The first option that we are going to look at is using…

Delete All Files Older than x Days using PowerShell

How to Delete Older Files Using PowerShell? Deleting unnecessary files is important for keeping your computer and storage running smoothly.…

Managing IIS Log File Storage Windows Server 2012-2016-2019

Overview The log files that IIS generates can, over time, consume a large amount of disk space. Logs can potentially…

Outlook keeps displaying error: Contact the server for information

What version of Outlook are you using? See What version of Outlook do I have? (microsoft.com). What were you trying…