第 14 章 主机
14.1. 主机项 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
hosts 集合提供了 Red Hat Enterprise Virtualization 环境中的主机的信息。API 用户可以通过从进入点 URI 获得的 rel="hosts" 链接来访问这些信息。
使用带有
All-Content: true 头的 GET 请求可以获得额外信息。
以下表格包括了主机资源表述中的特定项的信息。
| 项 | 类型 | 描述 | 属性 |
|---|---|---|---|
link rel="storage" | 关系 | 主机存储的 storage 子集合链接。 |
|
link rel="nics" | 关系 | 主机网络接口的 nics 子集合链接。 | |
link rel="tags" | 关系 | 主机标签的 tags 子集合链接。 | |
link rel="permissions" | 关系 | 主机权限的 permissions 子集合链接。 | |
link rel="statistics" | 关系 | 主机统计数据的 statistics 子集合链接。 |
|
link rel="hooks" | 关系 | 主机 hook 的 hooks 子集合链接。 | |
name | 字符串 | 主机的唯一标识。 | |
root_password | 字符串 | 主机的 root 密码,只包括在创建时由客户端提供的主机表述中。 |
|
comment | 字符串 | 主机的备注信息。 | |
address | 字符串 | 主机的 IP 地址或主机名。 |
|
certificate | 复杂数据 | 主机证书的详情,包括 organization 和 subject。 |
|
status | 参阅以下信息 | 主机状态。 |
|
cluster id= | GUID | 包括这个主机的集群标识。 | |
port | 整数 | 在这个主机上运行的 VDSM 守护进程监听的端口。 |
|
type | rhel 或 rhev-h | 主机类型。 |
|
storage_manager priority= | 布尔值:true 或 false | 指定主机是否是一个存储管理器。 |
|
version major= minor= build= revision= full_version= | 复杂数据 | 主机的兼容级别。 |
|
hardware_information | 复杂数据 | 主机硬件相关的信息,包括 manufacturer、version、serial_number、product_name、uuid 和 family。 | |
power_management type= | 复杂数据 | 主机电源管理的配置选项,包括 enabled、options、kdump_detection、automatic_pm_enabled 和 agents。如需了解更多与主机电源管理选项相关的信息,请参阅 第 14.4 节 “电源管理项”。 | |
ksm | 布尔值:true 或 false | true:Kernel SamePage Merging(KSM)被启用。 | |
transparent_hugepages | 布尔值:true 或 false | true:Transparent Hugepages 被启用。 | |
iscsi | 复杂数据 | 主机的 SCSI initiator。 |
|
ssh | 复杂数据 | 使用 SSH 与主机进行连接的详情,包括 port 和 fingerprint。 | |
cpu | 复杂数据 | 主机 CPU 的统计数据,包括 CPU 的 name、topology cores=、topology sockets=、topology threads= 和 speed 子项。topology cores= 是内核的总和,而 topology sockets= 是物理 CPU 的总和。虚拟机可用的内核总数是物理 CPU 的数量乘以每个物理 CPU 的内核数。 |
|
memory | 整数 | 主机内存的总量(以字节为单位)。 |
|
max_scheduling_memory | 整数 | 可以在调度中使用的最大内存数量(以字节为单位)。 |
|
summary | 复杂数据 | 主机上运行的虚拟机的统计数据总结,包括 active、migrating 和 total 虚拟机子项。 |
|
os type= | 复杂数据 | 安装在主机上的操作系统详情,包括 version full_version=。 |
|
libvirt_version major= minor= build= revision= full_version= | 复杂数据 | 主机的 libvirt 兼容级别。 |
|
status 包括以下值之一:down、error、initializing、installing、install_failed、maintenance、non_operational、non_responsive、pending_approval、preparing_for_maintenance、connecting、reboot、unassigned 和 up。这些状态包括在 capabilities 下的 host_states 中。


