This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.7.2. 为 virt-launcher pod 扩展 SELinux 策略
virt-launcher Pod 的 container_t SELinux 策略被扩展来启用 OpenShift Virtualization 的基本功能。
网络多队列需要以下策略,它可在可用 vCPU 数量增加时扩展网络性能:
-
allow process self (tun_socket (relabelfrom relabelto attach_queue))
-
以下策略允许
virt-launcher读取/proc目录中的文件,包括/proc/cpuinfo和/proc/uptime:-
allow process proc_type (file (getattr open read))
-
以下策略允许
libvirtd转发与网络相关的调试信息。allow process self (netlink_audit_socket (nlmsg_relay))注意如果没有此策略,则阻止任何转发网络调试信息。这可能会通过 SELinux 拒绝填充节点的审计日志。
以下策略允许
libvirtd访问hugetblfs,这是支持巨页所必需的:-
allow process hugetlbfs_t (dir (add_name create write remove_name rmdir setattr)) -
allow process hugetlbfs_t (file (create unlink))
-
以下策略允许
virtiofs挂载文件系统并访问 NFS:-
allow process nfs_t (dir (mounton)) -
allow process proc_t (dir (mounton)) -
allow process proc_t (filesystem (mount unmount))
-