How to start a certain VM DIRECTLY by doubleclick?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
pstein
Posts: 59
Joined: 20. Nov 2008, 20:48
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu, CentOS

How to start a certain VM DIRECTLY by doubleclick?

Post by pstein »

Currently I (have to) start VirtualBox App at first, then select a VM and start it in a second step.

How can I directly from WinExplorer start a certain VM WITHOUT having to start VirtualBox Main App at first?

To which app do I have to bind/link the *.VDI extension?

Peter
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: How to start a certain VM DIRECTLY by doubleclick?

Post by vbox4me2 »

Make a shortcut to vboxheadless or virtualbox.exe and add start parameters, see the Manual.
pstein
Posts: 59
Joined: 20. Nov 2008, 20:48
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu, CentOS

Re: How to start a certain VM DIRECTLY by doubleclick?

Post by pstein »

vbox4me2 wrote:Make a shortcut to vboxheadless or virtualbox.exe and add start parameters, see the Manual.
Hmm, I have read the manual (on http://www.virtualbox.org/manual/UserManual.html) but didn't found a hint on how to pass a *.VDI as parameter.

Furthermore I wonder if a simple shortcut to vboxheadless makes sense. I epect that I have to pass somehow the name of a certain VM to vboxheadless.exe.

How exactly?

Peter
Etepetete
Posts: 400
Joined: 7. Oct 2009, 10:19
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Slackware 14.2
Location: Berlin

Re: How to start a certain VM DIRECTLY by doubleclick?

Post by Etepetete »

pstein wrote:but didn't found a hint on how to pass a *.VDI as parameter
That is because you don't start a Virtual Disk Image (VDI) you start a Virtual Machine. Read the section "Using VBoxManage to control virtual machines" in the manual.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to start a certain VM DIRECTLY by doubleclick?

Post by Sasquatch »

pstein wrote:
vbox4me2 wrote:Make a shortcut to vboxheadless or virtualbox.exe and add start parameters, see the Manual.
Hmm, I have read the manual (on http://www.virtualbox.org/manual/UserManual.html) but didn't found a hint on how to pass a *.VDI as parameter.
How exactly?
I've never been able to boot a single hard drive without a motherboard, memory and CPU. As said above, you need a whole machine, not just the hard drive.
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.
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: How to start a certain VM DIRECTLY by doubleclick?

Post by MarkCranness »

vbox4me2 wrote:Make a shortcut to vboxheadless or virtualbox.exe and add start parameters, see the Manual.
There is a problem with the manual (or at least with the 3.0.8 Windows manual): It does not say how to use VirtualBox.exe to directly start a VM; you must instead guess or infer how to use it based on what the manual *does* say about VBoxSDL and VBoxHeadless.
The Manual wrote:8.8 VBoxManage startvm
This command starts a virtual machine that is currently in the "Powered off" or "Saved" states.
Note: This is provided for backwards compatibility only. We recommend to start virtual machines directly by running the respective front-end, as you might otherwise miss important error and state information that VirtualBox may display on the console. ...
The Manual wrote:7.3. VBoxSDL, the simplified VM displayer
To start a virtual machine with VBoxSDL instead of the VirtualBox GUI, enter the following on a command line:
VBoxSDL --startvm <vm>
The Manual wrote:7.4.2. VBoxHeadless, the VRDP-only server
... The recommended way, however, is to use VBoxHeadless directly, as follows:
VBoxHeadless --startvm <uuid|name>
The Manual doesn't say wrote:VirtualBox --startvm <uuid|name>
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to start a certain VM DIRECTLY by doubleclick?

Post by Sasquatch »

That's because it's a Windows only option and undocumented (as you figured). We don't know what other options there are, other than the startvm parameter.
Hmm, just ran VirtualBox --help on my Linux terminal, guess what? This is what I got as output:

Code: Select all

VirtualBox --help
Sun VirtualBox Graphical User Interface 3.0.8
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Usage:
  --startvm <vmname|UUID>    start a VM by specifying its UUID or name
  --rmode sdl|image          select different render mode (default is sdl)
  --dbg                      enable the GUI debug menu
  --debug                    like --dbg and show debug windows at VM startup
  --debug-command-line       like --dbg and show command line window at VM startup
  --debug-statistics         like --dbg and show statistics window at VM startup
  --no-debug                 disable the GUI debug menu and debug windows
  --start-paused             start the VM in the paused state
  --start-running            start the VM running (for overriding --debug*)

The following environment variables are evaluated:
  VBOX_GUI_DBG_ENABLED       enable the GUI debug menu if set
  VBOX_GUI_DBG_AUTO_SHOW     show debug windows at VM startup
  VBOX_GUI_NO_DEBUGGER       disable the GUI debug menu and debug windows
So, only a few options that are worthwhile. They aren't listed in the manual because they don't have any purpose for users like changing VM settings. They are more like debug options for the devs.
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.
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: How to start a certain VM DIRECTLY by doubleclick?

Post by MarkCranness »

On Windows, none of --help -help -h /h /? -? produce any help messages or dialog (it just opens the GUI).

Edit: The code indicates that all OSs use 'VirtualBox --startvm' to start a VM, not just Unix/mac/etc, so I think it should be official instructions in the manual.
http://www.virtualbox.org/browser/trunk ... .cpp#L4060

Ticket updated: http://www.virtualbox.org/ticket/3593#comment:2
Post Reply