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 1224903 - 'guestmount: no operating system was found on this disk' for rhel7 be guest on ppc64le host
Summary: 'guestmount: no operating system was found on this disk' for rhel7 be guest o...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.2
Hardware: ppc64le
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1288337 1301891
TreeView+ depends on / blocked
 
Reported: 2015-05-26 07:32 UTC by Gu Nini
Modified: 2016-05-30 05:35 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-30 05:35:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The output for virt-inspector. (59.11 KB, text/plain)
2015-06-02 11:00 UTC, Hu Zhang
no flags Details
libguestfs-test-tool.output (47.89 KB, text/plain)
2015-06-02 11:02 UTC, Hu Zhang
no flags Details
virt-inspector-1.37.output (60.86 KB, text/plain)
2015-06-03 02:25 UTC, Hu Zhang
no flags Details

Description Gu Nini 2015-05-26 07:32:24 UTC
Description of problem:
For a rhel7 be guest on ppc64le host, when use cmd 'guestmount -a GuestName -i --ro /media/guestfs/' to mount the guest file system in live in the host, it's a failure for 'guestmount: no operating system was found on this disk'

Version-Release number of selected component (if applicable):
Host kernel: 3.10.0-244.ael7b.ppc64le
Guest kernel: 3.10.0-229.el7.ppc64
qemu-kvm: qemu-kvm-rhev-2.3.0-1.ael7b.ppc64le
libguestfs-1.28.1-1.35.ael7b.ppc64le


How reproducible:
100%

Steps to Reproduce:
1. On the ppc64le host, start/install a rhel7 be guest:
/usr/libexec/qemu-kvm -name spaprraw-0526 -machine pseries-rhel7.1.0,accel=kvm,usb=off -m 2048 -realtime mlock=off -smp 2,threads=1,cores=2,sockets=1 -uuid 95346a10-1828-403a-a610-ac5a52a29490 -no-user-config -nodefaults -monitor stdio -rtc base=utc,clock=vm -no-shutdown -boot strict=on -device pci-ohci,id=usb1,bus=pci.0,addr=0x1 -device spapr-vscsi,id=scsi0,reg=0x1000 -drive file=/media/ngu/spaprraw-0526,if=none,id=drive-scsi0-0-0-0,format=raw -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 -drive file=/media/ngu/iso/RHEL-7.1-20150219.1-Server-ppc64-dvd1.iso,if=none,id=drive-scsi0-0-1-0,readonly=on,format=raw,cache=none -device scsi-cd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,drive=drive-scsi0-0-1-0,id=scsi0-0-1-0,bootindex=2 -netdev tap,id=hostnet0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown -device virtio-net,netdev=hostnet0,id=net0,mac=52:54:00:c4:e7:90,bus=pci.0,addr=0x9 -device usb-kbd,id=input0 -device usb-mouse,id=input1 -device usb-tablet,id=input2 -vnc 0:20 -device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -object rng-random,id=objrng0,filename=/dev/random -device virtio-rng-pci,rng=objrng0,id=rng0,max-bytes=1234,period=2000,bus=pci.0,addr=0x6 -msg timestamp=on

2. After the guest finishes its os installation, make a dir /media/guestfs and try to use cmd 'guestmount' to mount the guest filesystems to it in read-only mode as follows:
[root@ibm-p8-kvm-02-qe ngu]# guestmount -a spaprraw-0526 -i --ro /media/guestfs/
guestmount: no operating system was found on this disk

If using guestfish '-i' option, remove this option and instead
use the commands 'run' followed by 'list-filesystems'.
You can then mount filesystems you want by hand using the
'mount' or 'mount-ro' command.

If using guestmount '-i', remove this option and choose the
filesystem(s) you want to see by manually adding '-m' option(s).
Use 'virt-filesystems' to see what filesystems are available.

If using other virt tools, this disk image won't work
with these tools.  Use the guestfish equivalent commands
(see the virt tool manual page).

RHEL notice
-------------
libguestfs will return this error for Microsoft Windows guests if the
separate 'libguestfs-winsupport' package is not installed. If the
guest is running Microsoft Windows, please try again after installing
'libguestfs-winsupport'.

3. Quit(shutdown) the guest, and mount the guest filesystems with cmd guestmount as step2 do 


Actual results:
In steps 2 and 3, both the guestmount are failures for could not find the os there as showed in step2

Expected results:
The guestmount should succeed in both steps 2 and 3

Additional info:
1) For a rhel6.7 be guest on the same ppc64 le host, there is no the problem, i.e. the guest file system could be mounted successfully; the guest kernel is: 2.6.32-562.el6.ppc64

2) For a rhel7 le guest on another ppc64 be host, there is the same issue, the detailed sw versions are:
Host kernel: 3.10.0-234.el7.ppc64
Guest kernel: 3.10.0-229.ael7b.ppc64le
qemu-kvm: qemu-kvm-rhev-2.2.0-8.el7.ppc64
libguestfs: libguestfs-1.28.1-1.35.el7.ppc64

Comment 2 Hu Zhang 2015-05-28 08:12:35 UTC
Reproduced this bug with the same package.

Test setps:
1. Setup a guest image with the ppc64 iso file RHEL-7.1-20150219.1-Server-ppc64-dvd1.iso.

2. # guestfish -a RHEL-7.1-20150219.1-Server-ppc64.img

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> run
><fs> inspect-os
><fs>

"inspect-os" fails to find the operating system.

Comment 3 Richard W.M. Jones 2015-05-28 12:19:33 UTC
I tested this upstream, and it works there:

$ virt-builder --arch ppc64le rhel-7.1 --output rhel-7.1-ppc64le.img
$ guestfish --ro -a rhel-7.1-ppc64le.img -i
[...]
Operating system: Red Hat Enterprise Linux Server release 7.1 (Maipo)
/dev/rhel-l/root mounted on /
/dev/sda2 mounted on /boot

><fs> inspect-get-arch /dev/rhel-l/root
ppc64le

On RHEL 7.2 it also works (at least on the virt-builder image):

$ guestfish --ro -a rhel-7.1-ppc64le.img -i
[...]
Operating system: Red Hat Enterprise Linux Server release 7.1 (Maipo)
/dev/rhel-l/root mounted on /
/dev/sda2 mounted on /boot

However the inspect-get-arch function doesn't work on RHEL 7.2:

><fs> inspect-get-arch /dev/rhel-l/root
version 1 (SYSV)


Where can I get RHEL-7.1-20150219.1-Server-ppc64-dvd1.iso ?

Comment 4 Richard W.M. Jones 2015-05-28 12:22:05 UTC
(In reply to Richard W.M. Jones from comment #3)
> ><fs> inspect-get-arch /dev/rhel-l/root
> version 1 (SYSV)

As an aside, bug 1211996 should contain the fix for this.

Comment 6 Richard W.M. Jones 2015-05-29 17:05:48 UTC
So finally I can test this using the disk image.  I didn't realize,
when writing comment 2, that we are trying to test a ppc64 (big endian)
guest disk image.

Upstream libguestfs:

<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/rhel/root</root>
    <name>linux</name>
    <arch>ppc64</arch>
    <distro>rhel</distro>
    <product_name>Red Hat Enterprise Linux Server release 7.1 (Maipo)</product_name>
    <major_version>7</major_version>
    <minor_version>1</minor_version>
    <package_format>rpm</package_format>
    <package_management>yum</package_management>
    <hostname>localhost.localdomain</hostname>
    <format>installed</format>
...
All is working well.

RHEL 7.1 ppc64le host, libguestfs-1.28.1-1.36.ael7b.ppc64le:

<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/rhel/root</root>
    <name>linux</name>
    <arch>ppc64</arch>
    <distro>rhel</distro>
    <product_name>Red Hat Enterprise Linux Server release 7.1 (Maipo)</product_name>
    <major_version>7</major_version>
    <minor_version>1</minor_version>
    <package_format>rpm</package_format>
    <package_management>yum</package_management>
    <hostname>localhost.localdomain</hostname>
    <format>installed</format>

For good measure, I also mounted it:

$ mkdir /tmp/mnt
$ export LIBGUESTFS_HV=/usr/libexec/qemu-kvm
$ export LIBGUESTFS_BACKEND=direct
$ guestmount -a /mnt/scratch/bz1224903.img --ro -i /tmp/mnt

$ ls /tmp/mnt
bin   dev  home  lib64  mnt  proc  run   srv  tmp  var
boot  etc  lib   media  opt  root  sbin  sys  usr
$ cat /tmp/mnt/etc/redhat-release 
Red Hat Enterprise Linux Server release 7.1 (Maipo)

So it's all working for me.  If you still have trouble, please run the
following commands and attach the full output to the bug:

virt-inspector -a /path/to/disk.img -v -x

libguestfs-test-tool

Comment 7 Richard W.M. Jones 2015-05-29 18:33:59 UTC
Also can you take a look at libguestfs-1.28.1-1.37.el7.ppc64le.

Comment 8 Hu Zhang 2015-06-02 10:59:28 UTC
(In reply to Richard W.M. Jones from comment #6)
> So it's all working for me.  If you still have trouble, please run the
> following commands and attach the full output to the bug:
> 
> virt-inspector -a /path/to/disk.img -v -x
> 
> libguestfs-test-tool

Tried with libguestfs-1.28.1-1.36.el7.ppc64le and libguestfs-1.28.1-1.37.el7.ppc64le, bug still get the same problem. The attachments are the outputs. 
Notice here, the host is ppc64le system and the images we tried here are ppc64be systems. For ppc64le images, this works well.

Comment 9 Hu Zhang 2015-06-02 11:00:56 UTC
Created attachment 1033702 [details]
The output for virt-inspector.

Comment 10 Hu Zhang 2015-06-02 11:02:16 UTC
Created attachment 1033703 [details]
libguestfs-test-tool.output

Comment 11 Richard W.M. Jones 2015-06-02 11:21:15 UTC
(In reply to Hu Zhang from comment #9)
> Created attachment 1033702 [details]
> The output for virt-inspector.

This was run using the -1.36 package.  Since -1.37 is out there's
no point me trying to diagnose suspected problems with older
versions.  If the problem still occurs with -1.37 then please
attach the virt-inspector -v -x ... output from that.

(In reply to Hu Zhang from comment #10)
> Created attachment 1033703 [details]
> libguestfs-test-tool.output

This shows successful output using the -1.37 package.

Comment 12 Hu Zhang 2015-06-03 02:25:32 UTC
Created attachment 1034095 [details]
virt-inspector-1.37.output

Comment 13 Richard W.M. Jones 2015-06-03 09:47:52 UTC
(In reply to Hu Zhang from comment #12)
> Created attachment 1034095 [details]
> virt-inspector-1.37.output

The error is:
mount -o ro /dev/sda1 /sysroot/
[    1.426168] SGI XFS with ACLs, security attributes, no debug enabled
mount: unknown filesystem type '(null)'
guestfsd: error: /dev/sda1 on / (options: 'ro'): mount: unknown filesystem type '(null)'
guestfsd: main_loop: proc 73 (mount_ro) took 0.04 seconds
libguestfs: trace: mount_ro = -1 (error)

Can you check you have the libguestfs-xfs package installed on the
host?  This package is required in order to inspect any guest which
uses XFS.

Comment 14 Hu Zhang 2015-06-04 01:51:29 UTC
(In reply to Richard W.M. Jones from comment #13)

> Can you check you have the libguestfs-xfs package installed on the
> host?  This package is required in order to inspect any guest which
> uses XFS.

Yes, the libguestfs-xfs package is installed in all the tests above.
# rpm -q libguestfs-xfs
libguestfs-xfs-1.28.1-1.37.el7.ppc64le

Comment 15 Richard W.M. Jones 2015-09-03 17:51:00 UTC
I'm not able to reproduce this.

This is my host configuration:

libguestfs-1.28.1-1.51.el7.ppc64le
libguestfs-tools-c-1.28.1-1.51.el7.ppc64le
libguestfs-xfs-1.28.1-1.51.el7.ppc64le
qemu-kvm-rhev-2.3.0-22.el7.ppc64le
kernel-3.10.0-229.ael7b.ppc64le

The test image is a *big endian* guest built by virt-builder.

virt-inspector correctly identifies the image, its architecture
and the packages installed:

<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/rhel/root</root>
    <name>linux</name>
    <arch>ppc64</arch>
    <distro>rhel</distro>
    <product_name>Red Hat Enterprise Linux Server release 7.1 (Maipo)</product_name>
    <major_version>7</major_version>
    <minor_version>1</minor_version>
    <package_format>rpm</package_format>
    <package_management>yum</package_management>
    <hostname>localhost.localdomain</hostname>
    <format>installed</format>
    <mountpoints>
      <mountpoint dev="/dev/rhel/root">/</mountpoint>
      <mountpoint dev="/dev/sda2">/boot</mountpoint>
    </mountpoints>
    <filesystems>
      <filesystem dev="/dev/rhel/root">
        <type>xfs</type>
        <uuid>fb6032da-07c8-4196-a4a8-592583109940</uuid>
      </filesystem>
      <filesystem dev="/dev/rhel/swap">
        <type>swap</type>
        <uuid>2ad92975-5590-4c17-8819-c7f4e1517a36</uuid>
      </filesystem>
      <filesystem dev="/dev/sda2">
        <type>xfs</type>
        <uuid>9ea22953-b810-462a-bf42-d2d90dff47f9</uuid>
      </filesystem>
    </filesystems>
    <applications>
      <application>
        <name>NetworkManager</name>
        <version>1.0.0</version>
        <release>14.git20150121.b4ea599c.el7</release>
        <arch>ppc64</arch>
      </application>
[etc]

Please try with a later version of libguestfs, and ensure you have
libguestfs-xfs installed on the host too.

Comment 18 Xianghua Chen 2016-05-30 05:35:47 UTC
I can not reproduce this bug either.

This is my host configuration:

libguestfs-1.32.4-2.el7.ppc64le
libguestfs-tools-c-1.32.4-2.el7.ppc64le
libguestfs-xfs-1.32.4-2.el7.ppc64le
qemu-kvm-rhev-2.3.0-31.el7_2.14.ppc64le
kernel-3.10.0-327.el7.ppc64le

The test image is a *big endian* guest. The iso is:RHEL-7.1-20150219.1-Server-ppc64-dvd1.iso, I installed with virt-install.

The steps:
1. # virt-inspector -a RHEL-7.1-ppc64-lvm.qcow2
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/rhel/root</root>
    <name>linux</name>
    <arch>ppc64</arch>
    <distro>rhel</distro>
    <product_name>Red Hat Enterprise Linux Server 7.3 Beta (Maipo)</product_name>
    <major_version>7</major_version>
    <minor_version>3</minor_version>
    <package_format>rpm</package_format>
    <package_management>yum</package_management>
    <hostname>localhost.localdomain</hostname>
    <format>installed</format>
    <mountpoints>
      <mountpoint dev="/dev/rhel/root">/</mountpoint>
      <mountpoint dev="/dev/sda2">/boot</mountpoint>
    </mountpoints>
    <filesystems>
      <filesystem dev="/dev/rhel/root">
        <type>xfs</type>
        <uuid>af2a8666-03d1-4334-a28b-96278953679a</uuid>
      </filesystem>
2. I also tried:
# guestmount -a RHEL-7.1-ppc64-lvm.qcow2 --ro -i /tmp/mnt
# ls /tmp/mnt/
bin   dev  home  lib64  mnt  proc  run   srv  tmp  var
boot  etc  lib   media  opt  root  sbin  sys  usr

No error occurs. So close it.


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