VBoxManage cannot find my VMs unless VirtualBox is running

Discussions related to using VirtualBox on Windows hosts.
Post Reply
msw1520
Posts: 3
Joined: 19. Oct 2013, 01:00

VBoxManage cannot find my VMs unless VirtualBox is running

Post 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>
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: VBoxManage cannot find my VMs unless VirtualBox is runni

Post 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.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
msw1520
Posts: 3
Joined: 19. Oct 2013, 01:00

Re: VBoxManage cannot find my VMs unless VirtualBox is runni

Post 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.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: VBoxManage cannot find my VMs unless VirtualBox is runni

Post by noteirak »

There is, see Global configuration data chapter of the User Manual for the specific environment variables.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
msw1520
Posts: 3
Joined: 19. Oct 2013, 01:00

Re: VBoxManage cannot find my VMs unless VirtualBox is runni

Post by msw1520 »

That's what I needed, thank you!
Post Reply