<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#070040" bgcolor="#FFFFFF">
Hello,<br>
<br>
"virsh save" command dumps memory of the VM.<br>
Maybe you can extract the memory section from "save file" according
to the file definition from libvirt source code.<br>
<br>
From the source code:<br>
<br>
<pre>/**
* 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)
{
</pre>
<br>
At the source file there is a header at the begining followed by a
header. Than dumps of the whole mem.<br>
<br>
<br>
<div class="moz-cite-prefix">On 03/18/2016 09:16 AM, Leekitty wrote:<br>
</div>
<blockquote cite="mid:BLU176-W4148CD82D9D7385FB63B23C28C0@phx.gbl"
type="cite">
<div dir="ltr">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:微软雅黑
}
--></style>
<div dir="ltr"><span style="font-family: tahoma, verdana, arial,
helvetica, sans-serif; font-size: 14px; background-color:
rgb(255, 255, 255);">Can I use 'virsh save' this command
only get 'vm physical memory' ? If not ,please tell me how
can I get it .</span></div>
<div dir="ltr"><span style="font-family: tahoma, verdana, arial,
helvetica, sans-serif; font-size: 14px; background-color:
rgb(255, 255, 255);"><br>
</span></div>
<div dir="ltr"><span style="font-family: Simsun; font-size:
12pt; background-color: rgb(255, 255, 255);">Thanks in
advance.</span></div>
<div dir="ltr"><span style="font-family: Simsun; font-size:
12pt; background-color: rgb(255, 255, 255);"><br>
</span></div>
<div dir="ltr"><span style="font-family: Simsun; font-size:
12pt; background-color: rgb(255, 255, 255);">Lee Wen</span></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
libvirt-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/libvirt-users">https://www.redhat.com/mailman/listinfo/libvirt-users</a></pre>
</blockquote>
<br>
</body>
</html>