Bug 1134592 - libvirt reports json "backing file" is missing
Summary: libvirt reports json "backing file" is missing
Status: CLOSED DUPLICATE of bug 1134878
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs 1134878
TreeView+ depends on / blocked
Reported: 2014-08-27 21:13 UTC by Richard W.M. Jones
Modified: 2016-04-10 19:24 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1134878 (view as bug list)
Last Closed: 2016-04-10 19:24:11 UTC

Attachments (Terms of Use)

Description Richard W.M. Jones 2014-08-27 21:13:50 UTC
Description of problem:

$ qemu-img create -f qcow2 -b 'json: { "file.driver":"ssh", "file.user":"root", "file.host":"avon.home.annexia.org", "file.path":"/vmfs/volumes/datastore1/Fedora 20/Fedora 20-flat.vmdk", "file.host_key_check":"no" }' /tmp/foo

qemu-img file is successful, but:

$ guestfish -a /tmp/foo -i
libvirt: invalid argument: Backing file 'json: { "file.driver":"ssh", "file.user":"root", "file.host":"avon.home.annexia.org", "file.path":"/vmfs/volumes/datastore1/Fedora 20/Fedora 20-flat.vmdk", "file.host_key_check":"no" }' of image '/tmp/foo' is missing. [code=8 domain=10]

This is presumably because libvirt has trouble parsing the
new qemu 2.1.0 "json:" specification.  TBH I think it shouldn't
even try, it should just ignore them.  Certainly it shouldn't
be giving an error here.

Version-Release number of selected component (if applicable):


How reproducible:

100% - see above.

Comment 1 Eric Blake 2014-08-27 21:37:18 UTC
More generically, there are two problems here:
1. Libvirt needs to catch up on the additional formats supported by upstream qemu. (This is one case where a qemu library that parses qcow2 files would be nice - if only it weren't for the fact that no such library exists in part because current qemu aborts on OOM which is inappropriate for library code)

2. Libvirt needs to have sane behavior when a backing format looks like a protocol but for which libvirt does not (yet) know the protocol.  It may still be an error message, but the message should be more like 'json: protocol not yet handled by libvirt', not 'stat of file "json: ..." failed'.  In other words, libvirt should NEVER attempt to stat() any protocol, known or unknown.

Comment 2 Richard W.M. Jones 2014-08-28 11:50:39 UTC
I'm going to clone this for RHEL 7.1 since we likely will need it
fixing for virt-v2v access to ESX servers.

Note I really think that if libvirt doesn't know about a protocol
it should NOT error.  It should assume the best.

Comment 3 Cole Robinson 2016-04-10 19:24:11 UTC
There's already a RHEL bug tracking this which is the actual report that will generate a fix, so just duping to that

*** This bug has been marked as a duplicate of bug 1134878 ***

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