Virtualization

Add a KVM Virtual Machine to Pacemaker

Define one cluster-owned guest consistently; Configure start, stop, monitor, and placement behavior; Move the guest cleanly between nodes; Prove only one node owns the running domain and disk at a time.

By InventiveHQ Team

Episode 23 of the InventiveHQ KVM virtualization series.

Lab verified July 2026 · Ubuntu 26.04 · libvirt 12.0.0 · QEMU 10.2.1

What this episode proves

  • Define one cluster-owned guest consistently
  • Configure start, stop, monitor, and placement behavior
  • Move the guest cleanly between nodes
  • Prove only one node owns the running domain and disk at a time

Validated workflow

1. Define one cluster-owned guest consistently

./setup-shared-storage.sh

2. Configure start, stop, monitor, and placement behavior

pcs resource create ha-demo01 ocf:heartbeat:VirtualDomain config=/var/lib/libvirt/ha-shared/ha-demo01.xml

3. Move the guest cleanly between nodes

pcs resource move-with-constraint ha-demo01 kvm-ha02

4. Prove only one node owns the running domain and disk at a time

pcs resource clear ha-demo01

Finished state

Pacemaker owns ha-demo01 and places it on the preferred node. The public scripts contain no private keys, passwords, or tokens. Review names, addresses, paths, ownership, backups, quorum, and fencing for your own environment before running them.

Need help from an IT & cybersecurity partner?

InventiveHQ helps businesses secure, modernize, and run their technology. Let's talk about your goals.

Get in touch