Bug 1212409 - [RFE] Provide libosinfo metadata for CirrOS
Summary: [RFE] Provide libosinfo metadata for CirrOS
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libosinfo
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabiano Fidêncio
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-16 11:03 UTC by Kashyap Chamarthy
Modified: 2018-09-11 20:42 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-09-11 20:42:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Kashyap Chamarthy 2015-04-16 11:03:14 UTC
CirrOS[1] is one of the popular small-sized disk images used heavily by 
OpenStack. Currently importing CirrOS disk images (with `virt-install`) 
with a 'fedora21' OS variant into libvirt works just fine.

So, is it worth having specific libosinfo metadata for CirrOS?

[1] https://launchpad.net/cirros


Just to note, the below is the CirrOS guest xml (imported with 'fedora21' --os-variant) I use:
--------------------------------------------------------------------
<domain type='kvm' id='18'>
  <name>cirrvm</name>
  <uuid>ec9714ed-b23b-4580-99c6-b2862a5bea21</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>SandyBridge</model>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/cirros-0.3.3-x86_64-disk.img'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:71:0d:8d'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/42'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/42'>
      <source path='/dev/pts/42'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='selinux' relabel='yes'>
    <label>system_u:system_r:svirt_t:s0:c510,c660</label>
    <imagelabel>system_u:object_r:svirt_image_t:s0:c510,c660</imagelabel>
  </seclabel>
</domain>
--------------------------------------------------------------------

Comment 1 Christophe Fergeau 2015-04-24 08:24:31 UTC
It definitely would be worth having it. However, this does not seem to be shipping ISOs, so libosinfo autodetection would currently not work with this. The metadata you have in mind is minimum/recommended memory/disk space and supported devices I assume?

Comment 2 Christophe Fergeau 2015-04-27 14:25:05 UTC
Some additional details following an IRC conversation

12:15 < danpb> teuf: it'd still be useful for openstack actually
12:15 < danpb> teuf: we're adding support to glance so that when people upload pre-built disk images
               they can tag them with the libosinfo id
12:15 < danpb> teuf: then nova can query libosinfo to find out if it supports virtio-blk, net, scsi etc
12:21 < danpb> my view is if there's a project who shows they make releases of isos or disk images regularly then, they are valid for inclusion in libosinfo
12:21 < danpb> ie, we should be as inclusive as possible
12:30 < kashyap> teuf: This is what Dan was talking about --
https://github.com/openstack/nova-specs/blob/master/specs/liberty/approved/libvirt-hardware-policy-from-libosinfo.rst

Comment 3 Marcin Juszkiewicz 2016-07-22 11:17:27 UTC
For 0.4.0 images short_id=ubuntu16.04 works fine. 

My AArch64 guest found storage using virtio-blk which is built-in into kernel compared to virtio-scsi which is a module (not present in on-disk initramfs).

Comment 5 Fabiano Fidêncio 2018-09-11 20:42:51 UTC
master (osinfo-db):
 0fc136c3484a8dd367ab27266b6d23aa3ebaeaf7
 140d27c8bf9180909766997c5a15b0beee718c74
 3ab449295d8ab4629c2954ecd878214a4c2e3937
 7c8c8c295cdbc8d05e2da4d0b6c5ef21e0696ea9
 1f7e4a113fb793c619b19f7b8229dd99d0f146f0
 3cb1e0ae80ee9c0e3a7c825404e6e0fed9677bb4
 6df9ea6a4dca3f671a30c402fb1d1ba3995d87d1


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