I snapshot my guests live with qemu-guest-agent. It works pretty much flawlessly with qcow2, but even with raw I can almost always boot off of a snapshot. I combine this with zfs and hourly snapshots and replication and have a really usable backup and DR system that works with my guests, both Windows and Linux.

You should test it with qemu-guest-agent and then try to boot off of it and see if you run into issues. I've been doing this for 2+ years.


On 10/15/2018 3:29 PM, Lentes, Bernd wrote:
Hi,

i have a two node cluster with virtual guests as resources.
I'd like to snapshot the guests once in the night and thought i had a procedure.
But i realize that things in a cluster are a bit more complicated than expected :-))

I will shutdown the guests to have a clean snapshot.
I can shutdown the guests via pacemaker.
But then arises the first problem:

When i issue a "virsh snapshot-create-as" libvirt needs the domain name as a parameter.
but libvirt does not know the domains any longer. When the guests are shutdown a "virsh list --all"
on both nodes does not show any domain.

A look in the respective resource agent VirtualDomain explains why:
The domain is started with virsh create:

"# The 'create' command guarantees that the domain will be
# undefined on shutdown, ...

OK: Now i could of course define all domains with a virsh define.

But then i have immediately the next problem. Now i'd create the snapshots with
"virsh snapshot-create-as" and starts the domains afterwards via cluster.
But let's assume i issue that on node 1 and some guests are started afterwards via pacemaker on node 2.
I can't predict on which node the guests are starting.

Then i don't get a snapshot, right ?

What to do ?

Bernd




--
Doug Hughes
Keystone NAP
Fairless Hills, PA
1.844.KEYBLOCK (439.2562)