3

I've a MacOS Catalina in virtual machine (libvirt/qemu), host machine is Fedora 31. I want to passthrough an iPhone SE for iOS development. When I connect the iPhone I see it in dmesg

[11680.439777] usb 3-1: new high-speed USB device number 2 using xhci_hcd
[11680.457108] usb 3-1: New USB device found, idVendor=05ac, idProduct=12a8, bcdDevice= 8.04
[11680.457116] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[11680.457120] usb 3-1: Product: iPhone
[11680.457124] usb 3-1: Manufacturer: Apple Inc.
[11680.457128] usb 3-1: SerialNumber: XXXXX

Then I share it to MacOS VM, it disconnects and its Linux USB connection changes from usb 3-1 to usb 3-2. The connection ID increments with each try to share.

I have followed all recomendations to disable iPhone in udev rules and `gvfs-gphoto2 so Fedora doesn't care of the iPhone when connected.

There is similar question How do I get Qemu USB Passthrough to work for iPad / iPhone? but there is no answer.

I have more observations. When I share the iPhone to Windows 10 (running in libvirt VM as well), it works, the USB connection doesn't change. When I share iPod 5 to MacOS, it works.

So the problem is only with the iPhone shared to the MacOS. Has anyone been able to share iPhone to virtualized MacOS?

Martin Edlman
  • 665
  • 7
  • 15

1 Answers1

1

Finally solved this with

-device usb-host,vendorid=0x05ac,productid=0x12ab,guest-reset=false \
ipatch
  • 3,933
  • 8
  • 60
  • 99
  • Where to add this command, can you explain? – Tayan Apr 12 '21 at 10:57
  • 1
    In my case in bash file i use to start vm, so it's just qemu-system-x86_64 cli arguments. Here is [example](https://github.com/foxlet/macOS-Simple-KVM/blob/master/basic.sh) – VictorPrudniy Apr 13 '21 at 10:34
  • This is exactly what I was looking for. It should be added to official simple-macos-kvm's docs. Thanks – Qazi Fahim Farhan Aug 21 '21 at 05:36
  • -1 This post has no context information. It provides no information about where this cryptic snippet should be placed. The guidelines for this site specifically state that this type of one-line post is considered poor quality. – Jonathan Ben-Avraham Nov 17 '22 at 08:00