Bug 1140894
Summary: | No error messages output if append '--format qcow2' after '-a guest.img', guest.img is a raw format image file | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Lingfei Kong <lkong> | |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | low | Docs Contact: | ||
Priority: | low | |||
Version: | 7.1 | CC: | huzhan, leiwang, mbooth, ptoscano, wshi | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libguestfs-1.27.45-1.1.el7 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1203595 (view as bug list) | Environment: | ||
Last Closed: | 2015-03-05 13:44: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: | 1203595 |
Description
Lingfei Kong
2014-09-12 01:27:37 UTC
(In reply to Lingfei Kong from comment #0) > Actual results: > Step 2 have no message output, it seems virt-sysprep use auto-detection > model even though you append '--format qcow2' at the end of the command line. As it says in the manual page, you have to put the --format before the -a parameter: --format raw|qcow2|.. --format auto The default for the -a option is to auto-detect the format of the disk image. Using this forces the disk format for -a options which follow on the command line. Using --format auto switches back to auto-detection for subsequent -a options. For example: virt-sysprep --format raw -a disk.img forces raw format (no auto-detection) for "disk.img". virt-sysprep --format raw -a disk.img --format auto -a another.img forces raw format (no auto-detection) for "disk.img" and reverts to auto-detection for "another.img". However we should probably give an error if there is a useless '--format' after the last -a parameter. I will see if this is a low-risk change. Upstream fix is: https://github.com/libguestfs/libguestfs/commit/b7bdb63d8967762a5b234049c4dda911150cc199 which will appear in >= 1.27.45. Verify with libguestfs-1.28.1-1.2.el7 Steps to verify: #virt-sysprep --hostname unused -a rhel.img --format raw virt-sysprep: error: --format parameter must appear before -a parameter If reporting bugs, run virt-sysprep with debugging enabled and include the complete output: virt-sysprep -v -x [...] #virt-sysprep --hostname unused -a rhel.img --format qcow2 virt-sysprep: error: --format parameter must appear before -a parameter If reporting bugs, run virt-sysprep with debugging enabled and include the complete output: virt-sysprep -v -x [...] There is a proper error messages, so bug is fixed. 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. https://rhn.redhat.com/errata/RHBA-2015-0303.html |