
Step 1: Access the Startup Folder
Navigate to the Windows startup folder where files or shortcuts can be placed to run programs automatically when your Windows user account loads. The path may vary depending on your user profile, but a common location is:
C\Users\<YourUsername>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Replace <YourUsername>
with your actual Windows username.
You can also click the start menu, type the word run, press enter and type shell:startup in to the promt, press enter again and you should be in the startup folder
Step 2: Create a Batch File
Inside the Startup folder, create a new text file by right-clicking and selecting “New” > “Text Document.” Rename the text file to something descriptive with a .bat extension, like “VMStartup.bat.” Ensure the file type changes to a .bat file.
Step 3: Edit the Batch File
Open the newly created .bat file (e.g., VMStartup.bat) with Notepad or any text editor. Add the following line to the file:
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm "NameOfYourVM" --type "headless"
Replace “NameOfYourVM” with the actual name of your VirtualBox virtual machine that you want to start automatically. The –type “headless” portion of the command ensures that the VM starts in the background and won’t get in the way of your work, can still access it through Virtualbox the normal way to bring it to the foreground.
Save the changes and close the text editor.
Now, your specified VirtualBox virtual machine will start automatically in headless mode whenever you log in to your Windows user account, providing a convenient way to manage and access your VMs.
Leave a Reply