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
type 和 server 值取决于虚拟化平台。下表提供了更详细的信息。
用户名 指的是虚拟机监控程序或虚拟化管理器上的只读用户,您必须在配置 virt-who 前创建它。rhsm-username 是指只向 Satellite 服务器报告 virt-who 权限的用户。
每个虚拟化平台所需的配置
使用此表规划 virt-who 配置:
| 支持的虚拟化平台 | 配置文件中指定的类型 | 配置文件中指定的服务器 | 部署配置文件的服务器 |
|---|---|---|---|
| Red Hat Virtualization RHEL Virtualization (KVM) Red Hat OpenStack Platform | libvirt | hypervisor (每个虚拟机监控程序有一个文件) | 每个 hypervisor |
| VMware vSphere | esx | vCenter Server | Satellite 服务器、Capsule 服务器或专用 RHEL 服务器 |
| Microsoft Hyper-V | hyperv | Hyper-V hypervisor (每个虚拟机监控程序有一个文件) | Satellite 服务器、Capsule 服务器或专用 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
不支持 xen 和 xen 管理程序类型。
kubevirt hypervisor 类型仅作为技术预览提供。