Bug 621482 - [RFE] Be able to get progress from qemu-img
[RFE] Be able to get progress from qemu-img
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.1
All Linux
high Severity medium
: beta
: 6.2
Assigned To: Jes Sorensen
Virtualization Bugs
: FutureFeature
Depends On:
Blocks: 693510 580954
  Show dependency treegraph
 
Reported: 2010-08-05 04:46 EDT by Saggi Mizrahi
Modified: 2015-03-02 00:22 EST (History)
12 users (show)

See Also:
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 10:42:59 EST
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-05 20:23:30 EST

  None (edit)
Description Saggi Mizrahi 2010-08-05 04:46:32 EDT
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 16:49:02 EDT
Kevin, any updates on this?
Comment 3 Ayal Baron 2010-10-20 11:20:28 EDT
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 06:48:59 EDT
Kevin, can you do it?
Comment 5 Kevin Wolf 2010-10-26 07:38:37 EDT
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 18:43:31 EDT
(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 02:00:44 EST
Any update on this?
Comment 9 Jes Sorensen 2011-01-26 04:27:53 EST
No update, I have been occupied with other things.
Comment 13 Jes Sorensen 2011-03-07 11:05:39 EST
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 11:08:48 EDT
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 11:11:54 EDT
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 04:17:50 EDT
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 04:52:47 EDT
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 05:18:45 EDT
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 06:39:29 EDT
(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 11:53:41 EDT
(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 11:48:37 EST
    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 10:42:59 EST
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.