Why could VirtualBox not find a registered machine named Windows_7?

!! WINDOWS ONLY!!

If you are not on an admin account and are trying to modify your VM in a administrator cmd window, type these commands:

cd "C:\Program Files\Oracle\VirtualBox"

VboxManage registervm "C:\Users\Your Name Here\VirtualBox VMs\Your VM name here\Your VM name here.vbox"

Now run your virtual box modify commands or what ever else you are doing and it should work!


It fails because you are using sudo. VirtualBox is designed to be run by any user (in the vboxusers group), and sudo runs the command as the root user whose VirtualBox configuration is empty.

You can check that by typing:

sudo VBoxManage -nologo list vms # Should print only a newline
VBoxManage -nologo list vms # Detailled information about all your VMs

Not a direct answer, but just to put it out there for other people searching for it:

On Mac OS X, you can tell VirtualBox to load VMs from another user's home directory, provided the file permissions allow it, or if you are running VirtualBox as the root user using sudo (e.g. if you absolutely have to access your host's web server on port 80).

The way to do this is to set VBOX_USER_HOME appropriately, e.g.

VBOX_USER_HOME=/Users/the_other_user/Library/VirtualBox

If you want to run VBoxHeadless under root, use:

sudo VBOX_USER_HOME=/Users/your_user_id/Library/VirtualBox nohup \
   VBoxHeadless -s "IE10 - Win7" </dev/null &>/dev/null &

Tags:

Virtualbox