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 1197407 - libguestfs fails to find root
Summary: libguestfs fails to find root
Keywords:
Status: CLOSED DUPLICATE of bug 1186935
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-01 01:38 UTC by William Brown
Modified: 2015-03-02 09:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-02 09:15:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Output of virt-cat -x -v (109.17 KB, text/plain)
2015-03-01 01:38 UTC, William Brown
no flags Details

Description William Brown 2015-03-01 01:38:36 UTC
Created attachment 996669 [details]
Output of virt-cat -x -v

Description of problem:
I am using the virt-v2v tools from https://www.redhat.com/archives/libguestfs/2014-May/msg00090.html as they are not yet available (from what I can see)

My guest has partitioning as:

NAME                MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda                 252:0    0   20G  0 disk 
├─vda1              252:1    0  512M  0 part /boot
└─vda2              252:2    0 19.5G  0 part 
  ├─vg00-root_lv    253:0    0  512M  0 lvm  /
  ├─vg00-swap_lv    253:1    0    2G  0 lvm  [SWAP]
  ├─vg00-usr_lv     253:2    0    3G  0 lvm  /usr
  ├─vg00-var_log_lv 253:3    0    2G  0 lvm  /var/log
  ├─vg00-var_lib_lv 253:4    0    2G  0 lvm  /var/lib
  ├─vg00-var_lv     253:5    0  1.5G  0 lvm  /var
  └─vg00-home_lv    253:6    0  512M  0 lvm  /home


Libguest fails to find the root volume in this configuration.

I have attached the log of virt-cat -x -v on this host.

Version     : 1.28.1
From repo   : libguestfs-RHEL-7.1-preview

Comment 1 William Brown 2015-03-01 02:17:30 UTC
  /* Linux root? */
  else if (is_dir_etc &&
           (is_dir_bin ||
            (guestfs_is_symlink (g, "/bin") > 0 &&
             guestfs_is_dir (g, "/usr/bin") > 0)) &&
           guestfs_is_file (g, "/etc/fstab") > 0) {
    fs->is_root = 1;
    fs->format = OS_FORMAT_INSTALLED;
    if (guestfs___check_linux_root (g, fs) == -1)
      return -1;
  }


src/inspect-fs.c

Because /usr is seperate, /usr/bin is dir will never be satisfied.

Perhaps just check that /usr is a directory instead?

Comment 2 William Brown 2015-03-01 02:26:17 UTC
As a work around, you can boot a guest with rd.break rd.shell and run

umount /sysroot/usr/
remount -o rw,remount /sysroot
mkdir /sysroot/usr/bin
sync
remount -o ro,remount /sysroot
reboot

This is enough to pass the check for root_lv to pass as the root, then the tools will mount /usr anyway and everything works.

Comment 4 Richard W.M. Jones 2015-03-02 09:15:43 UTC
This is the same as the problem that inspection doesn't
work when /usr is on a separate partition.  Therefore
marking as duplicate.

*** This bug has been marked as a duplicate of bug 1186935 ***


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