Bug 1161582 - Should improve error info when can't find backing file for snapshot
Summary: Should improve error info when can't find backing file for snapshot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: x86_64
OS: All
medium
medium
Target Milestone: rc
: ---
Assignee: Jeff Cody
QA Contact: Qianqian Zhu
URL:
Whiteboard:
Depends On: 1028276 1084302
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-07 11:47 UTC by Jun Li
Modified: 2016-11-07 20:16 UTC (History)
18 users (show)

Fixed In Version: QEMU 2.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of: 1084302
Environment:
Last Closed: 2016-11-07 20:16:34 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2673 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2016-11-08 01:06:13 UTC

Comment 2 Jun Li 2014-11-07 11:52:29 UTC
Version of components:
qemu-kvm-rhev-2.1.2-6.el7.x86_64

steps:
1,creat an image via qemu-img.
# qemu-img create -f qcow2 test.qcow2 5G
2,boot qemu-kvm as followings:
# /usr/libexec/qemu-kvm -drive file=./test.qcow2,if=none,id=img \
-monitor stdio -qmp tcp::8888,server,nowait
3,create another two qcow2 format files via qemu-img.
# qemu-img create -f qcow2 /home/test1.qcow2 500M
Formatting '/home/test1.qcow2', fmt=qcow2 size=524288000 encryption=off cluster_size=65536 lazy_refcounts=off 
# qemu-img create -f qcow2 /home/test2.qcow2 500M

4,do snapshot via qmp.
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "img", "snapshot-file": "/home/test1.qcow2", "format": "qcow2", "mode": "absolute-paths" } }
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "img", "snapshot-file": "/home/test2.qcow2", "format": "qcow2", "mode": "absolute-paths" } }

Results:
After step 4,
{"execute":"qmp_capabilities"}
{"return": {}}
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "img", "snapshot-file": "/home/test1.qcow2", "format": "qcow2", "mode": "absolute-paths" } }
{"return": {}}
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "img", "snapshot-file": "/home/test2.qcow2", "format": "qcow2", "mode": "absolute-paths" } }
{"error": {"class": "GenericError", "desc": "Could not open '/home/test1.qcow2': Could not open backing file: Could not open '/home/./test.qcow2': No such file or directory: No such file or directory"}}

Comment 6 Jeff Cody 2016-04-28 19:03:17 UTC
The error message has been cleaned up again upstream, so I don't believe this should be an issue anymore, the error message is clear enough now.

Comment 8 Qianqian Zhu 2016-08-23 02:42:55 UTC
Verified with:
qemu-img-rhev-2.6.0-20.el7.x86_64
qemu-kvm-rhev-2.6.0-20.el7.x86_64
kernel-3.10.0-491.el7.x86_64

Steps:
1. Create image:
# qemu-img create -f qcow2 test.qcow2 5G
2. Create snapshot of the image:
# qemu-img create -f qcow2 /home/snapshot1.qcow2 -b /home/test.qcow2
3. Remove the backing file:
# rm -f test.qcow2
4. Launch guest with the snapshot:
# /usr/libexec/qemu-kvm -drive file=snapshot1.qcow2,if=none,id=img -monitor stdio -qmp tcp::8888,server,nowait

Result:
Prompt error 'Could not open backing file'.
qemu-kvm: -drive file=snapshot1.qcow2,if=none,id=img: Could not open backing file: Could not open 'test.qcow2': No such file or directory

Comment 9 Qianqian Zhu 2016-08-23 02:43:50 UTC
Moving to Verified as per comment 8.

Comment 11 errata-xmlrpc 2016-11-07 20:16:34 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.

https://rhn.redhat.com/errata/RHBA-2016-2673.html


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