VMware 上的 macOS 不能识别 iOS 设备

我在 VMWare 中使用 Mac OS 开发 iOS 应用程序。

在更新操作系统和 Xcode 之后,iOS 设备不可用,因此我无法测试它。

当设备插入 PC 时,该设备在 VMware 中显示为已连接,并用绿点标记。但在 Xcode 的设备中并没有出现这种情况。

我用的是 Mac OS 10.11,有人有什么想法吗?

115726 次浏览

I had the same issue, but was quite easy to solve. Follow the next steps:

1) In the Virtual Machine (VMWare) settings:

  • Set the USB compatibility to be 2.0 instead of 3.0
  • Check the setting "Show all USB input devices"

2) Add the device into the list of allowed development devices in your Apple Developer's account. Without that step there is no way to use your device in Xcode.

Next some instructions: Register a single device

I had same issue with VMWare 12.5.2 and OS: Mac OS Sierra.
These are few steps to solve this issue:(which worked for me.)

  1. Open VMWare.
  2. select your OS. (Mine is MacOS Sierra)
  3. Then In left hand side, Select option "Edit virtual machine settings"
  4. There will be one popup of setting. In that you need to select "Hardware" Tab.
  5. In that, there is option "USB Controller". Select that. You will find option right hand side.
  6. In that, Set USB compatibility as "USB 2.0" and check all 3 options as selected. options must be as following: i) Automatically connect new USB devices, ii) Show all USB input devices, iii) Share Bluetooth devices with the virtual machine
  7. Press OK.

There you go. It will work. Now you can power on your virtual machine.And try to connect your device with proper USB cable. Sometimes there can be issue with USB cable which are not authorized. Still if you have doubt, you can ask me here.

I have 2 computers with VMWare Workstation and Mac OS Sierra installed as the guest OS. First machine could recognize my iOS device whereas my second machine could not recognize it. The second machine was exhibiting the same behavior as others reported where it would reconnect and disconnect with the iPhone endlessly.

Thankfully, my second machine had network connectivity problems with my VM. So I stumbled upon the solution when I reset my network settings for the VM.

You can try the following steps and see if it works for you. It worked for me.

  1. Go to Start Menu.
  2. Open VMWare folder.
  3. Start VMWare Network Editor.
  4. Click Change Settings button to assign Administrator privileges.
  5. Click Restore Defaults button.
  6. Open Virtual Machine.
  7. Verify internet connectivity on Mac OS.
  8. Connect iOS device. If iTunes launches on Mac, this means that the Mac has correctly identified your iOS device.

The other answer is lacking some additional information also in the following post. For example, when the iPhone keep Connect / Disconnect in loop. So here is a better solution:

  1. In vmware.log search the vid & pid of your iphone USB:
    Example:

    vmx | USB: Found device [name:Apple\ IR\ Receiver vid:05ac pid:12a8
    
  2. Close vmware (to unlock .vmx)

  3. In the .vmx, add:

    usb.quirks.device0 = "0xvid:0xpid skip-reset, skip-refresh, skip-setconfig"
    

    Replace 0xvid:0xpid by the vid & pid found in vmware.log. Example:

    usb.quirks.device0 = "0x05ac:0x12a8 skip-reset, skip-refresh, skip-setconfig"
    
  4. In vmware > Edit virtual machine > USB Controller : USB compatibility : USB 2.0
    Active : Automatically connect new USB Devices
    Active : Show all USB input devices
    Active : Share Bluetooth devices with the virtual Machine

  5. Launch Mac OS and make sure that the mouse is Focus on vmware (or just use the login prompt if it appear)

Do what is suggested in the answer, but make sure you also click inside the VM so that OSX has the focus before you plug in the phone. In my case, I had to do that to make it work.

I would like to add something.

For the devices to work in your Mac you have to make sure that they are connected to it. I don't know how this is handled in other versions but I am using VMware Workstation 12 Player

If you go to Player (Top left corner) > Removable Devices > Enable the device you want

Thats what i had to do.

I am running an Iphone 8+ and VMWare macOS High Sierra on a Windows 10 machine.

I went through dozens of troubleshooting posts, and the none of them, excluding setting your VMs USBs to 2.0, helped. Through trial and error, and a decent amount of liquor, I have figured it out.

SOLUTION:

Do these things, in this order:

  1. With the VM off, go to your settings for whichever machine you're using, and change the USBs to 2.0. You can find this in the same menu that you allocated your ram and cores

  2. Make sure your phone is plugged in, and turned off.

  3. Boot up the VM, macOS.

  4. Turn Phone on when mac is booted

  5. Open Xcode

Here is another thing to try (I'm using Windows 10):

  1. Stop the VM.
  2. Open Start.
  3. Type "Services".
  4. Find VMWare USB Arbitration Service and start it.
  5. Connect your device and hopefully, it will be detected.

This is what worked for me. I have no idea why the service wasn't started in the first place and it used to work fine with my IPhone 7. Good luck.

I met the same problem. I found the solution in the solution from kb.vmware.com.
It works for me by adding

usb.quirks.device0 = "0xvid:0xpid skip-refresh"

Detail as below:


To add quirks:
  1. Shut down the virtual machine and quit Workstation/Fusion.

    Caution: Do not skip this step.
     
  2. Open the vmware.log file within the virtual machine bundle. For more information, see Locating a virtual machine bundle in VMware Workstation/Fusion (1007599).
  3. In the Filter box at the top of the Console window, enter the name of the device manufacturer.

    For example, if you enter the name Apple, you see a line that looks similar to:

    vmx | USB: Found device [name:Apple\ IR\ Receiver vid:05ac pid:8240 path:13/7/2 speed:full family:hid]



    The line has the name of the USB device and its vid and pid information. Make a note of the vid and pid values.
     

  4. Open the .vmx file using a text editor. For more information, see Editing the .vmx file for your Workstation/Fusion virtual machine (1014782).
  5. Add this line to the .vmx file, replacing vid and pid with the values noted in Step 2, each prefixed by the number 0 and the letter x .

    usb.quirks.device0 = "0xvid:0xpid skip-reset"

    For example, for the Apple device found in step 2, this line is:

    usb.quirks.device0 = "0x05ac:0x8240 skip-reset"
     

  6. Save the .vmx file.
  7. Re-open Workstation/Fusion. The edited .vmx file is reloaded with the changes.
  8. Start the virtual machine, and connect the device.
  9. If the issue is not resolved, replace the quirks line added in Step 4 with one of these lines, in the order provided, and repeat Steps 5 to 8:
usb.quirks.device0 = "0xvid:0xpid skip-refresh"
usb.quirks.device0 = "0xvid:0xpid skip-setconfig"
usb.quirks.device0 = "0xvid:0xpid skip-reset, skip-refresh, skip-setconfig"

Notes:

  • Use one of these lines at a time. If one does not work, replace it with another one in the list. Do not add more than one of these in the .vmx file at a time.
  • The last line uses all three quirks in combination. Use this only if the other three lines do not work.

Refer this to see in detail.

If you went throught alot of pain installing macos on vmware I recommend this tutorial which also provides you with all the file you need. it's straight forward tutorial and works all the way without any problem.

This solution for Ubuntu Host, Macos Guest

  1. disable SIP
  2. install mac ports
  3. sudo launchctl unload /Library/Apple/System/Library/LaunchDaemons/com.apple.usbmuxd.plist
  4. sudo port install usbmuxd
  5. sudo usbmuxd --foreground
  6. then connect iPhone and let the guest to take control

Disabling SIP

  1. Start vmware
  2. select guest and "power to firmware"
  3. in efi menu, enter setup > config boot options > add boot options > select recovery partition > select boot.efi
  4. at input file description hit and type in label e.g. "recovery" > commit changes and exit
  5. boot from recovery and be patient
  6. follow prompt until you see OS X Utilities menu
  7. At the very top menu select Utilities > Terminal
  8. In terminal enter "csrutil status"
  9. then csrutil disable
  10. then csrutil status
  11. then reboot > hit enter once or twice
  12. Double check in OSX Terminal app to ensure SIP is disabled

Finally, disable HiDPI:

$ sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool NO

Referenced from: