> 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/run-the-platform/zh/xi-tong-guan-li/device-pass-overview.md).

# 设备直通概览

VergeOS 支持多种设备直通类型，使虚拟机能够访问连接到其宿主服务器的物理设备

{% hint style="success" %}
**BIOS 设置**

要启用 PCI 直通（独占、SR-IOV 网卡或 vGPU），必须在服务器 BIOS 中正确配置直通/虚拟化功能；Intel 主机需要 ***VT-d 和 VT-x*** 已启用，而 AMD 则需要 ***AMD-vi/AMD-V***, ***IOMMU*** 已启用。不同 BIOS 厂商的设置名称会有所不同；其他常见的相关名称包括与 ***虚拟化***, ***PCI 直通***、\*\*\*PCIe\*\*\* 等类似的术语。如果不确定，请查阅硬件供应商文档。
{% endhint %}

## PCI 直通风险/注意事项

### 宿主关键设备

切勿直通启动设备、主系统控制器、核心 fabric 网络控制器，或宿主所需的任何其他设备。直通宿主关键设备会使其对宿主不可用，从而可能导致单个节点或整个系统不稳定，甚至无法使用。

### 备用管理访问

在配置 PCI 或网络控制器直通之前应采取预防措施，因为错误配置可能导致系统远程访问丢失。在进行更改之前， **请确认您拥有 "admin" 用户（用户 ID #1）的密码，并确保您有另一种访问节点的方法：物理控制台访问或 IPMI 访问。**

### IOMMU 分组要求

同一 IOMMU 组内的所有 PCI 设备会一起直通（单个 IOMMU 组不能拆分给不同的来宾）。包含多个 PCI 设备的单个 IOMMU 组示例包括：GPU 及其音频控制器；双端口网卡（两个端口）；使用 PCI 转接卡、允许多个设备位于同一 PCI 插槽上的设备。

在为任何 PCI 设备配置直通时，务必了解同一 IOMMU 组内的所有设备，以确保不会无意中直通宿主必需组件。如果将宿主关键组件配置为直通，它将被卸载，并可能导致系统受损或崩溃。您可以在资源管理器：基础架构 > 资源 > PCI 设备中查看 PCI 设备的 IOMMU 组归属。此处将列出所有节点上检测到的所有 PCI 设备。点击 *IOMMU* 列标题可进行排序，并更容易确定属于同一 IOMMU 组的设备。

## 资源组

VergeOS 资源组用于所有设备直通；设备必须属于资源组，才能直通到 VM 或租户。资源组可以只包含单个设备，也可以包含多个相同（或高度相似）的设备池，以供 VM 使用（或者供租户进而提供给其自己的 VM）。要将设备附加到 VM 或租户，请选择资源组，这样 VM 就可以在需要时从池中提取可用设备（例如在 VM/租户启动时）。

## 资源规则

资源规则包含用于确定要包含在资源组中的设备的筛选条件。每条规则都可以根据设备名称、厂商、插槽、序列号等属性的组合来筛选可用设备；可用字段将因具体类型（PCI、USB、SR-IOV 网卡或 NVIDIA vGPU）而异。

### 自动生成

通常，建议（也最简单）通过选择要直通的设备让系统自动生成资源规则。关于自动生成资源规则的说明包含在下面提供的链接（设备直通类型）中。

### 手动创建/编辑

知识库文章： [设备直通 - 高级配置](/knowledge-base/zh/tenants/dev-passthrough-advanced.md) 提供了有关手动创建和编辑资源规则的信息。

## 设备直通类型

* [**一对一 PCI 直通**](/run-the-platform/zh/xi-tong-guan-li/generic-pci-passthrough.md) - 使 VM 能够使用物理安装在宿主上的 PCI 设备，提供单个设备到单个 VM 的访问（一次一个）。该 PCI 设备的功能就像物理连接到来宾操作系统上一样。
* [**USB 设备直通**](/run-the-platform/zh/xi-tong-guan-li/usb-passthrough.md) - 允许 VM 访问连接到宿主机的 USB 设备。这使用户能够在 VM 中访问 USB 设备，就像它们直接连接到 VM 一样。提供单个设备到单个 VM 的访问（一次一个）。
* [**NVIDIA vGPU**](/run-the-platform/zh/xi-tong-guan-li/nvidia-vgpu-configuration.md) - 宿主节点上安装的物理 NVIDIA GPU 被拆分为多个虚拟 GPU；vGPU 使多个 VM 能够访问一块 GPU 硬件。
* [**SR-IOV VF 网卡**](/run-the-platform/zh/xi-tong-guan-li/sriov-nics.md) -- 单根 I/O 虚拟化（SR-IOV）规范用于从一块支持 SR-IOV 的物理网卡创建多个虚拟功能（网络适配器的虚拟化实例），随后可供 VM 使用。


---

# 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/run-the-platform/zh/xi-tong-guan-li/device-pass-overview.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.
