如何在Windows 10上打开Virtual Box

时间:2015-12-31 11:49:37

标签: ssh vagrant windows-10 putty

我无法访问我使用" vagrant up"初始化的虚拟框。命令。我现在明白了:

[C:\web\Homestead]vagrant global-status
id       name    provider   state   directory
------------------------------------------------------------------------
13650ef  default virtualbox running C:/web/Homestead

The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date. To interact with any of the machines, you can go to
that directory and run Vagrant, or you can use the ID directly
with Vagrant commands from any directory. For example:
"vagrant destroy 1a2b3c4d"

[C:\web\Homestead]vagrant ssh 13650ef
C:/web/Homestead/Vagrantfile:4: warning: already initialized constant 
....
The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

The executable 'cygpath' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.

我正在运行Windows 10并设置我的环境变量,如下所示:

Path c:\php;C:\Program Files\Oracle\VirtualBox;
C:\Program Files\Git\usr\bin;C:\cygwin64;
C:\Users\Kevin\AppData\Roaming\npm

它寻找的cygpath文件显然位于c:\ Program Files \ Git \ usr \ bin和C:\ cygwin64下。

我试图通过Putty访问虚拟盒,但得到了简单的消息"连接被拒绝"。我使用Puttygen将ssh键转换为Putty ppk文件。

我试图回溯初始化虚拟框的步骤,但我看不到如何前进并打开框。

我应该销毁我的虚拟盒并重新开始吗?

1 个答案:

答案 0 :(得分:0)

尝试使用' Program Files'更改PATH路径。到Progra~1路径或用双引号包装每个路径项,例如:

  

路径c:\ php;" C:\ Program Files \ Oracle \ VirtualBox&#34 ;; " C:\程序   文件\ GIT中的\ usr \ BIN&#34 ;; C:\ cygwin64; C:\ Users \用户凯文\应用程序数据\漫游\ NPM

  

路径c:\ php; C:\ Progra~1 \ Oracle \ VirtualBox;   C:\ PROGRA〜1 \ GIT中的\ usr \ BIN; C:\ cygwin64;   C:\ Users \用户凯文\应用程序数据\漫游\ NPM