Bug 621482 - [RFE] Be able to get progress from qemu-img
Summary: [RFE] Be able to get progress from qemu-img
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm   
(Show other bugs)
Version: 6.1
Hardware: All
OS: Linux
high
medium
Target Milestone: beta
: 6.2
Assignee: Jes Sorensen
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks: 693510 580954
TreeView+ depends on / blocked
 
Reported: 2010-08-05 08:46 UTC by Saggi Mizrahi
Modified: 2015-03-02 05:22 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.163.el6
Doc Type: Enhancement
Doc Text:
There was no way to know the completion percentage of a qemu-img command. A '-p' option was added to qemu-img to make it print progress information while running.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 15:42:59 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1531 normal SHIPPED_LIVE Moderate: qemu-kvm security, bug fix, and enhancement update 2011-12-06 01:23:30 UTC

Description Saggi Mizrahi 2010-08-05 08:46:32 UTC
Description of problem:
Currently there is no way to know the completion percentage of a qemu-img command.

A similar interface to what dd has (with SIGUSR1) will suffice but something fancier will also be ok.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Ayal Baron 2010-09-28 20:49:02 UTC
Kevin, any updates on this?

Comment 3 Ayal Baron 2010-10-20 15:20:28 UTC
Dor,
This should be pretty easy (I hope) and would enable us to report progress back
up which currently we cannot.

Can this be done for 6.1?

Comment 4 Dor Laor 2010-10-26 10:48:59 UTC
Kevin, can you do it?

Comment 5 Kevin Wolf 2010-10-26 11:38:37 UTC
Sounds doable for 6.1. However, to be really useful, it needs to be implemented in the tools, too, so probably it must be done relatively early?

And just to ensure that we're talking about the same operations, this is about convert and rebase, right? Any other operation I forgot?

Comment 6 Ayal Baron 2010-10-27 22:43:31 UTC
(In reply to comment #5)
> Sounds doable for 6.1. However, to be really useful, it needs to be implemented
> in the tools, too, so probably it must be done relatively early?
preferably, yes

> 
> And just to ensure that we're talking about the same operations, this is about
> convert and rebase, right? Any other operation I forgot?

you forgot commit

Comment 8 Ayal Baron 2011-01-26 07:00:44 UTC
Any update on this?

Comment 9 Jes Sorensen 2011-01-26 09:27:53 UTC
No update, I have been occupied with other things.

Comment 13 Jes Sorensen 2011-03-07 16:05:39 UTC
Hi,

We need clarification as to which commands you are looking for
progress support for. Some commands are relatively easy to add
support for, in particular 'convert' and 'rebase' since they are
contained in qemu-img.c. Other commands like 'create' require
changes to the format driver, which will be much harder to justify
to get into upstream.

Thanks,
Jes

Comment 14 Saggi Mizrahi 2011-04-04 15:08:48 UTC
We would like to have progress for everything. But long running operations like convert and rebase will benefit more from this feature.

Comment 15 Jes Sorensen 2011-04-04 15:11:54 UTC
Some commands are more complicated to report progress from than others.

However, for the format, what is suitable - can you handle progress
being printed to stdout and updated like it does for fsck etc?

Comment 16 Saggi Mizrahi 2011-04-11 08:17:50 UTC
I would prefer it being reported to stderr dd style
by sending sigusr1 I'll be able to see the current progress state

Comment 17 Jes Sorensen 2011-04-19 08:52:47 UTC
Hmmm ok, the original request said any style. I have posted an additional
patch upstream that provides SIGUSR1 reporting similar to dd, on top of the
-p flag that was already accepted.

If it gets accepted, I will look at back porting it to RHEL6.2

Comment 24 Mike Cao 2011-08-26 09:18:45 UTC
since this issue is a RFE ,so no need to reproduce it 
Verified it on 

1. man qemu-img
2. qemu-img --help
3. qemu-img convert  -p -f raw -O qcow2 winxp winxp.qcow2
4. # qemu-img rebase -f qcow2 -b winxp -F raw winxp.sp2 -p
    (0.00/100%)

Actual Results:
after step1 ,-p listed in man page 
after step2 ,-p listed in help
after step3 ,there is progress of qemu-img (100.00/100%)
after step4 ,there is progress of qemu-img ((6.01/100%)

Based on above this issue has been fixed already.

Comment 25 Ayal Baron 2011-08-28 10:39:29 UTC
(In reply to comment #24)
> since this issue is a RFE ,so no need to reproduce it 
> Verified it on 
> 
> 1. man qemu-img
> 2. qemu-img --help
> 3. qemu-img convert  -p -f raw -O qcow2 winxp winxp.qcow2
> 4. # qemu-img rebase -f qcow2 -b winxp -F raw winxp.sp2 -p
>     (0.00/100%)
> 
> Actual Results:
> after step1 ,-p listed in man page 
> after step2 ,-p listed in help
> after step3 ,there is progress of qemu-img (100.00/100%)
> after step4 ,there is progress of qemu-img ((6.01/100%)
> 
> Based on above this issue has been fixed already.

Also need to test this with SIGUSR1, i.e.
run:
qemu-img convert -f raw -O qcow2 winxp winxp.qcow2 &
(make sure winxp is big so this will take a long time)
send SIGUSR1 every 5s

Comment 26 Mike Cao 2011-08-28 15:53:41 UTC
(In reply to comment #25)

> Also need to test this with SIGUSR1, i.e.
> run:
> qemu-img convert -f raw -O qcow2 winxp winxp.qcow2 &
> (make sure winxp is big so this will take a long time)
> send SIGUSR1 every 5s

steps:
1.qemu-img convert -f raw -O qcow2 winxp winxp.qcow2 &
# for ((;;))
> do kill -SIGUSR1 `pidof qemu-img`
> sleep 5
> done
    (14.05/100%)
    (16.06/100%)
    (18.07/100%)
    (20.08/100%)
    (22.09/100%)
    (72.28/100%)
based on above and comment #24 ,this issue has been fixed ald.

Ayal,Thanks for your reminder.I will read patch(es) first when verify bug.

Comment 28 Eduardo Habkost 2011-11-17 16:48:37 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:
There was no way to know the completion percentage of a qemu-img command.

A '-p' option was added to qemu-img to make it print progress information while running.

Comment 29 errata-xmlrpc 2011-12-06 15:42:59 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


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