Bug 1025740 - Saving VM state on qcow2 images results in VM state corruption
Saving VM state on qcow2 images results in VM state corruption
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Max Reitz
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-01 08:15 EDT by Max Reitz
Modified: 2014-06-17 23:40 EDT (History)
5 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-15.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:31:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Max Reitz 2013-11-01 08:15:28 EDT
Description of problem:
When saving a VM state through the HMP command “savevm”, it cannot be loaded back into the VM.

Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-10.el7

How reproducible:
100%

Steps to Reproduce:
1. Use the HMP command “savevm” in a running VM
2. Close that VM
3. Try to load the VM state with the -loadvm command line parameter
(see also upstream qemu-iotest 068)

Actual results:
Can't find block !
qemu: warning: error while loading state section id 3
qemu: Error -22 while loading VM state

Expected results:
No output, instead the VM state is loaded successfully.

Additional info:
This has already been fixed upstream. RHEL 6.5 is apparently not concerned.
Comment 2 Miroslav Rezanina 2013-11-07 03:22:17 EST
Fix included in qemu-kvm-1.5.3-15.el7
Comment 4 huiqingding 2013-12-17 04:51:37 EST
Reproduce this bug using the following version:
qemu-kvm-1.5.3-10.el7.x86_64
kernel-3.10.0-63.el7.x86_64

Steps to Reproduce:
1. Start a VM
 /usr/libexec/qemu-kvm -cpu host -enable-kvm -m 4096 -smp 4,sockets=1,cores=4,threads=1 -name rhel7base  -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0 -boot menu=on -monitor stdio -netdev tap,id=hostnet0,ifname=guest6,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test -nodefaults -nodefconfig -spice port=5930,seamless-migration=on,password=redhat -vga qxl -global qxl-vga.vram_size=67108864   -device virtio-balloon-pci,id=balloon1 -qmp tcp:0:4446,server,nowait -device intel-hda,id=hda1 -device hda-duplex -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/qiguo,server,nowait

2. Use the HMP command “savevm” in a running VM
(qemu)savevm /home/vm.sp1

3. Close that VM

4. Try to load the VM state with the -loadvm command line parameter
/usr/libexec/qemu-kvm -cpu host -enable-kvm -m 4096 -smp 4,sockets=1,cores=4,threads=1 -name rhel7base  -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0 -boot menu=on -monitor stdio -netdev tap,id=hostnet0,ifname=guest6,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test -nodefaults -nodefconfig -spice port=5930,seamless-migration=on,password=redhat -vga qxl -global qxl-vga.vram_size=67108864   -device virtio-balloon-pci,id=balloon1 -qmp tcp:0:4446,server,nowait -device intel-hda,id=hda1 -device hda-duplex -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/qiguo,server,nowait -loadvm /home/vm.sp1

Actual results:
After step4, qemu-kvm is Segmentation fault (core dumped).

Program received signal SIGSEGV, Segmentation fault.
0x000055555572da53 in ram_load ()
(gdb) bt
#0  0x000055555572da53 in ram_load ()
#1  0x0000555555799a11 in qemu_loadvm_state ()
#2  0x000055555579a34a in load_vmstate ()
#3  0x00005555555c472c in main ()
Comment 5 huiqingding 2013-12-17 04:54:53 EST
Verify this bug using the following version:
qemu-kvm-1.5.3-21.el7.x86_64
kernel-3.10.0-63.el7.x86_64

Steps to Reproduce:
1. Start a VM
 /usr/libexec/qemu-kvm -cpu host -enable-kvm -m 4096 -smp 4,sockets=1,cores=4,threads=1 -name rhel7base  -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0 -boot menu=on -monitor stdio -netdev tap,id=hostnet0,ifname=guest6,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test -nodefaults -nodefconfig -spice port=5930,seamless-migration=on,password=redhat -vga qxl -global qxl-vga.vram_size=67108864   -device virtio-balloon-pci,id=balloon1 -qmp tcp:0:4446,server,nowait -device intel-hda,id=hda1 -device hda-duplex -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/qiguo,server,nowait

2. Use the HMP command “savevm” in a running VM
(qemu)savevm /home/vm.sp1

3. Close that VM

4. Try to load the VM state with the -loadvm command line parameter
/usr/libexec/qemu-kvm -cpu host -enable-kvm -m 4096 -smp 4,sockets=1,cores=4,threads=1 -name rhel7base  -drive file=/home/RHEL-Server-7.0-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0 -boot menu=on -monitor stdio -netdev tap,id=hostnet0,ifname=guest6,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown,vhost=on -device virtio-net,netdev=hostnet0,mac=54:52:1b:35:3c:16,id=test -nodefaults -nodefconfig -spice port=5930,seamless-migration=on,password=redhat -vga qxl -global qxl-vga.vram_size=67108864   -device virtio-balloon-pci,id=balloon1 -qmp tcp:0:4446,server,nowait -device intel-hda,id=hda1 -device hda-duplex -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/qiguo,server,nowait -loadvm /home/vm.sp1

Actual results:
After step4, qemu-kvm didn't output error info and the VM can boot successfully.
Comment 7 Ludek Smid 2014-06-13 05:31:50 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Note You need to log in before you can comment on or make changes to this bug.