[et-mgmt-tools] [PATCH] virt-convert: check for qemu-img failure
Cole Robinson
crobinso at redhat.com
Thu Jul 3 16:16:54 UTC 2008
John Levon wrote:
> On Thu, Jul 03, 2008 at 11:59:44AM -0400, Cole Robinson wrote:
>
>>> I didn't go the "qemu-info" route (yet), as it only produces
>>> human-readable output: I didn't see a way to get it to print just the
>>> file format.
>> One potential option would be to try 'qemu-info -f vmx imagename', throw
>> away the output and just check the return value. I don't know if this
>> works for all formats but in my quick check the above command on a raw
>> file failed. It would prevent us from autodetecting the format, but it's
>> at least an option.
>
> But why is this any better than just trying the qemu-img convert?
>
> regards
> john
If we have multiple disks to convert, this could tell us we have
a bad apple at the end of the list rather than take quite a while
to convert all the others just to find out we are going to fail.
- Cole
More information about the et-mgmt-tools
mailing list