pcs constraint order start fs_group-clone then vm1
Troubleshooting
Issue: VM live migration failed due to SELinux.
~]# tail -f /var/log/message Oct 6 16:26:42 kvm02 journal[835002]: operation failed: migration out job: unexpectedly failed Oct 6 16:26:43 kvm02 dbus-daemon[1119]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd' Oct 6 16:26:43 kvm02 systemd[1]: Started SETroubleshoot daemon for processing new SELinux denial logs. Oct 6 16:26:44 kvm02 dbus-daemon[1119]: [system] Activating service name='org.fedoraproject.SetroubleshootPrivileged' requested by ':1.888' (uid=991 pid=842191 comm="/usr/libexec/platform-python -Es /usr/sbin/setroub" label="system_u:system_r:setroubleshootd_t:s0") (using servicehelper) Oct 6 16:26:45 kvm02 dbus-daemon[1119]: [system] Successfully activated service 'org.fedoraproject.SetroubleshootPrivileged' Oct 6 16:26:46 kvm02 setroubleshoot[842191]: SELinux is preventing /usr/libexec/qemu-kvm from read access on the file vm1.qcow2. For complete SELinux messages run: sealert -l 83a2dae1-a4d6-4fe5-949d-15082c01f5b6
~]# sealert -l 83a2dae1-a4d6-4fe5-949d-15082c01f5b6 SELinux is preventing /usr/libexec/qemu-kvm from read access on the file /vm/data/vm1.qcow2.
If vm1.qcow2 is a virtualization target Then you need to change the label on vm1.qcow2' Do # semanage fcontext -a -t virt_image_t '/vm/data/vm1.qcow2' # restorecon -v '/vm/data/vm1.qcow2'
If you believe that qemu-kvm should be allowed read access on the vm1.qcow2 file by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # ausearch -c 'live_migration' --raw | audit2allow -M my-livemigration # semodule -X 300 -i my-livemigration.pp
Additional Information: Source Context system_u:system_r:svirt_t:s0:c206,c294 Target Context system_u:object_r:svirt_image_t:s0:c721,c940 Target Objects /vm/data/vm1.qcow2 [ file ] Source live_migration Source Path /usr/libexec/qemu-kvm Port <Unknown> Host kvm02 Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-3.14.3-108.el8.noarch Local Policy RPM selinux-policy-targeted-3.14.3-108.el8.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name kvm02 Platform Linux kvm02 4.18.0-425.3.1.el8.x86_64 #1 SMP Fri Sep 30 11:45:06 EDT 2022 x86_64 x86_64 Alert Count 2 First Seen 2025-10-06 16:26:41 CST Last Seen 2025-10-06 16:26:41 CST Local ID 83a2dae1-a4d6-4fe5-949d-15082c01f5b6
Raw Audit Messages type=AVC msg=audit(1759739201.904:2640): avc: denied { read } for pid=839298 comm="worker" path="/vm/data/vm1.qcow2" dev="dm-4" ino=155106 scontext=system_u:system_r:svirt_t:s0:c206,c294 tcontext=system_u:object_r:svirt_image_t:s0:c721,c940 tclass=file permissive=0
~]# tail -f /var/log/libvirt/qemu/vm1.log 2025-10-06 08:26:40.971+0000: initiating migration 2025-10-06T08:26:41.905381Z qemu-kvm: qemu_savevm_state_complete_precopy_non_iterable: bdrv_inactivate_all() failed (-1) 2025-10-06T08:26:41.906030Z qemu-kvm: Could not reopen qcow2 layer: Could not read qcow2 header: Permission denied 2025-10-06T08:26:42.185453Z qemu-kvm: Unable to read from socket: Bad file descriptor 2025-10-06T08:26:42.185504Z qemu-kvm: Unable to read from socket: Bad file descriptor 2025-10-06T08:26:42.185523Z qemu-kvm: Unable to read from socket: Bad file descriptor
Cause:
SELinux is not supported for GFS2, SELinux labels on GFS2 file systems can get out of sync between cluster nodes because of how they are cached in memory.
Solution:
Specify the mount options when you create a GFS2 file system resource.