Virtual Machine Minimize

This is for discussing general topics about how to use VirtualBox.

Virtual Machine Minimize

Postby microbert » 11. Aug 2010, 11:19

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
microbert
 
Posts: 5
Joined: 11. Aug 2010, 10:58
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: Windows XP

Re: Virtual Machine Minimize

Postby Sasquatch » 11. Aug 2010, 21:35

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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Virtual Machine Minimize

Postby MarkCranness » 12. Aug 2010, 03:59

Code: Select all   Expand viewCollapse view
"C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" --startvm "VM name"

Note '--' in front of startvm option. Use a shortcut, as Sasquatch says.
MarkCranness
Volunteer
 
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: Virtual Machine Minimize

Postby microbert » 12. Aug 2010, 09:43

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?
microbert
 
Posts: 5
Joined: 11. Aug 2010, 10:58
Primary OS: MS Windows 7
VBox Version: OSE self-compiled
Guest OSses: Windows XP

Re: Virtual Machine Minimize

Postby MarkCranness » 12. Aug 2010, 13:43

"C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" --startvm "VM name"
MarkCranness
Volunteer
 
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: Virtual Machine Minimize

Postby Stokes » 7. Dec 2017, 19:18

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   Expand viewCollapse view
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   Expand viewCollapse view
cmd /c start /min "C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" --startvm "VM name"
Stokes
 
Posts: 2
Joined: 9. Oct 2015, 17:26


Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 6 guests