[libvirt] save / restore for KVM

Hello, I try to save a KVM domain which has its hard disk on a LVM volume. I can execute the command to save the domain but restore fails # virsh list Id Name State ---------------------------------- 3 kvm-linux03 running 4 kvm-linux01 running # virsh save kvm-linux01 ./kvm-linux01.ram Domain kvm-linux01 saved to ./kvm-linux01.ram # virsh list Id Name State ---------------------------------- 3 kvm-linux03 running # virsh restore ./kvm-linux01.ram libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from ./kvm-linux01.ram I tried to save and restore this domain using kvm directly # /usr/bin/qemu-kvm -m 1024 -boot c -drive file=/dev/virtual/kvm_linux01,if=ide,index=0,boot=on -net nic,macaddr=00:16:3e:00:01:02,vlan=0 -net tap,fd=24,script=,vlan=0,ifname=vnet3 (qemu) savevm kvm-linux01.ram Device id0-hd0 does not support VM state snapshots (qemu) Here I get an error message which I also found on the qemu homepage: to save a qemu vm the hard disk must be a file using the qcow format. But in the libvirt documentation there is no hint to this limitation. Is it possible to save the state of a kvm vm using physical hard disks with libvirt? Kind regards Matthias Pfafferodt -- Matthias Pfafferodt - http://www.mapfa.de Matthias.Pfafferodt <at> mapfa.de

On Sat, Jul 05, 2008 at 01:59:26PM +0200, Matthias Pfafferodt wrote:
Hello,
I try to save a KVM domain which has its hard disk on a LVM volume. I can execute the command to save the domain but restore fails
# virsh list Id Name State ---------------------------------- 3 kvm-linux03 running 4 kvm-linux01 running
# virsh save kvm-linux01 ./kvm-linux01.ram Domain kvm-linux01 saved to ./kvm-linux01.ram
# virsh list Id Name State ---------------------------------- 3 kvm-linux03 running
# virsh restore ./kvm-linux01.ram libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from ./kvm-linux01.ram
You don't mention which version of KVM or libvirt being used, or which distro. If its Fedora then plesae file a bug against libvirt or KVM. There's one possible issue in KVM that could be causing it depending on which version you're using.
I tried to save and restore this domain using kvm directly
# /usr/bin/qemu-kvm -m 1024 -boot c -drive file=/dev/virtual/kvm_linux01,if=ide,index=0,boot=on -net nic,macaddr=00:16:3e:00:01:02,vlan=0 -net tap,fd=24,script=,vlan=0,ifname=vnet3 (qemu) savevm kvm-linux01.ram Device id0-hd0 does not support VM state snapshots
Libvirt doesn't use savevm - it uses the migration protocol support instead. 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 :|

Hello, Am Samstag, 5. Juli 2008 18:48:13 schrieb Daniel P. Berrange:
On Sat, Jul 05, 2008 at 01:59:26PM +0200, Matthias Pfafferodt wrote:
Hello,
I try to save a KVM domain which has its hard disk on a LVM volume. I can execute the command to save the domain but restore fails
# virsh list Id Name State ---------------------------------- 3 kvm-linux03 running 4 kvm-linux01 running
# virsh save kvm-linux01 ./kvm-linux01.ram Domain kvm-linux01 saved to ./kvm-linux01.ram
# virsh list Id Name State ---------------------------------- 3 kvm-linux03 running
# virsh restore ./kvm-linux01.ram libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from ./kvm-linux01.ram
You don't mention which version of KVM or libvirt being used, or which distro. If its Fedora then plesae file a bug against libvirt or KVM. There's one possible issue in KVM that could be causing it depending on which version you're using.
Sorry, I'm using opensuse 10.3 with the following libvirt / kvm packages: # rpm -qa | grep libvirt libvirt-python-0.4.4-12.1 libvirt-0.4.4-12.1 libvirt-devel-0.4.4-12.1 libvirt-doc-0.4.4-12.1 # rpm -qa | grep kvm kvm-70.git-2.4 kvm-kmp-default-70_2.6.22.18_0.2-2.2
I tried to save and restore this domain using kvm directly
# /usr/bin/qemu-kvm -m 1024 -boot c -drive file=/dev/virtual/kvm_linux01,if=ide,index=0,boot=on -net nic,macaddr=00:16:3e:00:01:02,vlan=0 -net tap,fd=24,script=,vlan=0,ifname=vnet3 (qemu) savevm kvm-linux01.ram Device id0-hd0 does not support VM state snapshots
Libvirt doesn't use savevm - it uses the migration protocol support instead.
So 'virsh save' should work. Is there a possibility to debug this to get information why it does not restore the vm? Or to test the used migration protocol using only one computer? Matthias resend - forgot the list ...
Daniel

Hello again, Am Sonntag, 6. Juli 2008 16:00:32 schrieb Matthias Pfafferodt:
Hello,
Am Samstag, 5. Juli 2008 18:48:13 schrieb Daniel P. Berrange:
On Sat, Jul 05, 2008 at 01:59:26PM +0200, Matthias Pfafferodt wrote:
Hello,
I try to save a KVM domain which has its hard disk on a LVM volume. I can execute the command to save the domain but restore fails
# virsh list Id Name State ---------------------------------- 3 kvm-linux03 running 4 kvm-linux01 running
# virsh save kvm-linux01 ./kvm-linux01.ram Domain kvm-linux01 saved to ./kvm-linux01.ram
# virsh list Id Name State ---------------------------------- 3 kvm-linux03 running
# virsh restore ./kvm-linux01.ram libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from ./kvm-linux01.ram
You don't mention which version of KVM or libvirt being used, or which distro. If its Fedora then plesae file a bug against libvirt or KVM. There's one possible issue in KVM that could be causing it depending on which version you're using.
Sorry, I'm using opensuse 10.3 with the following libvirt / kvm packages:
# rpm -qa | grep libvirt libvirt-python-0.4.4-12.1 libvirt-0.4.4-12.1 libvirt-devel-0.4.4-12.1 libvirt-doc-0.4.4-12.1 # rpm -qa | grep kvm kvm-70.git-2.4 kvm-kmp-default-70_2.6.22.18_0.2-2.2
I got it running using the right combination of rpms: # rpm -qa | grep kvm kvm-70-8.2 kvm-kmp-default-70_2.6.22.18_0.2-8.2 save / restore is working now. Kind regards Matthias
I tried to save and restore this domain using kvm directly
# /usr/bin/qemu-kvm -m 1024 -boot c -drive file=/dev/virtual/kvm_linux01,if=ide,index=0,boot=on -net nic,macaddr=00:16:3e:00:01:02,vlan=0 -net tap,fd=24,script=,vlan=0,ifname=vnet3 (qemu) savevm kvm-linux01.ram Device id0-hd0 does not support VM state snapshots
Libvirt doesn't use savevm - it uses the migration protocol support instead.
So 'virsh save' should work. Is there a possibility to debug this to get information why it does not restore the vm? Or to test the used migration protocol using only one computer?
Matthias
resend - forgot the list ...
Daniel
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- Matthias Pfafferodt - http://www.mapfa.de Matthias.Pfafferodt <at> mapfa.de

On Fri, Jul 11, 2008 at 09:50:10PM +0200, Matthias Pfafferodt wrote:
Hello again, [...]
# virsh restore ./kvm-linux01.ram libvir: QEMU error : operation failed: failed to start VM error: Failed to restore domain from ./kvm-linux01.ram [...] I got it running using the right combination of rpms:
# rpm -qa | grep kvm kvm-70-8.2 kvm-kmp-default-70_2.6.22.18_0.2-8.2
save / restore is working now.
Okay, thanks for the update ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Matthias Pfafferodt