Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1388407 - virt-sysprep will fail detecting OS if "/usr" is a distinct partition mounted in "/" via fstab
virt-sysprep will fail detecting OS if "/usr" is a distinct partition mounted...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
6.8
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Pino Toscano
Virtualization Bugs
Yehuda Zimmerman
:
Depends On: 1186935
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-25 05:32 EDT by Wu Siu Wa
Modified: 2017-03-21 04:56 EDT (History)
5 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-21 04:56:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0564 normal SHIPPED_LIVE Moderate: libguestfs security and bug fix update 2017-03-21 08:21:18 EDT

  None (edit)
Description Wu Siu Wa 2016-10-25 05:32:25 EDT
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 06:03:54 EDT
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 10:05:08 EDT
(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 04:49:30 EDT
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 04:56:21 EDT
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.