28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
Subject: virt-clone: Copy disk permissions as well
|
|
From: Martin Kletzander mkletzan@redhat.com Fri Sep 1 21:39:37 2023 +0200
|
|
Date: Sun Sep 10 11:19:31 2023 -0400:
|
|
Git: 9f8da1f666177694dcffaac6728988b18e27274c
|
|
|
|
When cloning using libvirt APIs the function virStorageVolCreateXMLFrom
|
|
is used. However name and permissions are taken from the new XML [1].
|
|
By copying the permissions (only the mode is used) we can avoid some
|
|
unexpected issues.
|
|
|
|
[1] https://libvirt.org/html/libvirt-libvirt-storage.html#virStorageVolCreateXMLFrom
|
|
|
|
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2115153
|
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
|
diff --git a/virtinst/storage.py b/virtinst/storage.py
|
|
index f9a9f7a7..fd8a7481 100644
|
|
--- a/virtinst/storage.py
|
|
+++ b/virtinst/storage.py
|
|
@@ -528,6 +528,7 @@ class StorageVolume(_StorageObject):
|
|
self.format = parsevol.format
|
|
self.capacity = parsevol.capacity
|
|
self.allocation = parsevol.allocation
|
|
+ self.permissions.mode = parsevol.permissions.mode
|
|
if not self._pool:
|
|
self.pool = self._input_vol.storagePoolLookupByVolume()
|
|
|