Bug 1010610
Summary: | Backport option "--output=json|human" to qemu-img info command | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Xu Tian <xutian> |
Component: | qemu-kvm | Assignee: | Paolo Bonzini <pbonzini> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | high | Docs Contact: | |
Priority: | urgent | ||
Version: | 6.5 | CC: | acathrow, areis, bsarathy, juzhang, mkenneth, pbonzini, qzhang, sluo, tlavigne, virt-maint |
Target Milestone: | rc | Keywords: | TestBlocker |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-0.12.1.2-2.409.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-11-21 06:02:31 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: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 914802, 1000882 |
Description
Xu Tian
2013-09-22 03:11:49 UTC
Verify this feature with qemu-img-0.12.1.2-2.409.el6.x86_64, all test pass 1. check image file qemu-img create -f qcow2 test.img 1G Formatting 'test.img', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 qemu-img info --output=json ./test.img { "virtual-size": 1073741824, "filename": "./test.img", "cluster-size": 65536, "format": "qcow2", "actual-size": 139264, "dirty-flag": false } 2. check image with internal snapshot qemu-img snapshot -c sn1 test.img qemu-img info --output=json ./test.img { "snapshots": [ { "vm-clock-nsec": 0, "name": "sn1", "date-sec": 1381232657, "date-nsec": 430549000, "vm-clock-sec": 0, "id": "1", "vm-state-size": 0 } ], "virtual-size": 1073741824, "filename": "./test.img", "cluster-size": 65536, "format": "qcow2", "actual-size": 151552, "dirty-flag": false } 3. check image file with snapshot file qemu-img create -F qcow2 -b ./test.img -f qcow2 sn1 Formatting 'sn1', fmt=qcow2 size=1073741824 backing_file='./test.img' backing_fmt='qcow2' encryption=off cluster_size=65536 qemu-img info --output=json ./test.img { "snapshots": [ { "vm-clock-nsec": 0, "name": "sn1", "date-sec": 1381232657, "date-nsec": 430549000, "vm-clock-sec": 0, "id": "1", "vm-state-size": 0 } ], "virtual-size": 1073741824, "filename": "./test.img", "cluster-size": 65536, "format": "qcow2", "actual-size": 151552, "dirty-flag": false } 4. check snapshot file info qemu-img info --output=json ./sn1 { "backing-filename-format": "qcow2", "virtual-size": 1073741824, "filename": "./sn1", "cluster-size": 65536, "format": "qcow2", "actual-size": 200704, "full-backing-filename": "././test.img", "backing-filename": "./test.img", "dirty-flag": false } 5. check converted snapshot image info qemu-img convert ./sn1 -f qcow2 -O raw sn1.raw qemu-img info --output=json ./sn1.raw { "virtual-size": 1073741824, "filename": "./sn1.raw", "format": "raw", "actual-size": 0 } thanks, Xu 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-2013-1553.html *** Bug 999749 has been marked as a duplicate of this bug. *** |