[libvirt] save/ restore a domain with kvm

I am working with virsh The version of VIRSH as it shows is : virsh # version Compiled against library: libvir 0.4.4 Using library: libvir 0.4.4 Using API: QEMU 0.4.4 Running hypervisor: QEMU 0.9.1 Under virsh I do the following : 1. suspend a running VM 2. save it to a file with the 'save' command 3. restore the saved domain file with the 'restore' command while the domain is still in the suspend mode or after it was shutdown/destroyed (not seen with 'list --all) In either case I get the error message saying : virsh # restore /home/dubi/xml/vm_dubi2.sav libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from /home/dubi/xml/vm_dubi2.xml Any idea what is the failure reason ? The content of the saved domain file isattached: Zvi Dubitzky Virtualization and System Architecture Email:dubi@il.ibm.com IBM Haifa Research Laboratory Phone: +972-4-8296182 Haifa, 31905, ISRAEL

On Sun, Mar 22, 2009 at 08:04:17PM +0200, Zvi Dubitzky wrote:
I am working with virsh
The version of VIRSH as it shows is : virsh # version Compiled against library: libvir 0.4.4 Using library: libvir 0.4.4 Using API: QEMU 0.4.4 Running hypervisor: QEMU 0.9.1
Under virsh I do the following : 1. suspend a running VM 2. save it to a file with the 'save' command 3. restore the saved domain file with the 'restore' command while the domain is still in the suspend mode or after it was shutdown/destroyed (not seen with 'list --all) In either case I get the error message saying :
virsh # restore /home/dubi/xml/vm_dubi2.sav libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from /home/dubi/xml/vm_dubi2.xml
Any idea what is the failure reason ?
Check the /var/log/libvirt/qemu/$HOME.log file for more information from QEMU Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Here is the /var/log/libvirt/qemu/vm_dubi2.log file. It shows a trailing '-incoming stdio' which is rejected by QEMU, The rest is correct and is probably the translation of the XML. The XML as appears in the saved file vm_dubi2.sav (also below) looks fine . But that file has some prefix binary section which I do not know its content Again , the saved VM state file is : thanks Zvi Dubitzky Virtualization and System Architecture Email:dubi@il.ibm.com IBM Haifa Research Laboratory Phone: +972-4-8296182 Haifa, 31905, ISRAEL "Daniel P. Berrange" <berrange@redhat.com> Sent by: libvir-list-bounces@redhat.com 23/03/2009 11:36 Please respond to "Daniel P. Berrange" <berrange@redhat.com> To Zvi Dubitzky/Haifa/IBM@IBMIL cc libvir-list@redhat.com Subject Re: [libvirt] save/ restore a domain with kvm On Sun, Mar 22, 2009 at 08:04:17PM +0200, Zvi Dubitzky wrote:
I am working with virsh
The version of VIRSH as it shows is : virsh # version Compiled against library: libvir 0.4.4 Using library: libvir 0.4.4 Using API: QEMU 0.4.4 Running hypervisor: QEMU 0.9.1
Under virsh I do the following : 1. suspend a running VM 2. save it to a file with the 'save' command 3. restore the saved domain file with the 'restore' command while the domain is still in the suspend mode or after it was shutdown/destroyed (not seen with 'list --all) In either case I get the error message saying :
virsh # restore /home/dubi/xml/vm_dubi2.sav libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from /home/dubi/xml/vm_dubi2.xml
Any idea what is the failure reason ?
Check the /var/log/libvirt/qemu/$HOME.log file for more information from QEMU Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Forgot to say: I am working with kvm-72 Does that have implication on the correctness of the save/restore of VM state ? Zvi Dubitzky Virtualization and System Architecture Email:dubi@il.ibm.com IBM Haifa Research Laboratory Phone: +972-4-8296182 Haifa, 31905, ISRAEL "Daniel P. Berrange" <berrange@redhat.com> 23/03/2009 11:36 Please respond to "Daniel P. Berrange" <berrange@redhat.com> To Zvi Dubitzky/Haifa/IBM@IBMIL cc libvir-list@redhat.com Subject Re: [libvirt] save/ restore a domain with kvm On Sun, Mar 22, 2009 at 08:04:17PM +0200, Zvi Dubitzky wrote:
I am working with virsh
The version of VIRSH as it shows is : virsh # version Compiled against library: libvir 0.4.4 Using library: libvir 0.4.4 Using API: QEMU 0.4.4 Running hypervisor: QEMU 0.9.1
Under virsh I do the following : 1. suspend a running VM 2. save it to a file with the 'save' command 3. restore the saved domain file with the 'restore' command while the domain is still in the suspend mode or after it was shutdown/destroyed (not seen with 'list --all) In either case I get the error message saying :
virsh # restore /home/dubi/xml/vm_dubi2.sav libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from /home/dubi/xml/vm_dubi2.xml
Any idea what is the failure reason ?
Check the /var/log/libvirt/qemu/$HOME.log file for more information from QEMU Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Zvi Dubitzky wrote:
Forgot to say: I am working with kvm-72 Does that have implication on the correctness of the save/restore of VM state ?
Save-restore on upstream kvm versions is rather error prone. I'm note sure one version is better than the other. Evan today mainline kvm's migration is not stable. We'll send patches this week to fix that. So bottom line, if it works for you, use it.
Zvi Dubitzky Virtualization and System Architecture Email:dubi@il.ibm.com IBM Haifa Research Laboratory Phone: +972-4-8296182 Haifa, 31905, ISRAEL
"Daniel P. Berrange" <berrange@redhat.com> 23/03/2009 11:36 Please respond to "Daniel P. Berrange" <berrange@redhat.com>
To Zvi Dubitzky/Haifa/IBM@IBMIL cc libvir-list@redhat.com Subject Re: [libvirt] save/ restore a domain with kvm
On Sun, Mar 22, 2009 at 08:04:17PM +0200, Zvi Dubitzky wrote:
I am working with virsh
The version of VIRSH as it shows is : virsh # version Compiled against library: libvir 0.4.4 Using library: libvir 0.4.4 Using API: QEMU 0.4.4 Running hypervisor: QEMU 0.9.1
Under virsh I do the following : 1. suspend a running VM 2. save it to a file with the 'save' command 3. restore the saved domain file with the 'restore' command while the domain is still in the suspend mode or after it was shutdown/destroyed (not seen with 'list --all) In either case I get the error message saying :
virsh # restore /home/dubi/xml/vm_dubi2.sav libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from /home/dubi/xml/vm_dubi2.xml
Any idea what is the failure reason ?
Check the /var/log/libvirt/qemu/$HOME.log file for more information from QEMU
Daniel

Thanks a Question if I may. Are you familiar with the cpuTime of a VM that we get by libvirt from virDomainInfoPtr struct . Is that the real cpuTime of all the vcpus of a VM together ? e.g if I sample this cpuTime at 2 times apart by 'n' secs and get cpuTime1 and cpuTime2 , then if the VM has 4 vcpus and they are fully utilized, I will get : (vcpuTime- vcpuTime1) = 4 *n . That is each of the 4 vcpus are fully utilizing the 'n' secs . thanks Zvi Dubitzky Virtualization and System Architecture Email:dubi@il.ibm.com IBM Haifa Research Laboratory Phone: +972-4-8296182 Haifa, 31905, ISRAEL Dor Laor <dlaor@redhat.com> 23/03/2009 15:24 Please respond to dlaor@redhat.com To Zvi Dubitzky/Haifa/IBM@IBMIL cc "Daniel P. Berrange" <berrange@redhat.com>, libvir-list@redhat.com Subject Re: [libvirt] save/ restore a domain with kvm Zvi Dubitzky wrote:
Forgot to say: I am working with kvm-72 Does that have implication on the correctness of the save/restore of VM state ?
Save-restore on upstream kvm versions is rather error prone. I'm note sure one version is better than the other. Evan today mainline kvm's migration is not stable. We'll send patches this week to fix that. So bottom line, if it works for you, use it.
Zvi Dubitzky Virtualization and System Architecture Email:dubi@il.ibm.com IBM Haifa Research Laboratory Phone: +972-4-8296182 Haifa, 31905, ISRAEL
"Daniel P. Berrange" <berrange@redhat.com> 23/03/2009 11:36 Please respond to "Daniel P. Berrange" <berrange@redhat.com>
To Zvi Dubitzky/Haifa/IBM@IBMIL cc libvir-list@redhat.com Subject Re: [libvirt] save/ restore a domain with kvm
On Sun, Mar 22, 2009 at 08:04:17PM +0200, Zvi Dubitzky wrote:
I am working with virsh
The version of VIRSH as it shows is : virsh # version Compiled against library: libvir 0.4.4 Using library: libvir 0.4.4 Using API: QEMU 0.4.4 Running hypervisor: QEMU 0.9.1
Under virsh I do the following : 1. suspend a running VM 2. save it to a file with the 'save' command 3. restore the saved domain file with the 'restore' command while the domain is still in the suspend mode or after it was shutdown/destroyed (not seen with 'list --all) In either case I get the error message saying :
virsh # restore /home/dubi/xml/vm_dubi2.sav libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from /home/dubi/xml/vm_dubi2.xml
Any idea what is the failure reason ?
Check the /var/log/libvirt/qemu/$HOME.log file for more information from QEMU
Daniel
participants (3)
-
Daniel P. Berrange
-
Dor Laor
-
Zvi Dubitzky