Bug 920225

Summary: libguestfs should use --output json (if supported) to safely parse the output of qemu-img command
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: alexl, amit.shah, berrange, cfergeau, crobinso, dwmw2, dyasny, itamar, knoel, kwolf, mbooth, pbonzini, rjones, scottt.tw, stefanha, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 861375 Environment:
Last Closed: 2013-03-11 19:12:59 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: 861375    
Bug Blocks:    

Description Richard W.M. Jones 2013-03-11 15:37:15 UTC
+++ This bug was initially created as a clone of Bug #861375 +++

qemu-img info currently give me info like this:

image: /home/alex/.local/share/gnome-boxes/images/Fedora 16
file format: qcow2
virtual size: 11G (11794287616 bytes)
disk size: 4.5G
cluster_size: 65536

[...]

Note upstream there is a patch floating around which adds
JSON output to qemu-img info.  This is useful because it's
a big security problem to try to parse the text output from
this command.  See:

https://lists.gnu.org/archive/html/qemu-devel/2012-09/msg00137.html