mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Expose a host UUID in the capabilities XML
Allow for a host UUID in the capabilities XML. Local drivers will initialize this from the SMBIOS data. If a sanity check shows SMBIOS uuid is invalid, allow an override from the libvirtd.conf configuration file * daemon/libvirtd.c, daemon/libvirtd.conf: Support a host_uuid configuration option * docs/schemas/capability.rng: Add optional host uuid field * src/conf/capabilities.c, src/conf/capabilities.h: Include host UUID in XML * src/libvirt_private.syms: Export new uuid.h functions * src/lxc/lxc_conf.c, src/qemu/qemu_driver.c, src/uml/uml_conf.c: Set host UUID in capabilities * src/util/uuid.c, src/util/uuid.h: Support for host UUIDs * src/node_device/node_device_udev.c: Use the host UUID functions * tests/confdata/libvirtd.conf, tests/confdata/libvirtd.out: Add new host_uuid config option to test
This commit is contained in:
@@ -18,6 +18,11 @@
|
||||
|
||||
<define name='hostcaps'>
|
||||
<element name='host'>
|
||||
<optional>
|
||||
<element name='uuid'>
|
||||
<ref name='UUID'/>
|
||||
</element>
|
||||
</optional>
|
||||
<element name='cpu'>
|
||||
<element name='arch'>
|
||||
<ref name='archnames'/>
|
||||
@@ -349,4 +354,15 @@
|
||||
<param name='pattern'>[a-zA-Z0-9\-_]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
<define name="UUID">
|
||||
<choice>
|
||||
<data type="string">
|
||||
<param name="pattern">[a-fA-F0-9]{32}</param>
|
||||
</data>
|
||||
<data type="string">
|
||||
<param name="pattern">[a-fA-F0-9]{8}\-([a-fA-F0-9]{4}\-){3}[a-fA-F0-9]{12}</param>
|
||||
</data>
|
||||
</choice>
|
||||
</define>
|
||||
</grammar>
|
||||
|
||||
Reference in New Issue
Block a user