Hello,

"virsh save" command dumps memory of the VM.
Maybe you can extract the memory section from "save file" according to the file definition from libvirt source code.

From the source code:

/**
 * virDomainSave:
 * @domain: a domain object
 * @to: path for the output file
 *
 * This method will suspend a domain and save its memory contents to
 * a file on disk. After the call, if successful, the domain is not
 * listed as running anymore (this ends the life of a transient domain).
 * Use virDomainRestore() to restore a domain after saving.
 *
 * See virDomainSaveFlags() for more control.  Also, a save file can
 * be inspected or modified slightly with virDomainSaveImageGetXMLDesc()
 * and virDomainSaveImageDefineXML().
 *
 * Returns 0 in case of success and -1 in case of failure.
 */
int
virDomainSave(virDomainPtr domain, const char *to)
{

At the source file there is a header at the begining followed by a header. Than dumps of the whole mem.


On 03/18/2016 09:16 AM, Leekitty wrote:
Can I use 'virsh save' this command  only get 'vm physical memory' ? If not ,please tell me how can I get it .

Thanks in advance.

Lee Wen


_______________________________________________
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users