USB assignments via SDK

Discussion in 'Installation and Configuration of Parallels Desktop' started by MiloH, Feb 15, 2017.

  1. MiloH

    MiloH Bit poster

    Messages:
    4
    I'm trying to assign USB devices to VMs via the SDK, but nothing I do seems to work. Devices only appear in a guest OS if I manually create a permanent assignment via preferences, and I can't find an API for that feature. Documentation is scarce on this subject, and there are no examples given. Does anyone have experience with this?
     
  2. Hi, did you play with the Parallels Desktop preferences -> Devices -> Connect it to active VM?
     
  3. KristenH

    KristenH Bit poster

    Messages:
    1
  4. MiloH

    MiloH Bit poster

    Messages:
    4
    Yes, but that only seems to affect what happens to new devices plugged in while a VM is running. Devices already plugged in when a VM starts do not appear in the VM unless I set a permanent assignment. However, that isn't a viable solution for me as I have VMs constantly coming and going.
     
  5. MiloH

    MiloH Bit poster

    Messages:
    4
    Not yet, but I did manage to figure out the API for adding a USB device to a VM's device list. That didn't make the device actually appear in the guest OS, but hopefully it's a step.
     
  6. MiloH

    MiloH Bit poster

    Messages:
    4
    Figured out a workaround. We manually configured a VM with permanent USB assignments and a boot-drive path that points to a symlink. To change what the VM does, we simply shut it down, change where the symlink points, and start it up again. Since the VM isn't being deleted, the USB assignments are retained.
     
    Maria@Parallels likes this.
  7. @MiloH thanks for sharing this workaround.
     

Share This Page