Virt-Manager and iPhone USB redirection

I have a Mac virtual machine installed using QEMU/KVM and I can't redirect my phone to the virtual OS.

It keeps saying:spice-client-error-quark: Could not redirect ... at 1-13: Device is in use by another application (0)

After some googling, I tried sudo fuser /dev/bus/usb/001/013 to find out which processes were accesing that USB device. I then killed the two pids that showed up in the dock.

I traced one of those pids to be gvsfd-gphoto2. So I killed every gvsf/d related processes. Both icons that were previously on my dock because of my phone being connected were gone.

When I try to redirect the USB device using the "Virtual Machine" menu in Virt-Manager, this time it shows no error, but it just wont redirect and my phone gets assigned a new number. Its like it was disconnected and then connected again.

How can I fix this?

1

1 Answer

It impossible!

For prevent gvsfd.

systemctl --user mask gvfs-daemon.service
systemctl --user stop gvfs-daemon.service

Next you will see apple-mfi-fastcharge module. Then blacklist it.

But Iphone resets itself while reconnecting to Mac OS.

[ 804.700882] usb 1-2: reset high-speed USB device number 46 using xhci_hcd
[ 804.852888] usb 1-2: device firmware changed
[ 804.853033] usb 1-2: USB disconnect, device number 46
[ 804.980778] usb 1-2: new high-speed USB device number 47 using xhci_hcd

Libusb pipe to guest broken at this point and Iphone reconects to host OS.

For connecting iphone you need to buy PCI-USB adapter board and pass PCI to guest.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like