Bug 2025950

Summary: RFE: virt-inspector fails to detect the distro and applications on Kylin-Desktop-V10 image
Product: Red Hat Enterprise Linux 9 Reporter: Richard W.M. Jones <rjones>
Component: guestfs-toolsAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED ERRATA QA Contact: YongkuiGuo <yoguo>
Severity: low Docs Contact:
Priority: low    
Version: 9.0CC: kkiwi, lersek, rjones, virt-maint, xiaodwan, yoguo
Target Milestone: betaKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: guestfs-tools-1.46.1-5.el9 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1995391 Environment:
Last Closed: 2022-05-17 13:07:48 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1995391    
Bug Blocks:    

Description Richard W.M. Jones 2021-11-23 13:19:08 UTC
+++ This bug was initially created as a clone of Bug #1995391 +++
[I cloned this bug because part of the fix happens in guestfs-tools]

Description of problem:

virt-inspector fails to detect the distro, package_format, package_management and applications on Kylin-Desktop-V10 image.

Version-Release number of selected component (if applicable):
guestfs-tools-1.46.1-3.el9.1.x86_64

How reproducible:
100%

Steps:

1. Create Kylin-Desktop-V10.qcow2 image with Kylin-Desktop-V10-SP1-RC5-Build01-hwe-210521-x86_64.iso
2.
$ virt-inspector -a Kylin-Desktop-V10.qcow2
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/sda3</root>
    <name>linux</name>
    <arch>x86_64</arch>
    <product_name>Kylin V10 SP1</product_name>
    <major_version>10</major_version>
    <minor_version>0</minor_version>
    <hostname>yoguo-Standard-PC</hostname>
    <mountpoints>
      <mountpoint dev="/dev/sda3">/</mountpoint>
      <mountpoint dev="/dev/sda1">/boot</mountpoint>
    </mountpoints>
    <filesystems>
      <filesystem dev="/dev/sda1">
        <type>ext4</type>
        <uuid>b09bcfbf-480e-4338-9ff5-1304c591dbe3</uuid>
      </filesystem>
      <filesystem dev="/dev/sda2">
        <type>swap</type>
        <uuid>3e8bcddc-5b2f-4459-a82e-6cdb41b24d74</uuid>
      </filesystem>
      <filesystem dev="/dev/sda3">
        <type>ext4</type>
        <uuid>b664095d-dbf1-4476-b759-3266b67e74bc</uuid>
      </filesystem>
    </filesystems>
    <applications/>
  </operatingsystem>
</operatingsystems>


Actual results:
As above

Expected results:
virt-inspector can be able to detect the distro, package_format, package_management and applications correctly.

--- Additional comment from Laszlo Ersek on 2021-10-14 18:01:26 UTC ---

(In reply to Laszlo Ersek from comment #17)
> [PATCH] daemon: inspection: Add support for Kylin (RHBZ#1995391).
> Message-Id: <20211013163023.21786-1-lersek>
> https://listman.redhat.com/archives/libguestfs/2021-October/msg00058.html

Merged upstream as (libguestfs) commit 305b02e7e74a.

> [guestfs-tools PATCH 0/2] refresh "virt-inspector.rng", recognize kylin
> Message-Id: <20211013163043.21837-1-lersek>
> https://listman.redhat.com/archives/libguestfs/2021-October/msg00059.html

Merged upstream as (guestfs-tools) commit range a4930f5fad82..f041a5e24d8c.

(Manual backporting looks unjustified; let's wait for the next rebase(s) with these.)

Comment 5 YongkuiGuo 2021-11-24 09:55:29 UTC
Verified with packages:
libguestfs-1.46.0-5.el9.x86_64
guestfs-tools-1.46.1-5.el9.x86_64

Steps:

1. On rhel9 host
# virt-inspector -a Kylin-Desktop-V10.qcow2
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/sda3</root>
    <name>linux</name>
    <arch>x86_64</arch>
    <distro>kylin</distro>
    <product_name>Kylin V10 SP1</product_name>
    <major_version>10</major_version>
    <minor_version>0</minor_version>
    <package_format>deb</package_format>
    <package_management>apt</package_management>
    <hostname>yoguo-Standard-PC</hostname>
    <osinfo>kylin10.0</osinfo>
    <mountpoints>
      <mountpoint dev="/dev/sda3">/</mountpoint>
      <mountpoint dev="/dev/sda1">/boot</mountpoint>
    </mountpoints>
    <filesystems>
      <filesystem dev="/dev/sda1">
        <type>ext4</type>
        <uuid>b09bcfbf-480e-4338-9ff5-1304c591dbe3</uuid>
      </filesystem>
      <filesystem dev="/dev/sda2">
        <type>swap</type>
        <uuid>3e8bcddc-5b2f-4459-a82e-6cdb41b24d74</uuid>
      </filesystem>
      <filesystem dev="/dev/sda3">
        <type>ext4</type>
        <uuid>b664095d-dbf1-4476-b759-3266b67e74bc</uuid>
      </filesystem>
    </filesystems>
    <applications>
      <application>
        <name>accountsservice</name>
        <version>0.6.55</version>
        <release>0kylin11k3</release>
        <arch>amd64</arch>
...
</operatingsystems>

virt-inspector can be able to detect the distro, package_format, package_management and applications correctly.

Comment 7 errata-xmlrpc 2022-05-17 13:07:48 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 (new packages: guestfs-tools), 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://access.redhat.com/errata/RHBA-2022:2461