Ubuntu 13.04上的Genymotion将无法连接到虚拟设备

时间:2014-01-10 09:00:18

标签: android ubuntu genymotion

我正在运行Ubuntu 13.04。我已经安装了VirtualBox 4.3.6和Genymotion 2.0.3。安装后,我下载了Galaxy S4 - 4.2.2图像,以及其他一些图像。所有这些都遇到了同样的问题:单击Play后,我得到了虚拟设备的窗口,但后来出现错误:

  

无法连接到您的虚拟设备! Genymotion现在将停止。检查您的VirtualBox网络配置。

VirtualBox网络的配置如下:

  • 没有NAT网络
  • 一个仅限主机的网络,vboxnet0
    • 适配器
      • IPv4地址:192.168.56.1
      • IPv4网络掩码:255.255.255.0
      • IPv6地址:fe80:0000:0000:0000:0800:27ff:fe00:0000
      • IPv6网络掩码长度:64
    • DHCP服务器
      • 服务器地址:192.168.56.1
      • 服务器掩码:255.255.255.0
      • 地址下限:192.168.56.100
      • 上限地址:192.168.56.254

点击播放后,我查看genymotion-player.log并查看以下与网络相关的内容:

Jan 10 00:51:12 [Genymotion Player] [Debug] "Name:            vboxnet0
GUID:            786f6276-656e-4074-8000-0a0027000000
DHCP:            Disabled
IPAddress:       192.168.56.1
NetworkMask:     255.255.255.0
IPV6Address:     fe80:0000:0000:0000:0800:27ff:fe00:0000
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 0a:00:27:00:00:00
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0

...而且,稍后在日志中:

Jan 10 00:51:12 [Genymotion Player] [Debug] "NetworkName:    HostInterfaceNetworking-

vboxnet0
IP:             192.168.56.1
NetworkMask:    255.255.255.0
lowerIPAddress: 192.168.56.100
upperIPAddress: 192.168.56.254
Enabled:        Yes

NetworkName:    NatNetwork
IP:             10.0.2.3
NetworkMask:    255.255.255.0
lowerIPAddress: 10.0.2.4
upperIPAddress: 10.0.2.254
Enabled:        Yes

稍后在日志中:

Jan 10 00:51:13 [Genymotion Player] [Debug] Virtual Machine started. 
Jan 10 00:51:13 [Genymotion Player] [Debug] Waiting for an IP address... 

几秒钟后:

Jan 10 00:51:18 [Genymotion Player] [Debug] Genymotion system started. Attributed IP address:  "192.168.56.3" 

然后,当它失败时:

Jan 10 00:51:24 [Genymotion Player] [Error] Unable to connect player to virtual machine: "192.168.56.3" 

我尝试了其他的解决方法:

  • 卸载/重新安装Genymotion
  • 卸载/重新安装VirtualBox
  • 将VirtualBox降级为4.2
  • 删除并重新下载设备图像
  • 删除并允许Genymotion重新创建仅限主机的网络

我还应该声明我没有防火墙,所以我相信由于干扰没有出现问题。

1 个答案:

答案 0 :(得分:2)

原来问题是我正在运行VMWare,并支持Genymotion,VirtualBox。

我在Genymotion支持的帮助下发现了这一点,他指出我跑的时候:

sudo netstat -nm

结果如下:

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.100.2   0.0.0.0         UG        0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
172.16.30.0     0.0.0.0         255.255.255.0   U         0 0          0 vmnet1
192.168.56.0    0.0.0.0         255.255.255.0   U         0 0          0 vmnet8
192.168.56.0    0.0.0.0         255.255.255.0   U         0 0          0 vboxnet0
192.168.100.0   0.0.0.0         255.255.255.0   U         0 0          0 eth0

我可以通过进入VirtualBox来解决这个问题,并且从“首选项”对话框的“网络”部分,我将vboxnet0配置中的每个引用更改为192.168.56。*到192.168.57。*。

感谢Genymotion支持团队!