Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1318440 - 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 7
Classification: Red Hat
Component: libguestfs (Show other bugs)
7.2
x86_64 Unspecified
medium Severity low
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
: 1391789 (view as bug list)
Depends On: 1186935 1218766
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-16 18:14 EDT by David Hill
Modified: 2016-11-04 08:30 EDT (History)
6 users (show)

See Also:
Fixed In Version: libguestfs-1.32.4-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 13:59:44 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2576 normal SHIPPED_LIVE Moderate: libguestfs and virt-p2v security, bug fix, and enhancement update 2016-11-03 08:06:51 EDT

  None (edit)
Description David Hill 2016-03-16 18:14:27 EDT
Description of problem:
virt-sysprep will fail detecting OS if "/usr" is a distinct partition mounted in "/" via fstab

Version-Release number of selected component (if applicable):


How reproducible:
Every time

Steps to Reproduce:
1. Create a VM with "/var", "/", "/usr", "/home" partitions
2. Try to virt-sysprept it
3. 

Actual results:
Fails with "cannot detect operating system"

Expected results:
Should detect the OS

Additional info:
I can reproduce this issue to.
Comment 2 Vagner Farias 2016-03-16 22:52:01 EDT
I'd agree with a suggestion from David that an option like "--force-os=linux" or something similar would be an acceptable workaround, if the problem is only with detecting the operating system.
Comment 3 Pino Toscano 2016-03-17 06:00:42 EDT
This has been reported already as upstream bug #1186935.
Comment 4 Pino Toscano 2016-03-17 06:03:27 EDT
(In reply to Vagner Farias from comment #2)
> I'd agree with a suggestion from David that an option like
> "--force-os=linux" or something similar would be an acceptable workaround,
> if the problem is only with detecting the operating system.

This won't work, as the inspection done by libguestfs does more than just detecting the OS: for example, it detects all the different partitions in the disk image, and how they are eventually mounted for each guest.
Comment 11 Xianghua Chen 2016-07-12 03:49:31 EDT
Verified with the packages:
libguestfs-1.32.5-10.el7.x86_64

Verify steps:
1. Prepare a RHEL7 guest image with separate partition for "/var", "/", "/usr", "/home":
# guestfish -a rhel7.2-distinct_partition_for_usr.qcow2 -i sh "df -h"
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root  4.9G   54M  4.9G   2% /
/dev/mapper/rhel-usr   2.0G  817M  1.2G  42% /usr
/dev/mapper/rhel-var  1014M   65M  950M   7% /var
/dev/sda1              473M  123M  350M  27% /boot
/dev/mapper/rhel-home 1014M   33M  982M   4% /home
/dev                   237M     0  237M   0% /dev
2. # virt-sysprep -a rhel7.2-distinct_partition_for_usr.qcow2
[   0.0] Examining the guest ...
[   3.3] Performing "abrt-data" ...
[   3.3] Performing "bash-history" ...
[   3.3] Performing "blkid-tab" ...
[   3.4] Performing "crash-data" ...
[   3.4] Performing "cron-spool" ...
[   3.4] Performing "dhcp-client-state" ...
[   3.4] Performing "dhcp-server-state" ...
[   3.4] Performing "dovecot-data" ...
[   3.4] Performing "logfiles" ...
[   3.4] Performing "machine-id" ...
[   3.4] Performing "mail-spool" ...
[   3.4] Performing "net-hostname" ...
[   3.4] Performing "net-hwaddr" ...
[   3.4] Performing "pacct-log" ...
[   3.4] Performing "package-manager-cache" ...
[   3.4] Performing "pam-data" ...
[   3.4] Performing "puppet-data-log" ...
[   3.4] Performing "rh-subscription-manager" ...
[   3.4] Performing "rhn-systemid" ...
[   3.4] Performing "rpm-db" ...
[   3.4] Performing "samba-db-log" ...
[   3.4] Performing "script" ...
[   3.4] Performing "smolt-uuid" ...
[   3.4] Performing "ssh-hostkeys" ...
[   3.4] Performing "ssh-userdir" ...
[   3.4] Performing "sssd-db-log" ...
[   3.4] Performing "tmp-files" ...
[   3.4] Performing "udev-persistent-net" ...
[   3.4] Performing "utmp" ...
[   3.4] Performing "yum-uuid" ...
[   3.4] Performing "customize" ...
[   3.4] Setting a random seed
[   4.5] Performing "lvm-uuids" ...

The command finished successfully.

So verified.
Comment 13 errata-xmlrpc 2016-11-03 13:59:44 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-2016-2576.html
Comment 14 Richard W.M. Jones 2016-11-04 08:30:46 EDT
*** Bug 1391789 has been marked as a duplicate of this bug. ***

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