Page 1 of 1

Virtual Machine Minimize

Posted: 11. Aug 2010, 11:19
by microbert
Hi,

I use virtual box every day and I wanted to make the start of the virtual machine automatically with windows startup.

I have managed to this using a batch file:
@echo off
cls
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm WinXP
@exit
Now i am trying to start it in minimize state. is this possible and what should i add to the batch file?

thanks

Re: Virtual Machine Minimize

Posted: 11. Aug 2010, 21:35
by Sasquatch
Run it when Windows starts, hmm, that can be done in two ways:
1) It doesn't matter if a user is logged on or not, the VM starts, though it's in headless mode. This means it runs as a service or otherwise (e.g. using GPO).
2) Run the VM when a user logs on. This is the easiest of them all, as you can actually see the the GUI and interact with it when you want to. To do this, you simply create a shortcut to 'C:\Program Files\Oracle\VirtualBox\VirtualBox.exe startvm "VM name"' and tell it to run the window minimized. No need for a batch or whatever.

Re: Virtual Machine Minimize

Posted: 12. Aug 2010, 03:59
by MarkCranness

Code: Select all

"C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" --startvm "VM name"
Note '--' in front of startvm option. Use a shortcut, as Sasquatch says.

Re: Virtual Machine Minimize

Posted: 12. Aug 2010, 09:43
by microbert
Hi,

thanks for your reply, i have tried what you have told me but it is still starting in normal mode.


let me explain better the "VBoxManage.exe" is starting minimized but the virtual machine is starting in normal mode. I want to minimize the second one the main window for virtual machine (for example the WinXP machine i want to minimize)

is there a way to do that?

Re: Virtual Machine Minimize

Posted: 12. Aug 2010, 13:43
by MarkCranness
"C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" --startvm "VM name"

Re: Virtual Machine Minimize

Posted: 7. Dec 2017, 19:18
by Stokes
This is an old post but it still showed up in search results when I was trying to solve the same problem. Now that I figured it out, I thought I'd post the answer here. This only applies to Windows hosts, but maybe it will help someone else:

You have to use the start command, which has a /min option to run minimized, e.g.:

Code: Select all

start /min "C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" --startvm "VM name"
Also note that start only works from a command/dos shell, so if you're using Cygwin, bash, or some other shell, you may have to wrap this in a cmd shell using:

Code: Select all

cmd /c start /min "C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" --startvm "VM name"