Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 484
Matthias Avatar asked May 16 '11 19:05

Matthias


2 Answers

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
like image 166
GmonC Avatar answered Nov 08 '22 16:11

GmonC


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.

like image 1
shellter Avatar answered Nov 08 '22 16:11

shellter