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