# 将 USB 设备直接连接到 macOS 虚拟机

从 20.3.0 版开始，Parallels Desktop for Mac 允许您将 USB 设备直接连接至运行 macOS 的虚拟机。例如，这可以让您将 USB 安全设备连接到 macOS 虚拟机而不是您的 Mac，类似于[Windows 虚拟机](/pdfm-26-ug-zh_cn/parallels-desktop-for-mac-26-yong-hu-zhi-nan/zai-mac-shang-shi-yong-windows/lian-jie-wai-bu-she-bei.md)的工作方式。

{% hint style="info" %}
**警告** ：

1. 此功能仅适用于运行 macOS Sequoia 15 及更新版本的 Mac。
2. 您的特定设备可能无法使用。有关最新的已知问题，请参阅[本知识库文章](https://kb.parallels.com/en/128867) 。
3. 此功能的当前实现不支持将它们永久分配给运行 macOS 的特定虚拟机。
   {% endhint %}

### 如何将 USB 设备连接到 macOS 虚拟机

由于目前的限制，您必须手动将 USB 设备分配给运行 macOS 的特定虚拟机。为此，请按照以下步骤操作：

1. 确保将 Parallels Desktop[**设备偏好设置**](/pdfm-26-ug-zh_cn/parallels-desktop-for-mac-26-yong-hu-zhi-nan/parallels-desktop-pian-hao-she-zhi-he-xu-ni-ji-she-zhi/parallels-desktop-pian-hao-she-zhi/she-bei-pian-hao-she-zhi.md)设置为 **问我怎么做**。
2. 如果 MacOS 虚拟机尚未激活，则启动它。
3. 连接 USB 设备，等待 Parallels Desktop 连接对话框出现。

   <figure><img src="/files/c3QrXLMOH4H7HLKdof36" alt="" width="375"><figcaption></figcaption></figure>

   由于上述限制，“**记住我的选择**”选项处于非激活状态。
4. 选择 macOS 虚拟机。

### 如何禁止将 USB 设备连接到虚拟机

出于安全考虑，您可能希望禁止将 USB 设备连接到虚拟机。下面是使用命令行界面的方法：

```
prlctl set <VM ID> --device-del usb
```

此命令将禁用虚拟机的 USB 设备控制器。有关 CLI 功能的更多信息，请查看《开发人员指南》中的[相关部分](https://docs.parallels.com/landing/parallels-desktop-developers-guide/command-line-interface-utility)。

{% hint style="info" %}
**注意**：Parallels Desktop 命令行界面仅适用于 Pro、Business 和 Enterprise 许可证。
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parallels.cn/pdfm-26-ug-zh_cn/parallels-desktop-for-mac-26-yong-hu-zhi-nan/gao-ji-zhu-ti/zai-mac-shang-shi-yong-qi-ta-cao-zuo-xi-tong/shi-yong-macos-zuo-wei-lai-bin-cao-zuo-xi-tong/jiang-usb-she-bei-zhi-jie-lian-jie-dao-macos-xu-ni-ji.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
