[PATCH v2 0/2] Introduce hardware UUID (hwuuid) element

Mark Cave-Ayland posted 2 patches 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20250718084448.616898-1-mark.caveayland@nutanix.com
docs/formatdomain.rst                         |  7 +++
src/conf/domain_conf.c                        | 43 ++++++++++++++++---
src/conf/domain_conf.h                        |  1 +
src/conf/schemas/domaincommon.rng             |  5 +++
src/qemu/qemu_command.c                       |  6 ++-
...hwuuid-smbios-uuid-match.x86_64-latest.err |  1 +
.../hwuuid-smbios-uuid-match.xml              | 36 ++++++++++++++++
.../qemuxmlconfdata/hwuuid.x86_64-latest.args | 35 +++++++++++++++
.../qemuxmlconfdata/hwuuid.x86_64-latest.xml  | 41 ++++++++++++++++++
tests/qemuxmlconfdata/hwuuid.xml              | 30 +++++++++++++
tests/qemuxmlconftest.c                       |  3 ++
11 files changed, 202 insertions(+), 6 deletions(-)
create mode 100644 tests/qemuxmlconfdata/hwuuid-smbios-uuid-match.x86_64-latest.err
create mode 100644 tests/qemuxmlconfdata/hwuuid-smbios-uuid-match.xml
create mode 100644 tests/qemuxmlconfdata/hwuuid.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/hwuuid.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/hwuuid.xml
[PATCH v2 0/2] Introduce hardware UUID (hwuuid) element
Posted by Mark Cave-Ayland 1 month, 3 weeks ago
Following on from the discussions at [1] and more recently [2], this series
introduces a new hardware UUID (hwuuid) element that allows an external
UUID to be provided to the guest, as opposed to the libvirt domain UUID.

The use case for this feature is to allow a domain to cloned and then
restarted without changing its guest-visible UUID e.g. via dmidecode.

Patch 1 introduces the new hardware UUID (hwuuid) element along with an
implementation for the QEMU driver, whilst patch 2 adds additional tests
to ensure the hwuuid functionality is working as expected.

Note that from reading the source it doesn't appear as if all virtualisation
platforms will support this feature: I've included the relevant changes for
the QEMU driver since that is what we use here at Nutanix.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>

[1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/YXN2L2PYL4V4576ON5OKQKCV7RCWPSCT/

[2] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/HGFTR7CTW7NO2FBOGI7A2D5V3BUVO4SM/


v2:
- Rebase onto master
- Rework if() logic in virSysinfoSystemParseXML() in patch 1 as suggested by Daniel
- Add R-B tag from Daniel to patch 2


Mark Cave-Ayland (2):
  conf: introduce hardware UUID (hwuuid) element
  qemuxmlconftest: add tests for new hardware UUID (hwuuid) element

 docs/formatdomain.rst                         |  7 +++
 src/conf/domain_conf.c                        | 43 ++++++++++++++++---
 src/conf/domain_conf.h                        |  1 +
 src/conf/schemas/domaincommon.rng             |  5 +++
 src/qemu/qemu_command.c                       |  6 ++-
 ...hwuuid-smbios-uuid-match.x86_64-latest.err |  1 +
 .../hwuuid-smbios-uuid-match.xml              | 36 ++++++++++++++++
 .../qemuxmlconfdata/hwuuid.x86_64-latest.args | 35 +++++++++++++++
 .../qemuxmlconfdata/hwuuid.x86_64-latest.xml  | 41 ++++++++++++++++++
 tests/qemuxmlconfdata/hwuuid.xml              | 30 +++++++++++++
 tests/qemuxmlconftest.c                       |  3 ++
 11 files changed, 202 insertions(+), 6 deletions(-)
 create mode 100644 tests/qemuxmlconfdata/hwuuid-smbios-uuid-match.x86_64-latest.err
 create mode 100644 tests/qemuxmlconfdata/hwuuid-smbios-uuid-match.xml
 create mode 100644 tests/qemuxmlconfdata/hwuuid.x86_64-latest.args
 create mode 100644 tests/qemuxmlconfdata/hwuuid.x86_64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/hwuuid.xml

-- 
2.43.0
Re: [PATCH v2 0/2] Introduce hardware UUID (hwuuid) element
Posted by Mark Cave-Ayland 1 month, 1 week ago
On 18/07/2025 09:44, Mark Cave-Ayland wrote:

> Following on from the discussions at [1] and more recently [2], this series
> introduces a new hardware UUID (hwuuid) element that allows an external
> UUID to be provided to the guest, as opposed to the libvirt domain UUID.
> 
> The use case for this feature is to allow a domain to cloned and then
> restarted without changing its guest-visible UUID e.g. via dmidecode.
> 
> Patch 1 introduces the new hardware UUID (hwuuid) element along with an
> implementation for the QEMU driver, whilst patch 2 adds additional tests
> to ensure the hwuuid functionality is working as expected.
> 
> Note that from reading the source it doesn't appear as if all virtualisation
> platforms will support this feature: I've included the relevant changes for
> the QEMU driver since that is what we use here at Nutanix.
> 
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>

Ping? Any further comments? I could post a v3 with the documentation 
updated to reference 11.7.0 if that helps?

> v2:
> - Rebase onto master
> - Rework if() logic in virSysinfoSystemParseXML() in patch 1 as suggested by Daniel
> - Add R-B tag from Daniel to patch 2
> 
> 
> Mark Cave-Ayland (2):
>    conf: introduce hardware UUID (hwuuid) element
>    qemuxmlconftest: add tests for new hardware UUID (hwuuid) element
> 
>   docs/formatdomain.rst                         |  7 +++
>   src/conf/domain_conf.c                        | 43 ++++++++++++++++---
>   src/conf/domain_conf.h                        |  1 +
>   src/conf/schemas/domaincommon.rng             |  5 +++
>   src/qemu/qemu_command.c                       |  6 ++-
>   ...hwuuid-smbios-uuid-match.x86_64-latest.err |  1 +
>   .../hwuuid-smbios-uuid-match.xml              | 36 ++++++++++++++++
>   .../qemuxmlconfdata/hwuuid.x86_64-latest.args | 35 +++++++++++++++
>   .../qemuxmlconfdata/hwuuid.x86_64-latest.xml  | 41 ++++++++++++++++++
>   tests/qemuxmlconfdata/hwuuid.xml              | 30 +++++++++++++
>   tests/qemuxmlconftest.c                       |  3 ++
>   11 files changed, 202 insertions(+), 6 deletions(-)
>   create mode 100644 tests/qemuxmlconfdata/hwuuid-smbios-uuid-match.x86_64-latest.err
>   create mode 100644 tests/qemuxmlconfdata/hwuuid-smbios-uuid-match.xml
>   create mode 100644 tests/qemuxmlconfdata/hwuuid.x86_64-latest.args
>   create mode 100644 tests/qemuxmlconfdata/hwuuid.x86_64-latest.xml
>   create mode 100644 tests/qemuxmlconfdata/hwuuid.xml


ATB,

Mark.
Re: [PATCH v2 0/2] Introduce hardware UUID (hwuuid) element
Posted by Daniel P. Berrangé via Devel 1 month, 1 week ago
On Fri, Aug 01, 2025 at 10:19:11AM +0100, Mark Cave-Ayland wrote:
> On 18/07/2025 09:44, Mark Cave-Ayland wrote:
> 
> > Following on from the discussions at [1] and more recently [2], this series
> > introduces a new hardware UUID (hwuuid) element that allows an external
> > UUID to be provided to the guest, as opposed to the libvirt domain UUID.
> > 
> > The use case for this feature is to allow a domain to cloned and then
> > restarted without changing its guest-visible UUID e.g. via dmidecode.
> > 
> > Patch 1 introduces the new hardware UUID (hwuuid) element along with an
> > implementation for the QEMU driver, whilst patch 2 adds additional tests
> > to ensure the hwuuid functionality is working as expected.
> > 
> > Note that from reading the source it doesn't appear as if all virtualisation
> > platforms will support this feature: I've included the relevant changes for
> > the QEMU driver since that is what we use here at Nutanix.
> > 
> > Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
> 
> Ping? Any further comments? I could post a v3 with the documentation updated
> to reference 11.7.0 if that helps?

This is now pushed.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Re: [PATCH v2 0/2] Introduce hardware UUID (hwuuid) element
Posted by Mark Cave-Ayland 1 month ago
On 01/08/2025 18:30, Daniel P. Berrangé wrote:

> On Fri, Aug 01, 2025 at 10:19:11AM +0100, Mark Cave-Ayland wrote:
>> On 18/07/2025 09:44, Mark Cave-Ayland wrote:
>>
>>> Following on from the discussions at [1] and more recently [2], this series
>>> introduces a new hardware UUID (hwuuid) element that allows an external
>>> UUID to be provided to the guest, as opposed to the libvirt domain UUID.
>>>
>>> The use case for this feature is to allow a domain to cloned and then
>>> restarted without changing its guest-visible UUID e.g. via dmidecode.
>>>
>>> Patch 1 introduces the new hardware UUID (hwuuid) element along with an
>>> implementation for the QEMU driver, whilst patch 2 adds additional tests
>>> to ensure the hwuuid functionality is working as expected.
>>>
>>> Note that from reading the source it doesn't appear as if all virtualisation
>>> platforms will support this feature: I've included the relevant changes for
>>> the QEMU driver since that is what we use here at Nutanix.
>>>
>>> Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
>>
>> Ping? Any further comments? I could post a v3 with the documentation updated
>> to reference 11.7.0 if that helps?
> 
> This is now pushed.
> 
> With regards,
> Daniel

Thanks Daniel!


ATB,

Mark.