【问题标题】:Genymotion on Ubuntu 13.04 won't connect to virtual deviceUbuntu 13.04 上的 Genymotion 无法连接到虚拟设备
【发布时间】:2014-01-29 03:59:09
【问题描述】:

我正在运行 Ubuntu 13.04。我已经安装了 VirtualBox 4.3.6 和 Genymotion 2.0.3。安装后,我下载了 Galaxy S4 - 4.2.2 镜像以及其他一些镜像。他们都遇到了同样的问题:点击播放后,我得到了虚拟设备的窗口,但是我得到一个错误:

无法连接到您的虚拟设备! 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 重新创建仅限主机的网络

我还应该声明我没有防火墙,所以我相信不会因为干扰而出现问题。

【问题讨论】:

    标签: android ubuntu genymotion


    【解决方案1】:

    原来问题在于我同时运行 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 支持团队!

    【讨论】:

    • 嗨@jgindin,您是否将此解决方案用于最新版本的VirtualBox?似乎当我这样做时,我无法将 DHCP 服务器 IP 从 .56. 更改为 .57..
    • 抱歉@seenickcode,我最近没有使用Genymotion。
    • 嗨@jgindin 感谢您的回复。对于其他任何人:这基本上帮助了我,去这里stackoverflow.com/questions/19922077/… 然后用“这些是我解决这个问题的步骤,虽然我不确定哪一个适合你。”搜索答案。
    猜你喜欢
    • 2014-07-21
    • 2017-08-08
    • 2014-12-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多