Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


VirtualBox seems to want everything to be "registered" which makes it much more annoying to work with on the command line.

I'm attempting to create an automated script which will create, move, start, stop, and destroy virtual machines and virtual disks. Requiring registration will complicate the task for the following reasons.

  • leaves state information around that can cause unpredicted edgecases causing scripts to fail.
  • creates potential name space collisions for multiple process creating VMs with the same name
  • moving/copying resources on the same machine is more complicated because references in the registry need to be updated
  • copying resources (disk + vm combination) to another machine require reconfiguration once they reach their target machine, and require the transfer of extra meta data to do the reconfiguration.
  • If something unexpectedly fails, and an unregister thus fails to happen, left over configuration information can cause problems in subsequent runs.

Use Case

My specific use case is for a continuous integration server which creates and destroys VMs and Disk images potentially with the same name, and would require more logic to deal with the registry's statefulness.

Imaginary Example

It seems that I should just be able to for example (using some imaginary and/or incorrect commands):

mkdir foobar
customdiskimg_script ./foo/foo.vdi
vboxmanage createvm --name "foo" --ostype Linux --basefolder ./foo/foo.xml
vboxmanage storagectl ./foo/foo.xml --name foo --add ide
vboxmanage storageattach --storagectl foo --medium ./foo/foo.vdi ./foo/foo.xml 
vboxmanage startvm ./foo/foo.xml


Is there a way to use virtualbox without "registering" harddisks and VMs?

share|improve this question
What exactly do you mean by registering? – Ramhound Jul 9 '12 at 17:19
virtualbox commands typically require a name (not a file name) which is apparently resolved by virtuabox's registry. – Catskul Jul 9 '12 at 18:29
Likewise most commands for creating resources have a '-register' switch, or a way to register the resource so that its name resolves. – Catskul Jul 9 '12 at 18:35
What is the host operating system. Why are you against using the -register switch? – Ramhound Jul 9 '12 at 18:55
Host operating system is Linux, but the concepts are the same across hosts unless I'm mistaken. I'd like to avoid registeration for the reasons listed in the question. My specific use case is not important, but I'll add it to the question for illustration purposes. – Catskul Jul 9 '12 at 18:59


After looking through the source code, from what I can tell, look up can only happen by name which requires the registry.

It would seem that if there were a way to change the path of the virtualbox config directory to something custom, it would be possible to approximate the effect I was looking for, but that doesn't seem to be possible either.

share|improve this answer

As you are on Linux, there are host OS tools that can be used to create a temporary virtual environment to limit VirtualBox's communication between processes. Specifically, you could use chroot to create a minimal environment containing only the bare minimum needed for VirtualBox to run, along with a fresh home directory for your user, and then run VirtualBox in that environment. While I haven't tried this, I presume this would isolate the processes from each other and therefore solve your problem

(Unfortunately, I've come to this question seeking an answer to this same problem for a Windows host, where such a solution would not be possible. Oh well.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .