conf: Add support for setting Chassis SMBIOS data fields

This type of information defines attributes of a system
chassis, such as SMBIOS Chassis Asset Tag.

access inside VM (for example)
Linux:   /sys/class/dmi/id/chassis_asset_tag.
Windows: (Get-WmiObject Win32_SystemEnclosure).SMBIOSAssetTag
          wirhin Windows PowerShell.

As an example, add the following to the guest XML

    <chassis>
      <entry name='manufacturer'>Dell Inc.</entry>
      <entry name='version'>2.12</entry>
      <entry name='serial'>65X0XF2</entry>
      <entry name='asset'>40000101</entry>
      <entry name='sku'>Type3Sku1</entry>
    </chassis>

Signed-off-by: Zhuang Yanying <ann.zhuangyanying@huawei.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Zhuang Yanying
2018-02-14 17:22:38 +08:00
committed by John Ferlan
parent 9148293018
commit c8fec25692
8 changed files with 269 additions and 1 deletions

View File

@@ -411,6 +411,13 @@
&lt;entry name='version'&gt;0B98401 Pro&lt;/entry&gt;
&lt;entry name='serial'&gt;W1KS427111E&lt;/entry&gt;
&lt;/baseBoard&gt;
&lt;chassis&gt;
&lt;entry name='manufacturer'&gt;Dell Inc.&lt;/entry&gt;
&lt;entry name='version'&gt;2.12&lt;/entry&gt;
&lt;entry name='serial'&gt;65X0XF2&lt;/entry&gt;
&lt;entry name='asset'&gt;40000101&lt;/entry&gt;
&lt;entry name='sku'&gt;Type3Sku1&lt;/entry&gt;
&lt;/chassis&gt;
&lt;oemStrings&gt;
&lt;entry&gt;myappname:some arbitrary data&lt;/entry&gt;
&lt;entry&gt;otherappname:more arbitrary data&lt;/entry&gt;
@@ -502,6 +509,23 @@
validation and <code>date</code> format checking, all values are
passed as strings to the hypervisor driver.
</dd>
<dt><code>chassis</code></dt>
<dd>
<span class="since">Since 4.1.0,</span> this is block 3 of
SMBIOS, with entry names drawn from:
<dl>
<dt><code>manufacturer</code></dt>
<dd>Manufacturer of Chassis</dd>
<dt><code>version</code></dt>
<dd>Version of the Chassis</dd>
<dt><code>serial</code></dt>
<dd>Serial number</dd>
<dt><code>asset</code></dt>
<dd>Asset tag</dd>
<dt><code>sku</code></dt>
<dd>SKU number</dd>
</dl>
</dd>
<dt><code>oemStrings</code></dt>
<dd>
This is block 11 of SMBIOS. This element should appear once and