Bug 1544842

Summary: [RFE] Add libosinfo short-id to virt-inspector output
Product: Red Hat Enterprise Linux 7 Reporter: Fabian Deutsch <fdeutsch>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.5CC: mtessun, pkliczew, ptoscano, xchen
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.38.2-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 07:45:24 UTC Type: Bug
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:    
Bug Blocks: 1560935, 1650415    

Description Fabian Deutsch 2018-02-13 15:33:45 UTC
Description of problem:
virt-inspector can be used to inspect a given disc.

It would be great if virt-inspector could also output a libosinfo short-id.

If this is done, then the connection to th elibosinfo database can be made, which enables a wide range of use cases - i.e. querying additional informations about the guest (name, version, …), also understanding requirements of this guest.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Richard W.M. Jones 2018-02-13 15:47:46 UTC
Yes we should do this.  It's a very easy change actually.  A new
API called something like ‘inspect-get-osinfo’, and a mapping
table buried in daemon/inspect*

Comment 4 Fabian Deutsch 2018-02-16 12:22:06 UTC
Richard, yes that sounds good. I'd be happy to test this once it lands in upstream Fedora or alike.

Comment 5 Pino Toscano 2018-02-21 16:42:59 UTC
Patch series posted upstream:
https://www.redhat.com/archives/libguestfs/2018-February/msg00129.html

Comment 7 Fabian Deutsch 2018-04-05 10:44:59 UTC
One thing - It would be good if we can somehow detect windows geusts as well.

Should this be a spearate rfe?

Comment 8 Pino Toscano 2018-04-05 11:02:03 UTC
(In reply to Fabian Deutsch from comment #7)
> One thing - It would be good if we can somehow detect windows geusts as well.

Basically it boils down to find out all the various combinations of version number (MAJ.MIN), product name, and product variant to an osinfo-db short ID.

> Should this be a spearate rfe?

No, this one is fine.

Comment 10 Xianghua Chen 2018-07-31 03:35:41 UTC
Verified with package:
libguestfs-1.38.2-10.el7.x86_64

Steps:
1.Prepare a RHEL7 guest image:
rhel7.6.qcow2

2.
# virt-inspector -a rhel7.6.qcow2  
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/rhel/root</root>
    <name>linux</name>
    <arch>x86_64</arch>
    <distro>rhel</distro>
    <product_name>Red Hat Enterprise Linux Server 7.6 Beta (Maipo)</product_name>
    <major_version>7</major_version>
    <minor_version>6</minor_version>
    <package_format>rpm</package_format>
    <package_management>yum</package_management>
    <hostname>localhost.localdomain</hostname>
    <osinfo>rhel7.6</osinfo>
    <mountpoints>
      <mountpoint dev="/dev/rhel/root">/</mountpoint>
      <mountpoint dev="/dev/sda1">/boot</mountpoint>
    </mountpoints>
    <filesystems>
... ...

There is osinfo in the output, so verified.

Comment 12 errata-xmlrpc 2018-10-30 07:45:24 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, 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/RHEA-2018:3021