<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1038.36">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 13.0px Arial}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 13.0px Arial; min-height: 15.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica}
span.s1 {text-decoration: underline}
</style>


<p class="p1">Hi ,</p>
<p class="p2"><br></p>
<p class="p1">I am trying to perform offline migration (i.e) Create an incremental image using the qcow format, transfer the vm memory state to a state fie.Use the image and statefile together as a template. Now create a new vm using the template. I can successfully do it using the following commands : </p>


<p class="p2"><br></p>
<p class="p1"><span class="s1">Save phase :</span></p>
<p class="p1">stop</p>
<p class="p1">migrate "exec:gzip -c > STATEFILE.gz"</p>
<p class="p1">qemu-img </p>
<p class="p1">qemu-img create -b BASE_img -f qcow2 INCRE_img</p>
<p class="p2"><br></p>
<p class="p1"><span class="s1">Restore phase :</span></p>
<p class="p1">qemu-kvm -m 1024 -hda INCRE_img -incoming "exec: gzip -c -d STATEFILE.gz"</p>
<p class="p2"><br></p>
<p class="p1">And it works fine. But I am not able to find the vm with virt-manager or other libvirt based tools.</p>
<p class="p2"><br></p>
<p class="p1">If I use : </p>
<p class="p1">virsh save <dom_id> STATEFILE</p>
<p class="p2"><br></p>
<p class="p1">I can restore using "virsh restore STATEFILE" but I want to associate this with the incremental image that I created, but I dont know how. I think it saves the existing vm's xml file along with the STATEFILE, thus I am not able to change the disk image to the incremental image.</p>


<p class="p2"><br></p>
<p class="p1">Thus ,</p>
<p class="p1">1. Either I should find a way to make vms created using qemu-kvm appear in libvirt-based tools.</p>
<p class="p2"><br></p>
<p class="p1">OR </p>
<p class="p2"><br></p>
<p class="p1">2. Find a way to associate the virsh save STATEFILE with a incremental image. </p>
<p class="p2"><br></p>
<p class="p1">Any help or hint with respect to these will be very helpful. I am try to do cloning with minimal cost. This takes only 25 seconds ( to create STATEFILE) and creating incremental image is instantatenous . But I want to use the vm monitoring code based on libvirt. And it makes life difficult. </p>


<p class="p2"><br></p>
<p class="p1">Thanks for your help. </p>
<p class="p3"><br></p>
<p class="p4">-</p>
<p class="p4">Regards,</p>
<p class="p4">Sethuraman Subbiah</p>
<p class="p3"><br></p>
<p class="p4">Graduate Student - NC state University</p>
<p class="p4">M.S in Computer Science</p>