Bug 981663 - disk-format "qemu-img info: JSON parse error" when target file does not exist
Summary: disk-format "qemu-img info: JSON parse error" when target file does not exist
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 980338
TreeView+ depends on / blocked
 
Reported: 2013-07-05 12:34 UTC by Richard W.M. Jones
Modified: 2013-07-18 13:27 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 980337
Environment:
Last Closed: 2013-07-18 13:27:12 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2013-07-05 12:34:46 UTC
The disk-format command (in guestfish, or the guestfs_disk_format
API) takes a host file and tries to work out the disk format.

This works fine for any file which exists on the host.

However if the host file does not exist, you get a strange error:

$ guestfish disk-format /etc/nosuchfile
libguestfs: error: qemu-img info: JSON parse error: parse error: premature EOF
                                       
                     (right here) ------^

libguestfs: error: qemu-img info: /etc/nosuchfile: qemu-img info exited with error status 1.
To see full error messages you may need to enable debugging.
See http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs


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