> For the complete documentation index, see [llms.txt](https://docs.verge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verge.io/knowledge-base/zh/virtual-machines/emulate-usb.md).

# 模拟 USB 设备

## 概述

{% hint style="info" %}
**要点**

* 为 VM 创建模拟 USB 设备
* 启用旧版应用程序支持
* 允许用于驱动程序安装的存储热插拔
* 需要特定的 VM 配置
  {% endhint %}

## 前提条件

在创建模拟 USB 设备之前，请确保您的 VM 满足以下要求：

* VM 设置：
  * **允许热插拔** 必须启用
  * **机器类型** 必须为 **9.0** 或更高
* 来宾操作系统中已安装 VirtIO 驱动程序

{% hint style="warning" %}
**机器类型更改**

在修改 VM 的机器类型之前，请创建一个短期快照（24 小时过期），以便在需要时进行回滚。
{% endhint %}

{% hint style="success" %}
**VirtIO 驱动程序安装**

* Linux 发行版通常包含 VirtIO 驱动程序
* 对于 Windows，驱动程序可在 VergeOS 自定义 ISO 中获取，或可从以下位置下载： [VirtIO 驱动程序](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso)
  {% endhint %}

## 创建 USB 设备的步骤

1. **访问 VM 设置**
   * 导航到 VM 仪表板（Virtual Machines > List > 双击您的目标 VM）
2. **创建新驱动器**
   * 点击 **驱动器** 在左侧菜单中
   * 选择 **新建** 从左侧菜单中
3. **配置 USB 设备**
   * 设置 **介质** 为以下任一项 **磁盘** 或 **克隆磁盘**
   * 设置 **接口** 更改为 **USB**
   * 可选：输入自定义名称（留空时系统将自动生成）
   * 如果使用克隆磁盘，请选择相应的 \*.raw 文件
4. **启用设备**
   * 点击 **提交** 以创建设备
   * 从驱动器列表中选择新的 USB 设备
   * 点击 **热插拔** 在左侧菜单中

有关其他驱动器配置选项，请参见： [VM 驱动器](/run-the-platform/virtual-machines/vm-drives.md)

## 故障排除

{% hint style="warning" %}
**常见问题**

* **问题**：设备保持在“热插拔中”状态
  * **解决方案**:
    1. 检查 VM 仪表板日志中的错误
    2. 验证所有前提条件均已满足
    3. 如果最近更改了设置，请尝试重启 VM
* **问题**：设备显示为离线
  * **解决方案**：确保已启用热插拔并已安装 VirtIO 驱动程序
    {% endhint %}

***

{% hint style="info" %}
**文档信息**

* 最后更新：2024-11-19
* VergeOS 版本：4.13
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.verge.io/knowledge-base/zh/virtual-machines/emulate-usb.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
