Bug 1208566 - RFE: qemu-img commit lacks some one-command shortcut available in QMP
Summary: RFE: qemu-img commit lacks some one-command shortcut available in QMP
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: ---
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Xueqiang Wei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-02 14:25 UTC by Eric Blake
Modified: 2023-09-14 02:57 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 07:21:52 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:
areis: mirror+


Attachments (Terms of Use)

Description Eric Blake 2015-04-02 14:25:37 UTC
Description of problem:

Minor issues, since a series of qemu-img commands can achieve the same, but it might be nice to consider single-command options rather than requiring users to know how to chain a sequence of commands.

QMP is able to shorten a backing file chain of A <- B <- C down to A <- C by committing B into A and leaving content unchanged in C (requires writing to both A [committed data] and C [metadata]).  qemu-img, however, requires two commands (commit B, rebase -u -b A C)

On a related vein, 'qemu-img commit C' is useful for emptying out the contents of C but preserving the chain (changing the point in time that C is tracking from).  However, this only works into a single backing file at a time.  It would be nice to be able to do a multi-file commit as efficiently as possible (committing C into B, then B into A, then rebasing C onto A, requires wasted sector copies).  That is, the ability to go from:
A 1111   # snapshot sees 1111
B -22-   # snapshot sees 1221
C --33   # guest sees 1233

to:
A 1233   # snapshot sees 1233
C ----   # guest sees 1233

in a single qemu-img invocation might be useful.


Version-Release number of selected component (if applicable):
still present upstream as of 2.3

How reproducible:
100%

Steps to Reproduce:
1. given a top level file, try and use qemu-img to shorten the chain by committing an intermediate image into the base
2.
3.

Actual results:
no single command exists, user must issue multiple qemu-img commands

Expected results:
a single qemu-img command can do it all

Additional info:
see also this thread: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg00276.html

Comment 1 Eric Blake 2015-04-02 14:29:14 UTC
Also, HMP should be updated to expose the same power as QMP and qemu-img. I know that HMP is not the focus of RHEL, but don't want us to forget those issues (as they are mentioned in the same thread, and use related code)

Comment 3 Eric Blake 2015-04-02 15:22:18 UTC
see also bug 1208587

Comment 5 Ping Li 2017-03-14 10:05:06 UTC
Hi Jeff,

As the flag rhel-7.4.0? is set, qe wonder to know whether the issue will be fixed in rhel 7.4? Then qe can add it to RHEL 7.4 test plan for disk format. Thanks.

Comment 8 Ademar Reis 2020-02-05 22:42:03 UTC
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks

Comment 13 RHEL Program Management 2020-12-15 07:21:52 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 16 Red Hat Bugzilla 2023-09-14 02:57:28 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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