GlanceISOHeaders

= Glance ISO image properties = This page looks at the issue of identifying what OS an ISO image corresponds to and how Glance can help

Background
When working with ISO images, one of the things an application may want to do is identify what operating system an ISO image corresponds to. The libosinfo project provides a database of metadata about operating systems. Amongst other things, it contains metadata which can be used to identify an operating system installer from the ISO image headers. For example, for Windows 8, libosinfo contains a section of metadata describing how to identify i386 ISOs and their language:

(HB1_CCPA_X86FRE|HRM_CCSA_X86FRE|HRM_CCSA_X86CHK|HRM_CCSNA_X86CHK|HRM_CCSNA_X86FRE|HRM_CENA_X86FREV|HRM_CENA_X86CHKV|HRM_CENNA_X86FREV|HRM_CENNA_X86CHKV|HRM_CPRA_X86FREV|HRM_CPRNA_X86FREV)_ MICROSOFT CORPORATION upper:][:digit:]_]*_([[:upper:*-upper:*)

Given the ISO 9960 primary volume descriptor (PVD) metadata, it is possible to automatically identify that an ISO image is the install disk for Windows 8, i686 architecture in US english.

The ISO PVD headers can be seen using output from the 'isoinfo -i' command eg

CD-ROM is in ISO 9660 format System id: Volume id: HRM_CCSNA_X86FRE_EN-US_DV5 Volume set id: HRM_CCSNA_X86FRE_EN-US_DV5 Publisher id: MICROSOFT CORPORATION Data preparer id: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080 Application id: CDIMAGE 2.53 (01/01/2005 TM) ...snip....

Glance integration
Glance already has the ability to associate arbitrary metadata with any image that is uploaded. Thus a first step is to define a standard set of metadata fields to hold ISO header fields. It is proposed that the following field names be standardized as mappings to corresponding fields in the ISO Primary Volume Descriptor specification:
 * iso-system-id == "PVD System Identifier"
 * iso-volume-id == "PVD Volume Identifier"
 * iso-volume-set-id == "PVD Volume Set Identifier"
 * iso-publisher-id == "PVD Publisher Identifier"
 * iso-application-id == "PVD Application Identifier"

Although it is entirely possible to clients to set this data as they upload images, it would be more desirable if glance could automatically populate the metadata fields itself at time of upload. This would ensure that the data is accurately reflecting the uploaded image.