VirtualBox

Ticket #4229 (new enhancement)

Opened 5 years ago

Last modified 5 years ago

Allow specification of the configuration directory (VBOX_USER_HOME) from the command line.

Reported by: techieltg Owned by:
Priority: minor Component: other
Version: VirtualBox 2.2.4 Keywords: VBOX_USER_HOME configuration location
Cc: Guest type: other
Host type: other

Description

Allow users to specify the configuration file location on the command line (or via the VirtualBox GUI) for all VirtualBox frontends - VirtualBox, VBoxManage, VBoxHeadless, etc.

For instance on a Windows(R) Host:

VBoxManage configLocation C:\temp\myVirtualMachine list vms

or

VBoxHeadless configLocation C:\temp\myVirtualMachine -startvm myVM

This configuration location would override the environment variable VBOX_USER_HOME (i.e., the configuration location would specify the location of a VirtualBox.xml file and its associated Machines directory).

There are a number of benefits to this approach:

  • Configuration of a virtual machine to run as a Windows service becomes trivial (XP, Vista, 7)
  • Allows users to share virtual machine configurations across multiple users accounts.
    • This is especially important in some academic environments where disk space is limited.
  • Virtual machine configurations could now be distributed easily.
    • Deployment of virtual machines as a means of High Throughput Computing is simplified.
  • Poses no security risk since file permissions are managed via the host operating system.

Change History

comment:1 follow-up: ↓ 2 Changed 5 years ago by frank

VBOX_USER_HOME=foo/bar VBoxManage ...
VBOX_USER_HOME=foo/bar VBoxHeadless ...

I don't see the point in your request.

comment:2 in reply to: ↑ 1 Changed 5 years ago by techieltg

Use of an environment variable to set the VirtualBox home directory does not work in all instances. I will provide a simple example: on a Windows(R) host, running a VirtualBox executable as a service with a modified value of VBOX_USER_HOME will not produce the correct results unless VBOX_USER_HOME is set as a system variable (since services typically utilize the LocalSystem account and environment variables can only be set/read at boot). In this case, setting an environment variable before calling a VirtualBox executable is useless.

This is certainly not the only situation in which using an environment variable instead of an optional explict argument is determental to operation, I can think of quite a few others (some of which are outlined in the first post).

comment:3 Changed 5 years ago by techieltg

This parameter would also benefit those users who are switching to VirtualBox from VMWare(R). Using VMWare(R), the user can always specify the location of the .vmx file via the command line.

Another example of why this is useful: A Windows(R) user could now make a shortcut that automatically started up a virtual machine that is not in the default user directory. Setting an environment variable, as frank suggested above, is not possible in this context - unless you called a bat/cmd file first and THEN called the VirtualBox executable.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use