From 9f8da1f666177694dcffaac6728988b18e27274c Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Fri, 1 Sep 2023 21:39:37 +0200 Subject: [PATCH] virt-clone: Copy disk permissions as well 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 --- virtinst/storage.py | 1 + 1 file changed, 1 insertion(+) diff --git a/virtinst/storage.py b/virtinst/storage.py index f9a9f7a78..fd8a74814 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()