<operatingsystem> tags various fields that describe the operating system are missing in rocky linux9

operatingsystem are various fields that describe the operating system, its architecture, the descriptive “product name” string, the type of OS and so on missing in rocky linux9.

https://libguestfs.org/virt-inspector.1.html

Rocky linux 9:Here we don’t see any info related to operatingsystems
virt-inspector -a /image/Rocky-9-GenericCloud-9.0-20220706.0.x86_64.qcow2

<?xml version="1.0"?>
<operatingsystems/>
<?xml version="1.0"?>

Rocky linux 8.6:Here we see all the info related to operatingsystems
[root@7265070ee9f5 /]# virt-inspector -a /image/Rocky-8-GenericCloud-8.6.20220702.0.x86_64.qcow2

<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/sda1</root>
    <name>linux</name>
    <arch>x86_64</arch>
    <distro>redhat-based</distro>
    <product_name>Rocky Linux release 8.6 (Green Obsidian)</product_name>
    <major_version>8</major_version>
    <minor_version>6</minor_version>
    <package_format>rpm</package_format>
    <package_management>dnf</package_management>
    <hostname>localhost.localdomain</hostname>
    <osinfo>redhat-based8.6</osinfo>
    <mountpoints>
      <mountpoint dev="/dev/sda1">/</mountpoint>
    </mountpoints>

Size of the rocky 8.6 and 9.0 there is 1G difference.

-rw-r–r-- 1 qemu qemu 2.5G Aug 1 09:48 Rocky-8-GenericCloud-8.6.20220702.0.x86_64.qcow2
-rw-rw-r-- 1 qemu qemu 1.5G Aug 1 06:58 Rocky-9-GenericCloud-9.0-20220706.0.x86_64.qcow2

Which means does embedded os is missing here in the new rocky linux 9 image?
Why tags various fields that describe the operating system are missing in rocky linux9?

Hi @byrareddy -

So the reason virt-inspector is unable to detect any information is due to your version of virt-inspector–specifically, the version of osinfo-db underneath. For example, on Fedora 36, I receive the following output from virt-inspector:

╰─➤ virt-inspector ~/Downloads/isos/Rocky-9-GenericCloud-9.0-20220706.0.x86_64.qcow2 | head
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/sda2</root>
    <name>linux</name>
    <arch>x86_64</arch>
    <distro>rocky</distro>
    <product_name>Rocky Linux release 9.0 (Blue Onyx)</product_name>
    <major_version>9</major_version>
    <minor_version>0</minor_version>

In time, the new database will become available in Rocky Linux (as well as other places), and virt-inspector will work as you expect it to. In the meantime, you could install a new version of the library or just the database files. I’ve not tested this, but if you put these files into /usr/share/osinfo/os/rockylinux.org/, virt-inspector will likely work for you as you expect, until it’s updated to include the right Rocky versions. Relatedly, @nazunalika has been doing some work on osinfo-db to make it a bit smarter in the future.

https://mirror.potato.shrug.pw/osinfo-latest-rocky.tgz

╭─<neil@afterman-ascension>─<~>─<9:50PM>─◇
╰─➤ tar -tf osinfo-latest-rocky.tgz
usr/share/osinfo/os/rockylinux.org/
usr/share/osinfo/os/rockylinux.org/rocky-8-unknown.xml
usr/share/osinfo/os/rockylinux.org/rocky-8.4.xml
usr/share/osinfo/os/rockylinux.org/rocky-8.5.xml
usr/share/osinfo/os/rockylinux.org/rocky-9-unknown.xml
usr/share/osinfo/os/rockylinux.org/rocky-9.0.xml
usr/share/osinfo/os/rockylinux.org/rocky-unknown.xml
usr/share/osinfo/os/rockylinux.org/rocky-8.6.xml

Best,
Neil

Thanks for the info.Size of the rocky 8.6 and 9.0 there is 1G difference.

-rw-r–r-- 1 qemu qemu 2.5G Aug 1 09:48 Rocky-8-GenericCloud-8.6.20220702.0.x86_64.qcow2
-rw-rw-r-- 1 qemu qemu 1.5G Aug 1 06:58 Rocky-9-GenericCloud-9.0-20220706.0.x86_64.qcow2

Which means does embedded os is missing here in the new rocky linux 9 image or related packages?

No, the 8.6 image just needs to be sparsified. It is not missing anything.