Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1510560 - RFE: Resolve relative image file paths for http URLs
Summary: RFE: Resolve relative image file paths for http URLs
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Max Reitz
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-07 16:40 UTC by Daniel Erez
Modified: 2019-04-15 17:13 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Daniel Erez 2017-11-07 16:40:14 UTC
Description of problem:
Creating an overlay image with a backing file that resides on a remote storage
fails with:
"qemu-img: overlay1: Cannot use relative backing file...Could not open backing image to determine size.".

I.e.

1. Invoke on a web server:

$ qemu-img create -f raw backing.raw 10M
Formatting 'backing.raw', fmt=raw size=10485760

$ qemu-img create -f qcow2 -o backing_file=backing.raw,backing_fmt=raw test.qcow2
Formatting 'test.qcow2', fmt=qcow2 size=10485760 backing_file='backing.raw' backing_fmt='raw' encryption=off cluster_size=65536

2. Create the overlay:

$ qemu-img create -f qcow2 -o backing_file=http://tick/tmp/test.qcow2,backing_fmt=qcow2 overlay1
qemu-img: overlay1: Cannot use relative backing file names for 'json:{"url": "http://tick/tmp/test.qcow2", "driver": "http"}'
Could not open backing image to determine size.

Comment 2 Nir Soffer 2017-11-07 17:09:20 UTC
Jeffrey, isn't this the same issue as
https://bugzilla.redhat.com/show_bug.cgi?id=1397870#c30

Comment 3 Qunfang Zhang 2017-11-08 03:07:02 UTC
Hi, Daniel

Could you update what is your host kernel version and qemu-kvm-rhev (or qemu-kvm) version? And which architecture? 

Thanks,
Qunfang

Comment 4 Daniel Erez 2017-11-08 13:37:36 UTC
(In reply to Qunfang Zhang from comment #3)
> Hi, Daniel
> 
> Could you update what is your host kernel version and qemu-kvm-rhev (or
> qemu-kvm) version? And which architecture? 
> 
> Thanks,
> Qunfang

Checked on fc26:
qemu-kvm-2.10.0-4.fc26.x86_64
kernel-core-4.13.9-200.fc26.x86_64

Comment 6 Kevin Wolf 2017-11-09 12:44:56 UTC
So the expected behaviour in the example would be that qemu combines the URL
'http://tick/tmp/test.qcow2' and the relative backing file name 'backing.raw'
into a new URL 'http://tick/tmp/backing.raw' and access that, right?

I believe implementing this becomes possible with some of Max's pending patches,
so I'm reassigning the bug. In any case, this is not a bug, but an RFE, so I'm
also moving it to 7.6.

Comment 8 Nir Soffer 2017-11-09 14:39:16 UTC
(In reply to Kevin Wolf from comment #6)
> So the expected behaviour in the example would be that qemu combines the URL
> 'http://tick/tmp/test.qcow2' and the relative backing file name 'backing.raw'
> into a new URL 'http://tick/tmp/backing.raw' and access that, right?

Right, same way gluster: urls are handled now.

Comment 9 Yaniv Lavi 2017-11-15 13:19:13 UTC
This is blocking our ability to provide smart state analysis for CFME and single file backups in API for backup vendors in RHV. I would want to see it in RHEL 7.5, if possible.


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