Greetings,
I am developing a platform for test and debug use.
The typical scenario I want to realize is the following:
I run a .qcow2 image via QEMU-KVM, the running OS is not relevant.
I want to take several snapshots of both Disk and RAM status; same file,
separate files doesn't matter.
I just need a way to have consistent information about them (better with
XML description) and the data as well.
I want to store these snapshots on my storage devices to use them whenever
and wherever I want.
Is it possible to store a single snapshot providing both the memory and
disks state in a file (maybe a .qcow2 file)?
Is there any way to get a unique interface which handles my snapshots?
I was used to use the virDomainSnapshotCreateXML() defining the destination
file in the XML with <disk> fields.
After updating libvirt it was not working anymore, I thought was a bug but
then I realized it was intentional.
The function complains about the fact that the <disk> parameter is not
accepted anymore.
So I started guessing how to solve reading the API documentation and I fall
in a completely nebulous world.
For what I got:
- virDomainSnapshotCreateXML():
According to flags can take system checkpoints (really useful) and disks
snapshots.
System checkpoints: What I need but I didn't find any way to retrieve the
storage file; I'm only able to get the snapshot pointer, quite useless as
from its pointer I can only print the XML description.
Disk snapshot: here through the XML description I can specify a target file
where to write the information. But I still need the memory status.
- virDomainSaveFlags():
No matter how I set the flags, it halts the guest; I need it still running
afterward and I think that reverting the domain and restarting for my
scenarios is unaffordable.
- virDomainCoreDump():
Does what I need for the memory, but doesn't give any XML description and
doesn't supply any useful interface to handle it, I just get back an int
that represent the exit status of the routine.
(other functions really similar)
The question is: why all this confusion?
I absolutely understand the problematic that realizing a multiplatform
snapshots management raises; but I think that for an API purpose what is
implemented here is completely confusing the developer.
Regards,
NoxDaFox.