From: Zhuang Yanying <ann.zhuangyanying(a)huawei.com>
Some applications inside VM need to access SMBIOS Chassis Asset Tag,
which should be emulated.
access inside VM (for example)
Linux: /sys/class/dmi/id/chassis_asset_tag.
Windows: (Get-WmiObject Win32_SystemEnclosure).SMBIOSAssetTag
wirhin Windows PowerShell.
It has already been realized in qemu:
SMBIOS: Build aggregate smbios tables and entry point
https://git.qemu.org/?p=qemu.git;a=commit;h=c97294ec1b9e36887e119589d4565...
but not in libvirt. we realize it here.
As an example, you could use something like
<chassis>
<entry name='manufacturer'>Huawei</entry>
<entry name='version'>To be filled by O.E.M.</entry>
<entry name='serial'>To be filled by O.E.M.</entry>
<entry name='asset'>To be filled by O.E.M.</entry>
<entry name='sku'>Type3Sku1</entry>
</chassis>
BTW: I'll be on vacation for china spring festival for the next week, I'll
response as soon as I get back if there's any modification needed.
Zhuang Yanying (3):
conf: add support for setting Chassis SMBIOS data fields
qemu: add support for generating SMBIOS Chassis strings command line
news: add support for setting Chassis SMBIOS data fields
docs/formatdomain.html.in | 23 +++++++
docs/news.xml | 5 ++
docs/schemas/domaincommon.rng | 22 ++++++
src/conf/domain_conf.c | 55 +++++++++++++++
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 51 ++++++++++++++
src/util/virsysinfo.c | 133 +++++++++++++++++++++++++++++++++++-
src/util/virsysinfo.h | 13 ++++
tests/qemuxml2argvdata/smbios.args | 2 +
tests/qemuxml2argvdata/smbios.xml | 7 ++
tests/qemuxml2xmloutdata/smbios.xml | 7 ++
11 files changed, 318 insertions(+), 1 deletion(-)
--
1.8.3.1