开发者

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 c开发者_高级运维ygwin also?


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


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.


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜