Start VirtualBox Guest VM Automatically in Windows

From Gejoreuy
Jump to navigation Jump to search

Step by Step

Check List of The VMs Name

C:\Users\idiksub>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" list vms
"IDKUT-V-TEST01" {2b260015-9c26-4ab8-869e-c27dd2783ef3}
"IDKUT-V-TEST02" {23d928a2-d650-4dba-967b-7374db9979ec}

Create Bat File to Start VM

Put below command into the bat file to start IDKUT-V-TEST01 and IDKUT-TEST02.
Please make sure that VMs name is case sensitive. IDKUT-V-TEST01 will be different with idkut-v-test01.

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm IDKUT-V-TEST01 --type headless
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm IDKUT-V-TEST02 --type headless

We can test this command script to start the VM. Just run it as a test in command prompt.

Put The Bat File into Windows Startup

The last, put the bat file in startup directory. Ussualy, the location is in below path. Just change [UserName] value with our real user name.

C:\Users\[Username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Test It

We can test it with rebooting our host machine. And then take a look into the guest VMs.
All guest VMs which already set in bat file to started up will be run automatically.