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 1388407 - virt-sysprep will fail detecting OS if "/usr" is a distinct partition mounted in "/" via fstab
Summary: virt-sysprep will fail detecting OS if "/usr" is a distinct partition mounted...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pino Toscano
QA Contact: Virtualization Bugs
Yehuda Zimmerman
URL:
Whiteboard:
Depends On: 1186935
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-25 09:32 UTC by Wu Siu Wa
Modified: 2020-01-17 16:04 UTC (History)
5 users (show)

Fixed In Version: libguestfs-1.20.11-20.el6
Doc Type: Bug Fix
Doc Text:
_libguestfs_ now identifies operating systems in virtual machines where `/usr/` is not in the same partition as `/` Previously, _libguestfs_ did not recognize guest operating systems where the `/usr/` directory was not in the same partition as `/`. As a result, _libguestfs_ tools such as *virt-sysprep* did not perform as expected. With this update, _libguestfs_ recognizes guest operating systems even when the `/usr/` directory is not located in the same partition as `/`. Consequently, _libguestfs_ tools such as *virt-sysprep* perform as expected.
Clone Of:
Environment:
Last Closed: 2017-03-21 08:56:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
virt-sysprep -a -v output for the failed case. (180.97 KB, text/plain)
2016-10-25 09:32 UTC, Wu Siu Wa
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0564 0 normal SHIPPED_LIVE Moderate: libguestfs security and bug fix update 2017-03-21 12:21:18 UTC

Description Wu Siu Wa 2016-10-25 09:32:25 UTC
Created attachment 1213796 [details]
virt-sysprep -a -v output for the failed case.

Description of problem:

This is a bug for RHEL6, which has the same issue with BZ 1318440.

Version-Release number of selected component (if applicable):
libguestfs-1.20.11-17.el6.x86_64

How reproducible:
1. Install a RHEL7 VM guest, in RHEL6 kvm host.
2. During installation, set `/usr` as a separated partition/LV.
3. Perform `virt-sysprep` in rhel6.


Actual results:
~~~
# virt-sysprep -a /home/vm/feichashao_RHEL72_ks_sysprep.qcow2
Examining the guest ...
virt-sysprep: no operating systems were found in the guest image
~~~

Expected results:
~~~
# virt-sysprep -a /home/vm/feichashao_RHEL72_ks_sysprep_nousr-corrupt.qcow2
Examining the guest ...
Performing "yum-uuid" ...
Performing "utmp" ...
Performing "udev-persistent-net" ...
Performing "tmp-files" ...
Performing "sssd-db-log" ...
Performing "ssh-userdir" ...
...........
~~~

Additional info:

1. Attached debug log of `virt-sysprep -a xxx -v` for the failed case.

2. Customer need to create/run RHEL7 guests on RHEL6 hosts, so customer need this tool to make templates.

Comment 1 Richard W.M. Jones 2016-10-25 10:03:54 UTC
Fixed in RHEL 7.3 (bug 1318440)

You can get the preview packages from

  https://people.redhat.com/~rjones/libguestfs-RHEL-7.3-preview/

or wait a few days for the official release.

For RHEL 6 (this bug) the patch seems backport-able.  I'll see
what Pino thinks because he is RHEL 6 maintainer.

Comment 4 Pino Toscano 2016-10-26 14:05:08 UTC
(In reply to Richard W.M. Jones from comment #1)
> For RHEL 6 (this bug) the patch seems backport-able.  I'll see
> what Pino thinks because he is RHEL 6 maintainer.

Yes, the patch for the inspection API is easy enough.

Comment 6 Xianghua Chen 2016-11-01 08:49:30 UTC
Verified with packages:
libguestfs-1.20.11-20.el6.x86_64

Verify steps:
1. On RHEL6 host ,install a RHEL7 VM guest(set `/usr` as a separated partition/LV during installation):
RHEL7.2-usr.img
2.
# virt-sysprep -a RHEL7.2-usr.img 
Examining the guest ...
Performing "yum-uuid" ...
Performing "utmp" ...
Performing "udev-persistent-net" ...
Performing "tmp-files" ...
Performing "sssd-db-log" ...
Performing "ssh-userdir" ...
Performing "ssh-hostkeys" ...
Performing "smolt-uuid" ...
Performing "script" ...
Performing "samba-db-log" ...
Performing "rpm-db" ...
Performing "rhn-systemid" ...
Performing "random-seed" ...
Performing "puppet-data-log" ...
Performing "password" ...
Performing "pam-data" ...
Performing "package-manager-cache" ...
Performing "pacct-log" ...
Performing "net-hwaddr" ...
Performing "net-hostname" ...
Performing "mail-spool" ...
Performing "machine-id" ...
Performing "logfiles" ...
Performing "hostname" ...
Performing "firstboot" ...
Performing "dovecot-data" ...
Performing "dhcp-server-state" ...
Performing "dhcp-client-state" ...
Performing "delete" ...
Performing "cron-spool" ...
Performing "crash-data" ...
Performing "blkid-tab" ...
Performing "bash-history" ...
Performing "abrt-data" ...
Performing "lvm-uuids" ...


So verified.

Comment 13 errata-xmlrpc 2017-03-21 08:56:21 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.

https://rhn.redhat.com/errata/RHSA-2017-0564.html


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