Vagrant没有显示任何可用的网络接口

use*_*447 13 vagrant

在过去的一个月里,我一直在为一个家庭无线网络上的导轨应用程序运行流浪者.我正在Windows机器上运行vagrant 1.4.3和virtualbox ..我已经从老房子里使用的无线切换到使用加密狗的新连接(预付费插件和播放互联网USB设备,因为我已经移动)并且我得到了以下错误..

 Bringing virtual machine 'default' up with 'virtual-box' provider..
 [default] clearing any previously set forwarded ports...
 [default] clearing any previously set network interfaces...
 [default] Available bridged network interfaces:
 [default] what interface should the network bridge to?
Run Code Online (Sandbox Code Playgroud)

问题是,当它问我"网络应该连接到哪个接口?"时,我没有像上面那样给出任何选项..是否有可以编辑的特定文件来解决这个问题?

小智 4

还没有测试过这个,因为我的工作计算机拒绝正常运行 Vagrant,但它可能对你有一些帮助。

在 Windows 中打开命令窗口并运行“ipconfig /ALL”,这将显示计算机上的所有网络适配器,输出可能如下所示(删除了任何标识信息):

Host Name . . . . . . . . . . . . : Something
Primary Dns Suffix  . . . . . . . : something.something.com
   Node Type . . . . . . . . . . . . : Peer-Peer
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : something.something.com

Ethernet adapter Local Area Connection* 12:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : something.com
   Description . . . . . . . . . . . : Check Point Virtual Network Adapter For Endpoint VPN Client
   Physical Address. . . . . . . . . : AA-AA-AA-AA-AA-AA
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . : something.something.com
   Description . . . . . . . . . . . : Intel(R) Centrino(R) Ultimate-N 6300 AGN
   Physical Address. . . . . . . . . : AA-AA-AA-AA-AA-AA
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : aaaa::aaaa:aaaa:aaaa:aaaaaaa(Preferred) 
   IPv4 Address. . . . . . . . . . . : 1.1.1.1(Preferred) 
   Subnet Mask . . . . . . . . . . . : 1.1.1.0
   Lease Obtained. . . . . . . . . . : 27. januar 2014 10:09:22
   Lease Expires . . . . . . . . . . : 28. januar 2014 10:09:21
   Default Gateway . . . . . . . . . : 1.1.1.1
   DHCP Server . . . . . . . . . . . : 1.1.1.1
   DHCPv6 IAID . . . . . . . . . . . : 388265731
   DHCPv6 Client DUID. . . . . . . . : aa-aa-aa-aa-aa-aa-aa-aa-aa-aa-aa-aa-aa-aa
   DNS Servers . . . . . . . . . . . : 1.1.1.1
                                       1.1.1.1
   NetBIOS over Tcpip. . . . . . . . : Disabled

Ethernet adapter Bluetooth Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : 
   Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
   Physical Address. . . . . . . . . : aa-aa-aa-aa-aa-aa
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
Run Code Online (Sandbox Code Playgroud)

查看是否可以在列表中找到您的 USB 加密狗的名称。找到了?如果是,请尝试将其添加到您的 Vagrantfile 中。

如果我想使用无线适配器进行网络连接,那么根据文档(http://docs.vagrantup.com/v2/networking/public_network.html),我必须将此行添加到我的 Vagrantfile 中:

config.vm.network "public_network", :bridge => 'Wireless Network Connection'
Run Code Online (Sandbox Code Playgroud)