On 01/25/2016 04:16 PM, Daniel P. Berrange wrote:
On Mon, Jan 25, 2016 at 02:55:30PM +0300, Alexander Burluka wrote:
> For example, we want to store suspended state of VM.
> I'm aware that some other careless application dealing with libvirt
> may erase metadata section and info about additional snapshot data will be
> lost.
What do you mean by suspended state of the VM ? Are you referring to
the VM memory & device state ? If so, I think that something that
should be explicitly represented in the API, not a opaque blob.
We distinguish
paused and suspended to disk domain states. For suspend
to disk we are using virDomainSaveFlags API call and stop domain.
This API call stores VM memory and device states to some file. If user
then calls virDomainSnapshotCreateXML, the resulted snapshot lacks
VM memory and device states because it looks like domain is stopped and
it is not aware about state file. Thus, switch to this snapshot does not
work as expected.
We need to store this file somewhere, so what API change could be done
here? Or maybe we can emulate suspend to disk in other way? Please advice.
Thank you!
Regards,
Daniel
--
Regards,
Alexander Burluka