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.

Bug 807557

Summary: virt-sysprep: wrong params are passed to virt-inspector
Product: Red Hat Enterprise Linux 6 Reporter: Qixiang Wan <qwan>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: leiwang, moli, qguan, yuzhou
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.16.12-3.el6 Doc Type: Bug Fix
Doc Text:
No Documentation needed
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 07:01:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Qixiang Wan 2012-03-28 07:08:06 UTC
Description of problem:
virt-sysprep pass wrong params to virt-inspector in this line:
virt-inspector "${params[@]}" > $tmpdir/xml

So if run:
# virt-sysprep -d rhel

The params will be "-d rhel", and virt-inspector will fail with "unknown option: d".
 
Version-Release number of selected component (if applicable):
libguestfs-1.16.12-1.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. # virt-sysprep -d rhel
   or with some other options like "-a /path/to/image"
  
Actual results:
# virt-sysprep -d rhel
Unknown option: d
Usage:
     virt-inspector [--connect URI] domname

     virt-inspector guest.img [guest.img ...]


Expected results:
No error.

Additional info:

Comment 1 Richard W.M. Jones 2012-03-28 19:14:08 UTC
Oh dear.

"virt-inspector" in that script needs to be replaced by
"virt-inspector2".

Comment 3 Richard W.M. Jones 2012-04-02 12:32:48 UTC
Fixed in libguestfs-1.16.12-3.el6.

Comment 4 Qin Guan 2012-04-05 13:05:33 UTC
Verify this problem with libguestfs-1.16.15-3.el6.

The virt-sysprep can pass params to virt-inspector successfully.

Tested with:
virt-sysprep -a [guest-image-file]
virt-sysprep -d [guest-domain-name]

Check that the guest image configuration is reset with above commands.

Comment 5 Qin Guan 2012-04-06 03:01:00 UTC
(In reply to comment #4)
> Verify this problem with libguestfs-1.16.15-3.el6.

Sorry, correct the version as libguestfs-1.16.15-1.el6

Tested also with the options of -a|--add, -c|--connect, -d|--domain, --format and -v|--verbose, all the params pass correctly.

Comment 6 Richard W.M. Jones 2012-04-26 12:25:32 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No Documentation needed

Comment 8 errata-xmlrpc 2012-06-20 07:01:24 UTC
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.

http://rhn.redhat.com/errata/RHSA-2012-0774.html