Bug 680378

Summary: no error message when loading zero size internal snapshot
Product: Red Hat Enterprise Linux 6 Reporter: Shirley Zhou <szhou>
Component: qemu-kvmAssignee: Jes Sorensen <Jes.Sorensen>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.1CC: bcao, ehabkost, juzhang, kwolf, mkenneth, mshao, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.164.el6 Doc Type: Bug Fix
Doc Text:
Small fix for a corner case: show an error message for loading snapshot without VM state. [not relevant enough to require Technical Notes]
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 15:44:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 580953    

Description Shirley Zhou 2011-02-25 11:02:22 UTC
Description of problem:
Create internal snapshot for previous installed guest using "qemu-img snapshot -c", then boot guest, when loadvm of internal snapshot, guest become paused. As talked with kwolf in IRC, there should be error message pops up.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.147.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.create internal snapshot for previous installed guest image
#qemu-img snapshot -c interna_sn1 win08R2.qcow2

2. Check this snapshot 
# qemu-img info win08R2.qcow2 
image: win08R2.qcow2
file format: qcow2
virtual size: 30G (32212254720 bytes)
disk size: 13G
cluster_size: 65536
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         interna_sn1               0 2011-02-21 21:52:52   00:00:00.000

3. run this guest image, and load internal snapshot  interna_sn1  

  
Actual results:
after step3, guest become paused

Expected results:
There should be error pops to indicate can not load internal snapshot without vm state.

Additional info:

Comment 2 Jes Sorensen 2011-02-25 12:51:53 UTC
Do we support internal snapshots in the first place?

I don't think this is severe enough to warrant 6.1 status?

Comment 4 Kevin Wolf 2011-02-25 14:45:01 UTC
Not really relevant for RHEL. Should be a one-liner, though (add an error_report call somewhere in savevm.c), so we can as well fix it.

Comment 7 juzhang 2011-06-07 09:24:30 UTC
Easy to reproduce using comment0 steps,mark qa_ack+

Comment 10 Mike Cao 2011-08-26 10:21:46 UTC
Reproduced on qemu-kvm-0.12.1.2-2.160.el6.x86_64
Tested on qemu-kvm-0.12.1.2-2.183.el6.x86_64 seems still hit some issue.

steps:
1.qemu-img snapshot -c sp1 /home/rhel61.qcow2
2.start guest 
CLI:/usr/libexec/qemu-kvm -M rhel6.2.0 -cpu Westmere -enable-kvm -m 2048 -smp 4,sockets=1,cores=4,threads=1 -name win7_32_2222 -uuid 9408d7d1-4f26-4e1c-92a8-50c9bfbeed96 -monitor stdio -boot c  -drive serial=hellomike,file=/home/rhel61.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x9,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=00:1a:4a:42:09:03,bus=pci.0,addr=0x3 -usb -device usb-tablet,id=usbtablet0 -spice port=5944,disable-ticketing -k en-us -vga qxl -global qxl-vga.vram_size=67108864
3.(qemu)loadvm sp1

Actual Results:
on qemu-kvm-0.12.1.2-2.160.el6.x86_64 ,guest stopped
on qemu-kvm-0.12.1.2-2.183.el6.x86_64 ,guest still *stopped* and with prompts msg"This is a disk-only snapshot. Revert to it offline using qemu-img."

Based on above I don't think patch fully fixed the issue.
Guest should still *running * and with msg prompted.


Based on above ,re-assign this issue.

Comment 11 Kevin Wolf 2011-08-26 11:54:33 UTC
No, after a failed loadvm the expected state is that the VM is stopped. This is how upstream has decided that things should work.

Comment 12 Mike Cao 2011-08-29 02:50:47 UTC
Thanks for your explanation.

Based on comment #10 & comment #11 ,this issue has been fixed already

Comment 14 Eduardo Habkost 2011-11-18 16:11:58 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Small fix for a corner case: show an error message for loading snapshot without VM state. [not relevant enough to require Technical Notes]

Comment 15 errata-xmlrpc 2011-12-06 15:44:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1531.html