sudo nmcli con add type bond con-name bond-hb ifname bond-hb bond.options "mode=active-backup,miimon=1000" sudo nmcli con add type ethernet slave-type bond con-name bond-hb-ens224 ifname ens224 master bond-hb sudo nmcli con add type ethernet slave-type bond con-name bond-hb-ens256 ifname ens256 master bond-hb sudo nmcli con modify bond-hb ipv4.addresses 100.100.100.91/24 ipv4.method manual autoconnect yes connection.autoconnect-slaves 1 sudo nmcli con up bond-hb cat /proc/net/bonding/bond-hb
# On one node of the cluster sudo vgcreate --shared shared_vg1 /dev/sdb sudo vgcreate --shared shared_vg2 /dev/sdc
# On the second node in the cluster sudo lvmdevices --adddev /dev/sdb sudo lvmdevices --adddev /dev/sdc sudo vgchange --lockstart shared_vg1 sudo vgchange --lockstart shared_vg2
Create LV and filesystem.
# On one node of the cluster sudo lvcreate --activate sy -L10G -n shared_lv1 shared_vg1 sudo lvcreate --activate sy -l +100%FREE -n shared_lv2 shared_vg2 sudo mkfs.gfs2 -j2 -p lock_dlm -t vmcluster:gfs2-fs1 /dev/shared_vg1/shared_lv1 sudo mkfs.gfs2 -j2 -p lock_dlm -t vmcluster:gfs2-fs2 /dev/shared_vg2/shared_lv2
~]$ mount | grep gfs2 /dev/mapper/shared_vg1-shared_lv1 on /vm/data type gfs2 (rw,noatime,seclabel,rgrplvb) /dev/mapper/shared_vg2-shared_lv2 on /vm/config type gfs2 (rw,noatime,seclabel,rgrplvb)
~]$ sudo pcs status --full Cluster name: vmcluster Cluster Summary: * Stack: corosync (Pacemaker is running) * Current DC: cls02 (2) (version 2.1.10-3.el9_8-5693eaeee) - partition with quorum * Last updated: Mon Sep 21 14:47:48 2026 on cls01 * Last change: Mon Sep 21 14:44:02 2026 by root via root on cls01 * 2 nodes configured * 13 resource instances configured
Node List: * Node cls01 (1): online, feature set 3.19.6 * Node cls02 (2): online, feature set 3.19.6
Full List of Resources: * scsi-shooter (stonith:fence_scsi): Started cls01 * Clone Set: locking-clone [locking]: * Resource Group: locking:0: * dlm (ocf:pacemaker:controld): Started cls02 * lvmlockd (ocf:heartbeat:lvmlockd): Started cls02 * Resource Group: locking:1: * dlm (ocf:pacemaker:controld): Started cls01 * lvmlockd (ocf:heartbeat:lvmlockd): Started cls01 * Clone Set: shared_vg1-clone [shared_vg1]: * Resource Group: shared_vg1:0: * sharedlv1 (ocf:heartbeat:LVM-activate): Started cls02 * sharedfs1 (ocf:heartbeat:Filesystem): Started cls02 * Resource Group: shared_vg1:1: * sharedlv1 (ocf:heartbeat:LVM-activate): Started cls01 * sharedfs1 (ocf:heartbeat:Filesystem): Started cls01 * Clone Set: shared_vg2-clone [shared_vg2]: * Resource Group: shared_vg2:0: * sharedlv2 (ocf:heartbeat:LVM-activate): Started cls02 * sharedfs2 (ocf:heartbeat:Filesystem): Started cls02 * Resource Group: shared_vg2:1: * sharedlv2 (ocf:heartbeat:LVM-activate): Started cls01 * sharedfs2 (ocf:heartbeat:Filesystem): Started cls01
The requested volume capacity will exceed the available pool space when the volume is fully allocated
~]$ sudo virt-install \ --virt-type kvm \ --name vm1 \ --memory 2048 \ --vcpus 1 \ --os-type linux \ --os-variant centos7.0 \ --network bridge=br0 \ --disk /vm/data/vm1.qcow2,size=10,bus=virtio,format=qcow2 \ --location http://192.168.3.112/assets/tmp/mnt -x console=ttyS0 \ --graphics none WARNING --os-type is deprecated and does nothing. Please stop using it. WARNING The requested volume capacity will exceed the available pool space when the volume is fully allocated. (10240 M requested capacity > 10172 M available) ERROR The requested volume capacity will exceed the available pool space when the volume is fully allocated. (10240 M requested capacity > 10172 M available) (Use --check disk_size=off or --check all=off to override)
Oct 3 18:28:25 cls02 pacemaker-controld[1488]: notice: Requesting local execution of start operation for vm1 on cls02 Oct 3 18:28:25 cls02 VirtualDomain(vm1)[38974]: ERROR: Failed to start virtual domain vm1. Oct 3 18:28:25 cls02 pacemaker-controld[1488]: notice: Result of start operation for vm1 on cls02: error (Failed to start virtual domain vm1.) Oct 3 18:28:25 cls02 pacemaker-controld[1488]: notice: vm1_start_0@cls02 output [ error: Failed to open file '/vm/config/vm1.xml': Permission denied ] Oct 3 18:28:25 cls02 pacemaker-controld[1488]: notice: vm1_start_0@cls02 output [ ocf-exit-reason:Failed to start virtual domain vm1. ] Oct 3 18:28:25 cls02 pacemaker-attrd[1486]: notice: Setting last-failure-vm1#start_0[cls02] in instance_attributes: (unset) -> 1791023305
Workaround:
Disable SElinux.
sudo setenforce 0
migration failed: Invalid argument
~]$ sudo virsh migrate --domain vm1 \ --desturi qemu+ssh://cls02/system \ --persistent --undefinesource \ --unsafe --live error: operation failed: migration failed. Message from the source host: operation failed: job 'migration out' failed: Error in migration completion: Bad address. Message from the destination host: operation failed: job 'migration in' failed: load of migration failed: Invalid argument
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' ***** Plugin catchall (2.13 confidence) suggests ************************** 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 'mig/src/main' --raw | audit2allow -M my-migsrcmain # semodule -X 300 -i my-migsrcmain.pp Additional Information: Source Context system_u:system_r:svirt_t:s0:c262,c621 Target Context system_u:object_r:svirt_image_t:s0:c117,c538 Target Objects /vm/data/vm1.qcow2 [ file ] Source mig/src/main Source Path /usr/libexec/qemu-kvm Port <Unknown> Host <Unknown> Source RPM Packages qemu-kvm-core-10.1.0-17.el9_8.5.x86_64 Target RPM Packages SELinux Policy RPM selinux-policy-targeted-38.1.65-1.el9.noarch Local Policy RPM selinux-policy-targeted-38.1.65-1.el9.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name cls01 Platform Linux cls01 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Oct 17 14:16:35 EDT 2025 x86_64 x86_64 Alert Count 2 First Seen 2026-10-07 18:36:53 CST Last Seen 2026-10-07 18:36:53 CST Local ID 23ba612a-59fa-4059-bcfa-4104455b1838 Raw Audit Messages type=AVC msg=audit(1791369413.57:3119): avc: denied { read } for pid=3831373 comm="worker" path="/vm/data/vm1.qcow2" dev="dm-4" ino=81573 scontext=system_u:system_r:svirt_t:s0:c262,c621 tcontext=system_u:object_r:svirt_image_t:s0:c117,c538 tclass=file permissive=0 type=SYSCALL msg=audit(1791369413.57:3119): arch=x86_64 syscall=pread success=no exit=EACCES a0=d a1=7f14f64ebf58 a2=70 a3=0 items=0 ppid=1 pid=3831373 auid=4294967295 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 tty=(none) ses=4294967295 comm=worker exe=/usr/libexec/qemu-kvm subj=system_u:system_r:svirt_t:s0:c262,c621 key=(null)ARCH=x86_64 SYSCALL=pread AUID=unset UID=qemu GID=qemu EUID=qemu SUID=qemu FSUID=qemu EGID=qemu SGID=qemu FSGID=qemu Hash: mig/src/main,svirt_t,svirt_image_t,file,read
Workaround:
Disable SElinux.
~]$ sudo semanage fcontext -a -t svirt_image_t "/vm/data(/.*)?"# this not work. ~]$ sudo restorecon -Rv /vm/data
~]$ sudo setenforce 0 ~]$ sudo sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
error: internal error: unable to execute QEMU command
~]$ sudo virsh domblkinfo vm1 --all error: internal error: unable to execute QEMU command'query-named-block-nodes': Block device libvirt-1-format is ejected