Search code examples
bashwindows-7cygwinvirtualbox

VirtualBox VM access with cygwin


I cannot access my virtual machines from the cygwin console. (Windows 7, UAC is disabled)

Matthias@laptop0x4d53 /cygdrive/c/Program Files/Oracle/VirtualBox
$ ./VBoxManage list vms

The Windows console, however, has access to my virtual machines.

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe list vms
"GlassFish" {68874e4d-817a-4315-9ea2-38726964ac32}
"Tomcat" {2e22a7c0-9950-4593-8eda-778d404476c7}
"LAMP" {36aa6968-df52-49b5-be52-1f59c50f1527}

Maybe it's a problem with the user's rights. How can I access my VMs from cygwin also?


Solution

  • Did you try the official forums? There are some solutions exporting some variables on ~/.bashrc and starting VB in headless mode (this is a recent post, from 2011). There's even an ugly hack about exporting a bunch of environment variables using bat files instead.

    #export VBOX_USER_HOME='/cygdrive/c/Documents\ and\ Settings/SomeNameHere/.VirtualBox/'
    export VBOX_USER_HOME='C:\Documents and Settings\SomeNameHere\.VirtualBox\'
    

    ...or HOWTO - virtualbox as a service on Windows (cygrunsrv.exe). This is reported to be working on Cygwin 1.7b.

    $ cygrunsrv --list
    vboxd-myvm