無法將 iPhone 6 連接至 macOS 虛擬機器



我试图用我的macOS虚拟机在iOS上测试一个flutter应用程序,但我无法连接我的旧iPhone 6。上周我能让它连接一次,但从那以后,每当我插上它时,它就会立即断开与来宾的连接,并回到主机上。以下是关于我的设置的一些信息:

  • 主机OS: Ubuntu 20.04
  • <
  • 来宾OS/strong>: macOS Big Sur 11.2
  • 手机
  • : iPhone 6, iOS 12.5.1
  • 虚拟化
  • : VMWare player 16.1.0

我有一个虚拟机存储在2TB外部USB驱动器

我在我的vmx文件中添加了usb.quirks.device0 = "0x05ac:0x12a8 skip-reset, skip-refresh, skip-setconfig"行,它至少停止了连接和断开连接的无限循环。

我将虚拟机设置为USB 2,并选中所有选项

如果我把手机插入USB 3端口,我得到一个驱动程序错误,如果我把它插入USB 2端口,我有时会得到一个消息,说设备忙。

我在vmware日志

中也得到类似的消息
2021-02-15T20:41:21.288-07:00| vmx| I005: USBGA: device 1000001d05ac12a8 arrived
2021-02-15T20:41:21.291-07:00| vmx| I005: MsgHint: msg.usb.disconnectHostProcess
2021-02-15T20:41:21.291-07:00| vmx| I005+ The specified device is in use by process:3922 /usr/libexec/gvfs-gphoto2-volume-monitor on the host operating system. Continuing will detach the device from the host operating system.
2021-02-15T20:41:21.291-07:00| vmx| I005+ ---------------------------------------
2021-02-15T20:41:21.297-07:00| vmx| W003: USBGL: failed to claim device (fd=19), interface 0. Retrying
2021-02-15T20:41:21.297-07:00| vmx| I005: USBGL: disconnect driver 'usbfs' from device 19, interface 0
2021-02-15T20:41:21.297-07:00| vmx| I005: USBGL: claimed device 19, interface 0 successfully
2021-02-15T20:41:21.297-07:00| vmx| I005: USBGL: Connected device 0x1000001d05ac12a8 successfully
2021-02-15T20:41:21.297-07:00| vmx| I005: USBG: Quirks for device 05ac:12a8 (user-defined,skip-setconfig,skip-reset,skip-refresh,slow-reconnect)
...
2021-02-15T20:41:21.617-07:00| vcpu-1| I005: USBGL: Disable port is not supported.
2021-02-15T20:41:21.719-07:00| vcpu-0| I005: USBG: Skipping device reset for 0x1000001d05ac12a8
2021-02-15T20:41:21.874-07:00| vmx| I005: USBG: Skipping SetConfiguration(1) for 0x1000001d05ac12a8
2021-02-15T20:41:21.879-07:00| vmx| W003: USBGL: failed to set device 19 to config 5: Device or resource busy
2021-02-15T20:41:21.879-07:00| vmx| I005: USBGL: claimed device 19, interface 0 successfully
2021-02-15T20:41:26.578-07:00| vmx| W003: USBGL: failed to submit urb to device 19: Device or resource busy
...
2021-02-15T20:41:26.579-07:00| vmx| W003: USBGL: failed to submit urb to device 19: Device or resource busy
2021-02-15T20:41:53.340-07:00| vmx| I005: USB: Disconnecting device 0x1000001e05ac12a8
2021-02-15T20:41:53.340-07:00| vmx| I005: USBG: Disconnecting 1000001e05ac12a8, port:0 reservedPort:5574C8CD9D20
2021-02-15T20:41:53.340-07:00| vmx| I005: USBGA: device 1000001e05ac12a8 already disconnected from host

iPhone显示在系统信息的USB下。在vmware的可移动设备部分中手动连接或断开设备似乎没有任何作用。

是否有其他设置我可以改变或者我可以尝试让iPhone保持连接到客户macOS?

非常感谢!

有同样的问题。需要在主机操作系统(Ubuntu)中禁用gvfs-gphoto2-volume-monitor和usbmuxd服务。详细的解决方案可以在这里找到:https://www.insanelymac.com/forum/topic/326555-vmware-cant-connect-iphone/

usbmuxd守护进程,您需要禁用它,但也需要屏蔽它,以防止它再次自动启动。

当您需要将iPhone连接到VMWare Guest时,您需要执行以下命令:

sudo systemctl mask usbmuxd
sudo systemctl stop usbmuxd

当您完成并需要再次启用usbmuxd守护进程时,您需要执行以下命令:

sudo systemctl unmask usbmuxd
sudo systemctl start usbmuxd

也可能需要通过执行:

来终止gvfs-gphoto2-volume-monitor
sudo killall gvfs-afc-volume-monitor

在Fedora 36、WMWare Workstation 16.2.3和OSX guest 12.4上测试并运行

在VMX文件....更改下面一行usb_xhci: 7。速度= "4"像这样usb_xhci: 7。

,但它重置。打开vmware后更改行…启动虚拟机之前....

可以从log....查看iPhone连接的端口就我而言……usb_xhci: 7