11a887ec-cli-disk-Add-driver.metadata_cache-options.patch 7295ebfb-tests-cli-Fix-test-output-after-previous-commit.patch 58f5e36d-fsdetails-Fix-an-error-with-source.socket-of-virtiofs.patch c22a876e-tests-Add-a-compat-check-for-linux2020-in-amd-sev-test-case.patch fbdf0516-cli-cpu-Add-maxphysaddr.mode-bits-options.patch b0d05167-cloner-Sync-uuid-and-sysinfo-system-uuid.patch 999ccb85-virt-install-unattended-and-cloud-init-conflict.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=579
86 lines
3.0 KiB
Diff
86 lines
3.0 KiB
Diff
Subject: cloner: Sync <uuid> and <sysinfo> system uuid
|
|
From: Cole Robinson crobinso@redhat.com Sun Aug 21 16:21:10 2022 -0400
|
|
Date: Sun Aug 21 16:21:10 2022 -0400:
|
|
Git: b0d0516736320315a70f74aff3759fb35dd35d9d
|
|
|
|
Otherwise libvirt errors like:
|
|
|
|
ERROR UUID mismatch between <uuid> and <sysinfo>
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=2038040
|
|
|
|
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
diff --git a/tests/data/cli/compare/virt-clone-auto-unmanaged.xml b/tests/data/cli/compare/virt-clone-auto-unmanaged.xml
|
|
index 21a9a639..f2043be2 100644
|
|
--- a/tests/data/cli/compare/virt-clone-auto-unmanaged.xml
|
|
+++ b/tests/data/cli/compare/virt-clone-auto-unmanaged.xml
|
|
@@ -1,6 +1,11 @@
|
|
<domain type="test">
|
|
<name>origtest-clone</name>
|
|
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
|
+ <sysinfo type="smbios">
|
|
+ <system>
|
|
+ <entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
|
|
+ </system>
|
|
+ </sysinfo>
|
|
<memory>8388608</memory>
|
|
<currentMemory>2097152</currentMemory>
|
|
<vcpu>2</vcpu>
|
|
diff --git a/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml b/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml
|
|
index 3bdbbbe3..c003ed3e 100644
|
|
--- a/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml
|
|
+++ b/tests/data/cli/compare/virt-clone-unmanaged-preserve.xml
|
|
@@ -1,6 +1,11 @@
|
|
<domain type="test">
|
|
<name>clonetest</name>
|
|
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
|
+ <sysinfo type="smbios">
|
|
+ <system>
|
|
+ <entry name="uuid">00000000-1111-2222-3333-444444444444</entry>
|
|
+ </system>
|
|
+ </sysinfo>
|
|
<memory>8388608</memory>
|
|
<currentMemory>2097152</currentMemory>
|
|
<vcpu>2</vcpu>
|
|
diff --git a/tests/data/cli/virtclone/clone-disk.xml b/tests/data/cli/virtclone/clone-disk.xml
|
|
index da1eb0a6..2f6e916d 100644
|
|
--- a/tests/data/cli/virtclone/clone-disk.xml
|
|
+++ b/tests/data/cli/virtclone/clone-disk.xml
|
|
@@ -1,6 +1,11 @@
|
|
<domain type='test' id='1'>
|
|
<name>origtest</name>
|
|
<uuid>db69fa1f-eef0-e567-3c20-3ef16f10376b</uuid>
|
|
+ <sysinfo type='smbios'>
|
|
+ <system>
|
|
+ <entry name='uuid'>db69fa1f-eef0-e567-3c20-3ef16f10376b</entry>
|
|
+ </system>
|
|
+ </sysinfo>
|
|
<memory>8388608</memory>
|
|
<currentMemory>2097152</currentMemory>
|
|
<vcpu>2</vcpu>
|
|
diff --git a/virtinst/cloner.py b/virtinst/cloner.py
|
|
index 34a702f9..9334513c 100644
|
|
--- a/virtinst/cloner.py
|
|
+++ b/virtinst/cloner.py
|
|
@@ -352,8 +352,7 @@ class Cloner(object):
|
|
"""
|
|
self._new_guest.id = None
|
|
self._new_guest.title = None
|
|
- self._new_guest.uuid = None
|
|
- self._new_guest.uuid = Guest.generate_uuid(self.conn)
|
|
+ self.set_clone_uuid(Guest.generate_uuid(self.conn))
|
|
|
|
for dev in self._new_guest.devices.graphics:
|
|
if dev.port and dev.port != -1:
|
|
@@ -408,6 +407,9 @@ class Cloner(object):
|
|
Override the new VMs generated UUId
|
|
"""
|
|
self._new_guest.uuid = uuid
|
|
+ for sysinfo in self._new_guest.sysinfo:
|
|
+ if sysinfo.system_uuid:
|
|
+ sysinfo.system_uuid = uuid
|
|
|
|
def set_replace(self, val):
|
|
"""
|