1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00

fix(instances): a VM with an SMBIOS UUID can be cloned

The clone took a new UUID but kept the VM's in its SMBIOS system
information, and libvirt refused the definition (UUID mismatch between
<uuid> and <sysinfo>). The SMBIOS entry takes the clone's UUID.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kk4h2TcUiaWmU5MUszYSea
This commit is contained in:
catborise 2026-11-07 23:45:50 +03:00
parent 3fd9148b67
commit b4e5567e4a
2 changed files with 9 additions and 0 deletions

View file

@ -2374,6 +2374,9 @@ class wvmInstance(wvmConnect):
if uuid_el is None:
uuid_el = etree.SubElement(tree, "uuid")
uuid_el.text = uuid
# libvirt refuses an SMBIOS UUID other than the domain's
for entry in tree.xpath("sysinfo/system/entry[@name='uuid']"):
entry.text = uuid
self._set_options(
tree,
{