12

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?

3
  • Even if UAC is disabled you may not have all rights ... is your cygwin window elevated? Right-Click the icon and run-as-admin, you can also do that in the shortcut's properties (may still not be your issue)
    – nhed
    Commented May 16, 2011 at 19:49
  • @nhed This did not help, but it's always good to mention such pitfalls. :)
    – Matthias
    Commented May 17, 2011 at 11:54
  • You might some helpful answers if you add a tag to indicate something about Windows. There are a lot to choose from. Good Luck!
    – shellter
    Commented May 22, 2011 at 19:33

4 Answers 4

9
+50

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
1
  • 1
    setting $VBOX_USER_HOME in C:\cygwin\home\[Username]\.bashrc did the trick!
    – Matthias
    Commented May 24, 2011 at 9:32
1

This answer is in the spirit of 'consider this possibility' ;-)

How 'married' are you to cygwin as your unix tool on windows? My experience with cygwin is that is very slow but it's strength is that it comes with a wide range of linux-like tools AND probably has the largest user-support community.

There are at least 2 alternatives to cygwin that I use and can recommend AND with a quick test DID return the list of my active vms_s. They are UWIN and MinGW.

Read my writeup about ksh and UWIN here Regarding 'for' loop in KornShell (2 nd msg)

ALSO check out the MinGW environment. I have installed MinGW primarily to have access to gcc (outside of cygwin) and it has a fair number of linux-like tools.

I hope this helps.

0

Easy to fix - you need to use Windows path syntax in your .bashrc

This - VBOX_USER_HOME='C:\Documents and Settings\user.VirtualBox'

Instead of this - VBOX_USER_HOME=/cygdrive/c/users/user/.VirtualBox

0

all I did to get VBoxManage to work in cygwinn

$ alias VBoxManage='cmd /C VBoxManage '

example:

$ VBoxManage list vms

This alias assignment forces VBoxManage to run under the window's "cmd" shell. Both stdin, stdout, and command switches work correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.