Bug 2030709
| Summary: | [RFE] libguestfs: Add Rocky Linux support | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Neil Hanlon <neil> | ||||
| Component: | libguestfs | Assignee: | Virtualization Maintenance <virt-maint> | ||||
| Status: | CLOSED ERRATA | QA Contact: | YongkuiGuo <yoguo> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | CentOS Stream | CC: | bstinson, jwboyer, lersek, rjones, tucklesepk, virt-maint, yoguo | ||||
| Target Milestone: | rc | Keywords: | FutureFeature | ||||
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | libguestfs-1.46.1-2.el9 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2022-05-17 12:28:38 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: | |||||||
| Attachments: |
|
||||||
|
Description
Neil Hanlon
2021-12-09 14:32:42 UTC
Created attachment 1845484 [details]
Patch to add Rocky Linux
Adding patch here in case the email was badly formatted
Try to detect Rocky linux with virt-inspector: 1. Download Rocky linux iso and install it # wget https://download.rockylinux.org/pub/rocky/8/isos/x86_64/Rocky-8.5-x86_64-minimal.iso 2. # virt-inspector -a /var/lib/libvirt/images/Rocky-8.5.qcow2 <?xml version="1.0"?> <operatingsystems> <operatingsystem> <root>/dev/rl/root</root> <name>linux</name> <arch>x86_64</arch> <distro>redhat-based</distro> <product_name>Rocky Linux release 8.5 (Green Obsidian)</product_name> <major_version>8</major_version> <minor_version>5</minor_version> <package_format>rpm</package_format> <package_management>dnf</package_management> <hostname>localhost.localdomain</hostname> <osinfo>redhat-based8.5</osinfo> <mountpoints> <mountpoint dev="/dev/rl/root">/</mountpoint> <mountpoint dev="/dev/sda1">/boot</mountpoint> </mountpoints> <filesystems> <filesystem dev="/dev/rl/root"> <type>xfs</type> <uuid>5a21c461-b629-4e25-a709-7eecea6dd5e8</uuid> </filesystem> <filesystem dev="/dev/rl/swap"> <type>swap</type> <uuid>8d79255a-b2ba-489a-bbc5-50c639c20308</uuid> </filesystem> <filesystem dev="/dev/sda1"> <type>xfs</type> <uuid>d7a342d4-9989-4abf-bde8-25750539878e</uuid> </filesystem> </filesystems> <applications> <application> <name>NetworkManager</name> <epoch>1</epoch> <version>1.32.10</version> <release>4.el8</release> <arch>x86_64</arch> ... The distro and osinfo are not correct. The patch didn't compile but I've fixed it up, tested and applied it: https://github.com/libguestfs/libguestfs/commit/631962c0e88a321646846be91d0fbea1ba14e263 $ ./run virt-inspector -a disk.img --no-applications <?xml version="1.0"?> <operatingsystems> <operatingsystem> <root>/dev/rl/root</root> <name>linux</name> <arch>x86_64</arch> <distro>rocky</distro> <product_name>Rocky Linux 8.5 (Green Obsidian)</product_name> <major_version>8</major_version> <minor_version>5</minor_version> <package_format>rpm</package_format> <package_management>dnf</package_management> <hostname>localhost.localdomain</hostname> <osinfo>rocky8</osinfo> <mountpoints> <mountpoint dev="/dev/rl/root">/</mountpoint> <mountpoint dev="/dev/sda1">/boot</mountpoint> </mountpoints> <filesystems> <filesystem dev="/dev/rl/root"> <type>xfs</type> <uuid>fed8331f-9f25-40cd-883e-090cd640559d</uuid> </filesystem> <filesystem dev="/dev/rl/swap"> <type>swap</type> <uuid>6da2c121-ea7d-49ce-98a3-14a37fceaadd</uuid> </filesystem> <filesystem dev="/dev/sda1"> <type>xfs</type> <uuid>4efafe61-2d20-4d93-8055-537e09bfd033</uuid> </filesystem> </filesystems> ... Thank you for fixing up my patch. I should have tested it more thoroughly before sending it in. With respect to your comment on the patch re: osinfodb -- Rocky should have support in future releases, if we aren't directly in there now: https://gitlab.com/libosinfo/osinfo-db/-/tree/master/data/os/rockylinux.org Thank you again for your assistance with this patch. Best regards, Neil Thanks - I wonder if the osinfo short ID needs to be rocky%d.%d instead of rocky%d ? https://github.com/libguestfs/libguestfs/blob/1941593585574849dd72c458535cd80b4d858266/lib/inspect-osinfo.c#L52 I believe that may be the case (rocky%d.%d vs rocky%d). Rocky uses major.minor in its /etc/os-release and /etc/rocky-release files, if that matters/helps. Test with packages:
libguestfs-1.46.1-2.el9.x86_64
guestfs-tools-1.46.1-6.el9.x86_64
qemu-kvm-6.2.0-1.el9.x86_64
Steps:
1. On rhel9 host
# virt-inspector -a /var/lib/libvirt/images/Rocky-8.5.qcow2
<?xml version="1.0"?>
<operatingsystems>
<operatingsystem>
<root>/dev/rl/root</root>
<name>linux</name>
<arch>x86_64</arch>
<distro>rocky</distro>
<product_name>Rocky Linux 8.5 (Green Obsidian)</product_name>
<major_version>8</major_version>
<minor_version>5</minor_version>
<package_format>rpm</package_format>
<package_management>dnf</package_management>
<hostname>localhost.localdomain</hostname>
<osinfo>rocky8</osinfo>
<mountpoints>
<mountpoint dev="/dev/rl/root">/</mountpoint>
<mountpoint dev="/dev/sda1">/boot</mountpoint>
</mountpoints>
<filesystems>
<filesystem dev="/dev/rl/root">
<type>xfs</type>
<uuid>5a21c461-b629-4e25-a709-7eecea6dd5e8</uuid>
</filesystem>
<filesystem dev="/dev/rl/swap">
<type>swap</type>
<uuid>8d79255a-b2ba-489a-bbc5-50c639c20308</uuid>
</filesystem>
<filesystem dev="/dev/sda1">
<type>xfs</type>
<uuid>d7a342d4-9989-4abf-bde8-25750539878e</uuid>
</filesystem>
</filesystems>
<applications>
<application>
<name>NetworkManager</name>
...
The info is correct.
Verified this bug since it is fixed in the latest RHEL9 compose. 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: libguestfs), 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:2317 |