Automate Your VirtualBox VMs With Autostart
This guide will walk you through setting up a system service to automatically launch your desired VirtualBox VMs, saving you precious time and effort.
Configure Autostart Properties
- Create a file named
autostart.properties
in the folderC:\Users\Admin\.VirtualBox
. - Inside the file, define the following:
|
|
default_policy = deny
: This sets the default policy to deny all autostarts.Admin = { allow = true; startup_delay = 10 }
: This allows the user “Admin” to start VMs with a 10-second delay.
Set System Variable
- Create a new system variable named
VBOXAUTOSTART_CONFIG
and set its value toC:\Users\Admin\.VirtualBox\autostart.properties
.
Install the VirtualBox Autostart Service
- Navigate to the VirtualBox installation directory:
cd "C:\Program Files\Oracle\VirtualBox"
- Run the following commands:
|
|
- Replace
"virtual-pc"
with the actual name of your VM you want to autostart.
Check and Start the Service
- Use the
sc
command to check the service status:sc query VBoxAutostartSvcadmin-pcadmin
- Start the service:
sc start VirtualBox Autostart Service VBoxAutostartSvcadmin-pcadmin
Congratulations! Your VirtualBox VM is now set to autostart when your system boots.