> 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/tenants/vm-hotplug-capabilities.md).

# 虚拟机和租户热插拔能力

本文介绍了在运行中的虚拟机和租户上，哪些资源可以在不需要重新上电的情况下修改，以及哪些更改需要重启。

## 虚拟机热插拔

该 **允许热插拔** VM 上的设置（默认启用）控制在 VM 运行时是否可以添加或移除磁盘和网卡。

### 哪些可以热插拔

| 资源       | 热插拔 | 说明                                               |
| -------- | --- | ------------------------------------------------ |
| **驱动器**  | 是   | 来宾操作系统必须支持热添加；建议使用 Virtio-SCSI 接口                |
| **网卡**   | 是   | 现代来宾操作系统普遍支持                                     |
| **磁盘扩容** | 是   | Virtio-SCSI 磁盘可以在不停机的情况下扩展；来宾操作系统可能需要重新扫描或扩展文件系统 |

### 哪些需要重新上电

| 资源            | 需要重新上电 | 说明                      |
| ------------- | ------ | ----------------------- |
| **RAM**       | 是      | 内存更改始终需要将 VM 关机后再开机     |
| **CPU 核心**    | 是      | 核心数更改始终需要重新上电           |
| **控制台类型**     | 是      | VNC/Spice/串口更改会在下次开机时生效 |
| **显卡**        | 是      | 视频适配器更改需要重新上电           |
| **机器类型**      | 是      | 芯片组更改需要重新上电             |
| **UEFI/BIOS** | 是      | 启动模式更改需要重新上电            |

### 热插拔要求

要使磁盘和网卡热插拔生效：

1. **允许热插拔** 必须在 VM 中启用（这是默认设置）
2. 来宾操作系统必须支持该设备类型的热插拔
3. 对于磁盘，使用 **Virtio-SCSI** 接口可提供最佳的热插拔兼容性

### 执行热插拔操作

**在 VM 运行时添加磁盘或网卡：**

1. 进入 VM 仪表板
2. 点击 **驱动器** 或 **网卡** 左侧菜单中的
3. 点击 **新建** 以添加设备
4. 该设备会出现在来宾操作系统中（某些操作系统可能需要重新扫描）

**在 VM 运行时移除磁盘或网卡：**

1. 进入 VM 仪表板
2. 点击 **驱动器** 或 **网卡** 左侧菜单中的
3. 选择要移除的设备
4. 点击 **热插拔** 左侧菜单中的，以安全卸载它
5. 卸载后，可以删除该设备

{% hint style="warning" %}
**来宾操作系统注意事项**

在热移除磁盘之前，请确保来宾操作系统没有在使用它。请先卸载文件系统，并从任何卷组或 RAID 阵列中移除。
{% endhint %}

***

## 租户节点资源

在资源更改方面，租户节点与 VM 的行为不同。

### 租户资源可在线更改

| 资源         | 在线更改 | 说明                     |
| ---------- | ---- | ---------------------- |
| **RAM**    | 是    | 租户节点内存可以在不重启的情况下增加或减少  |
| **CPU 核心** | 是    | 租户节点核心数可以在不重启的情况下增加或减少 |
| **存储**     | 是    | 存储层可以在不重启的情况下添加或扩展     |

租户节点专为灵活分配资源而设计。你可以在不影响租户内运行的工作负载的情况下，从父系统调整租户节点的 RAM 和核心数。

### 如何修改租户节点资源

1. 在租户仪表板中，点击 **节点** 左侧菜单中的
2. 双击要修改的租户节点
3. 点击 **编辑** 左侧菜单中的
4. 调整 **核心数** 和/或 **RAM** 按需
5. 点击 **提交**

更改会立即生效，无需重启租户或其工作负载。

{% hint style="success" %}
**资源规划**

虽然租户节点资源可以动态更改，但这些资源必须在物理主机上实际可用。系统会在提交更改时验证可用性。
{% endhint %}

***

## 总结

| 组件       | RAM  | CPU  | 驱动器 | 网卡  |
| -------- | ---- | ---- | --- | --- |
| **VM**   | 重新上电 | 重新上电 | 热插拔 | 热插拔 |
| **租户节点** | 在线更改 | 在线更改 | 不适用 | 不适用 |

对于 VM，请在开机前规划好 RAM 和 CPU 需求，因为更改需要重新上电。磁盘和网卡可以动态调整。

对于租户，资源可以随时调整而不会中断服务，这使得可以在需求变化时轻松扩展租户环境。


---

# 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/tenants/vm-hotplug-capabilities.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.
