> 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/ipmi.md).

# IPMI

如何在 VergeOS 中配置和使用 IPMI 集成，用于远程服务器电源控制、连接测试、凭据管理以及访问 IPMI 网页界面。

IPMI 是一种通用标准，几乎所有硬件都支持，用于管理和访问服务器。即使服务器已断电也可以访问，并允许远程控制服务器以及监控硬件状态，包括温度、功耗、电压、硬件错误等。VergeOS 与 IPMI 集成，提供远程服务器电源控制（开机、重启电源循环等）以及通过 VergeOS 用户界面的便捷访问。

{% hint style="info" %}
由于 IPMI 处理的是物理硬件，因此它仅适用于主机级节点（不适用于租户节点）。
{% endhint %}

## 测试 IPMI 连通性

1. 导航到 **基础设施** > **节点** 从顶部菜单中。
2. **双击所需节点** 以访问节点仪表板。
3. 在 **IPMI** 子菜单下，点击 **测试** 位于左侧菜单中。

### IPMI 连接状态

节点仪表板将显示 IPMI ***状态*** 以及 ***上次连接的日期/时间***:

* **IPMI 状态** - “OK” 表示上次连接尝试成功。如果上次尝试不成功，将显示错误消息。
* **IPMI 上次连接时间** - 显示 VergeOS 系统成功连接到 IPMI 的最后日期/时间。（如果从未成功连接过 IPMI，则该字段将报告“NA”。）

## 更改已存储的 IPMI 登录凭据

{% hint style="success" %}
以下说明用于更改节点将用于与 IPMI 交互的 IPMI 凭据。更改这些字段不会执行 IPMI 用户管理；请连接到你的 IPMI Web 界面以添加或更改 IPMI 用户。
{% endhint %}

1. 在节点仪表板中，点击 **编辑** 位于左侧菜单中的。
2. 输入有效的 ***IPMI 用户***。（IPMI 用户应具有管理员级权限。）
3. 输入 ***IPMI 密码***.
4. 点击 **提交** 以将更改保存到节点。

## 访问 IPMI Web 界面

{% hint style="info" %}
要通过 VergeOS 用户界面成功连接到 IPMI Web 界面，需要存储有效的 IPMI 用户名/密码，并且系统具备合适的网络配置，以便与该节点的 IPMI 进行交互。
{% endhint %}

1. 导航到 **基础设施** > **节点** 从顶部菜单中。
2. **双击所需节点** 以访问节点仪表板。
3. 在 **IPMI** 在左侧菜单中的子菜单，点击 **连接**.
4. 会打开一个新的浏览器标签页，进入 IPMI Web 界面登录页面。

## 通过 REST API 管理 IPMI 凭据

也可以通过 VergeOS REST API 读取和更新 IPMI 凭据。这对于跨多个节点或通过自动化脚本管理凭据非常有用。

### 查找节点键

针对节点的 API 调用使用该节点的行键（`$key`）。列出节点以查找该键：

```http
GET /api/v4/nodes
```

要按名称定位特定节点：

```http
GET /api/v4/nodes?filter=name eq 'node1'
```

响应中包含 `$key` 值，以及诸如 `name`, `ipmi_address`，以及 `ipmi_status`.

### 读取 IPMI 信息

检索单个节点记录：

```http
GET /api/v4/nodes/{key}
```

响应中的 IPMI 相关字段：

| 字段                                | 说明                                                |
| --------------------------------- | ------------------------------------------------- |
| `ipmi_address`                    | BMC 的 IP 地址或主机名。                                  |
| `ipmi_user`                       | BMC 用户名。                                          |
| `ipmi_password`                   | 仅可写；不会包含在读取响应中。                                   |
| `ipmi_status`                     | 连接状态： `ready`, `connecting`, `offline`，或 `error`. |
| `ipmi_sel_free` / `ipmi_sel_used` | 系统事件日志容量计数器。                                      |

### 设置 IPMI 凭据

使用 `PUT` 请求更新已存储的凭据：

```http
PUT /api/v4/nodes/{key}
```

```json
{
  "ipmi_user": "admin",
  "ipmi_password": "newpassword"
}
```

保存凭据时会自动运行连通性测试；无需单独执行测试操作。如果测试无法运行——例如，该节点没有 IPMI 地址——API 会返回错误，并且更新不会被保存。要验证更新，请再次读取节点记录并确认 `ipmi_status` 是 `ready`.

### 触发 IPMI 操作

若要在不更改凭据的情况下运行连通性测试或清除系统事件日志，请提交一个节点操作：

```http
POST /api/v4/node_actions
```

```json
{
  "$row": "/v4/nodes/{key}",
  "action": "ipmi_test"
}
```

可用的 IPMI 操作有 `ipmi_test` 以及 `clear_sel`.

{% hint style="info" %}
IPMI 仅适用于主机级节点，且 `ipmi_password` 无法通过 API 读回。
{% 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/run-the-platform/zh/xi-tong-guan-li/ipmi.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.
