Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
No error messages output if append '--format qcow2' after '-a guest.img', but if i put '--format qcow2' before '-a guest.img', virt-customize will detect the image format and print a error.
Version-Release number of selected component (if applicable):
libguestfs-1.27.43-1.1.el7
How reproducible:
100%
Steps to Reproduce:
1. Create a raw format guest image: rhel6.6.img
2. #virt-customize --hostname unused -a rhel6.6.img --format qcow2
[ 0.0] Examining the guest ...
[ 5.0] Setting a random seed
[ 5.0] Setting the hostname: unused
[ 5.0] Finishing off
3. virt-customize --format qcow2 --hostname unused -a rhel6.6.img
[ 0.0] Examining the guest ...
virt-customize: error: libguestfs error: could not create appliance through
libvirt.
Try running qemu directly without libvirt using this environment variable:
export LIBGUESTFS_BACKEND=direct
Original error from libvirt: internal error: process exited while
connecting to monitor: Warning: option deprecated, use lost_tick_policy
property of kvm-pit instead.
qemu-kvm: -drive
file=/root/rhel6.6.img,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=writeback,discard=unmap:
could not open disk image /root/rhel6.6.img: Image is not in qcow2 format
[code=1 domain=10]
If reporting bugs, run virt-customize with debugging enabled and include
the complete output:
virt-customize -v -x [...]
Actual results:
Step 2 have no message output, it seems virt-customize use auto-detection model even though you append '--format qcow2' at the end of the command line.
Expected results:
Step 2 have a error message output, because you specify '--format qcow2', but guest.img is a raw format file
Additional info:
Comment 2Richard W.M. Jones
2014-09-16 15:34:01 UTC
This is supposed to be fixed in >= 1.27.45. Please try a more
recent version.
Upstream fix commit b7bdb63d8967762a5b234049c4dda911150cc199.
(In reply to Richard W.M. Jones from comment #2)
> This is supposed to be fixed in >= 1.27.45. Please try a more
> recent version.
>
> Upstream fix commit b7bdb63d8967762a5b234049c4dda911150cc199.
I test it against libguestfs-1.27.46-1.1.el7
#virt-customize --hostname unused -a rhel7.0.img --format qcow2
virt-customize: error: --format parameter must appear before -a parameter
If reporting bugs, run virt-customize with debugging enabled and include
the complete output:
virt-customize -v -x [...]
So, it is fixed in libguestfs-1.27.46-1.1.el7, thanks for your repair work!
Comment 4Richard W.M. Jones
2014-09-16 17:45:12 UTC
Setting flags so I can add this to the erratum ...
Verify with libguestfs-1.28.1-1.2.el7
Steps to verify:
#virt-customize --hostname unused -a rhel.img --format qcow2
virt-customize: error: --format parameter must appear before -a parameter
If reporting bugs, run virt-customize with debugging enabled and include
the complete output:
virt-customize -v -x [...]
#virt-customize --hostname unused -a rhel.img --format raw
virt-customize: error: --format parameter must appear before -a parameter
If reporting bugs, run virt-customize with debugging enabled and include
the complete output:
virt-customize -v -x [...]
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