Bug 1134592

Summary: libvirt reports json "backing file" is missing
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, eblake, rbalakri, shyu
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1134878 (view as bug list) Environment:
Last Closed: 2016-04-10 19:24:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 910269, 1134878    

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 ***