1.3. 用于每个虚拟化平台的 virt-who 配置
使用指定虚拟化类型和虚拟化管理器进行查询的详细信息的文件配置 virt-who。每种虚拟化平台支持的配置会有所不同。
典型的 virt-who 配置文件
这个示例显示了使用 Satellite Web UI 或 Hammer CLI 创建的典型 virt-who 配置文件:
[virt-who-config-1]
type=libvirt
hypervisor_id=hostname
owner=Default_Organization
env=Library
server=hypervisor1.example.com
username=virt_who_user
encrypted_password=$cr_password
rhsm_hostname=satellite.example.com
rhsm_username=virt_who_reporter_1
rhsm_encrypted_password=$user_password
rhsm_prefix=/rhsm
类型 和服务器 值取决于虚拟化平台。下表提供了更多详细信息。
用户名 指的是虚拟机监控程序或虚拟化管理器上的只读用户,您必须在配置 virt-who 之前创建该管理程序或虚拟化管理器。rhsm-username 指的是自动生成的用户,只有 virt-who 报告到卫星服务器的权限。
每个虚拟化平台的所需配置
使用此表规划您的 virt-who 配置:
| 支持的虚拟化平台 | 在配置文件中指定的类型 | 在配置文件中指定的服务器 | 部署配置文件的服务器 |
|---|---|---|---|
| Red Hat Virtualization RHEL 虚拟化(KVM) Red Hat OpenStack Platform | libvirt | 管理程序(每个虚拟机监控程序一个文件) | 每个虚拟机监控程序 |
| VMware vSphere | esx | vCenter Server | Satellite Server、Capsule Server 或一个专用的 RHEL 服务器 |
| Microsoft Hyper-V | hyperv | Hyper-V 管理程序(每个虚拟机监控程序一个文件) | Satellite Server、Capsule Server 或一个专用的 RHEL 服务器 |
virt-who 配置文件示例
显示一些常见虚拟机监控程序类型的 virt-who 配置文件示例。
OpenStack virt-who 配置示例
[root@compute-node]# cat /etc/virt-who.d/virt-who-config-1.conf
This configuration file is managed via the virt-who configure plugin
manual edits will be deleted.
[virt-who-config-1]
type=libvirt
hypervisor_id=hostname
owner=ORG
env=Library
server=qemu:///system <====
username=virt-who-user
encrypted_password=xxxxxxxxxxx
rhsm_hostname=satellite.example.com
rhsm_username=virt_who_reporter_1
rhsm_encrypted_password=yyyyyyyyyyy
rhsm_prefix=/rhsm
KVM virt-who 配置示例
type=libvirt
hypervisor_id=hostname
owner=gss
env=Library
server=qemu+ssh://root@libvirt.example.com/system
username=root
encrypted_password=33di3ksskd
rhsm_hostname=satellite.example.com
rhsm_username=virt_who_reporter_2
rhsm_encrypted_password=23233dj3j3k
rhsm_prefix=/rhsm
VMware virt-who 配置示例
type=esx
hypervisor_id=hostname
owner=gss
env=Library
server=vcenter.example.com
username=username_vcenter@example.com
encrypted_password=33di3ksskd
rhsm_hostname=satellite.example.com
rhsm_username=virt_who_reporter_2
rhsm_encrypted_password=23233dj3j3k
rhsm_prefix=/rhsm
不支持 rhevm 和 xen 管理程序类型。
kubevirt hypervisor 类型仅作为技术预览提供。