Page 1 of 1

VBoxManage cannot find my VMs unless VirtualBox is running

Posted: 19. Oct 2013, 01:23
by msw1520
In the GUI Preferences I changed the default machine folder, and everything works there.

But with VBoxManage, a different set of configurations seem to apply. In particular, VBoxManage cannot find my VMs. It can't find them, that is, unless the GUI is already running, started with a double click and not from the command line. With the GUI running, it does find my VMs. But that kind of defeats the value of having command-line access.

Below is a transcript of my session. Any idea what the problem is? Thanks.

Code: Select all

% VBoxManage --version
4.2.18r88780

% VBoxManage setproperty machinefolder "F:\\vboxVms"

% VBoxManage list systemproperties | grep 'Default machine folder'
Default machine folder:          F:\vboxVms

% grep defaultMachineFolder ~/.VirtualBox/VirtualBox.xml
    <SystemProperties defaultMachineFolder="F:\vboxVms" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3"/>

% VBoxManage list vms
  # <no output>

  # <Now I start VirtualBox from GUI, not command line>

% VBoxManage list vms
"Ubuntu1204" {584f7c0d-2186-4258-957c-3830e79068fe}

  # <Kill VirtualBox GUI app>
% VBoxManage setproperty machinefolder /cygdrive/f/vboxVms

% VBoxManage list vms
  # <no output>

% VBoxManage setproperty machinefolder default

% VBoxManage list vms
  # <no output>

Re: VBoxManage cannot find my VMs unless VirtualBox is runni

Posted: 20. Oct 2013, 20:42
by noteirak
You are using cygwin, and any frontend of Virtualbox (GUI or vboxmanage) reads the default machine profile from the user profile.
Since cygwin emulates linux, and so it also emulate some kind of user mechanism, which doesn't seem to work for user profile settings.

Try without using cygwin and it should work. Or make sure the .Virtualbox folder of your Windows profile is also the same as your .Virtualbox folder from your cygwin profile.

Re: VBoxManage cannot find my VMs unless VirtualBox is runni

Posted: 21. Oct 2013, 09:17
by msw1520
You're right. It works fine if I copy the c:/users/me/.VirtualBox folder to my cygwin home dir.

However it doesn't work with a symlink from cygwin home dir to the Windows .VirtualBox folder.
Is there a command-line flag or environment variable to tell VBoxManage (under cygwin) where to find that .VirtualBox folder?

Thanks.

Re: VBoxManage cannot find my VMs unless VirtualBox is runni

Posted: 21. Oct 2013, 22:08
by noteirak
There is, see Global configuration data chapter of the User Manual for the specific environment variables.

Re: VBoxManage cannot find my VMs unless VirtualBox is runni

Posted: 22. Oct 2013, 17:12
by msw1520
That's what I needed, thank you!