diff --git a/virt-manager.changes b/virt-manager.changes index cfc050f4..b65ff7d9 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jan 20 11:20:21 MST 2023 - carnold@suse.com + +- bsc#1207070 - libvirt fails to start the guest once the new + shared disk is added, with the error, "cannot get 'write' + permission without 'resize' image size is not a multiple of + request alignment" + virtman-fix-shared-disk-request-alignment-error.patch + ------------------------------------------------------------------- Mon Nov 28 12:28:44 MST 2022 - carnold@suse.com diff --git a/virt-manager.spec b/virt-manager.spec index 7f1820f5..c1982268 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -100,6 +100,7 @@ Patch181: virtinst-add-slem-detection-support.patch Patch182: virtinst-add-sle-hpc-support.patch Patch183: virtinst-add-oracle-linux-support.patch Patch184: virtinst-windows-server-detection.patch +Patch185: virtman-fix-shared-disk-request-alignment-error.patch BuildArch: noarch diff --git a/virtman-fix-shared-disk-request-alignment-error.patch b/virtman-fix-shared-disk-request-alignment-error.patch new file mode 100644 index 00000000..a31d3b8b --- /dev/null +++ b/virtman-fix-shared-disk-request-alignment-error.patch @@ -0,0 +1,41 @@ +References: bsc#1207070 + +When creating a raw disk that is marked as 'shared', libvirt +will round the allocation amount higher to a 4k boundary. +This results in the qemu error shown below passed back to libvirt. +Note that only raw disks can be marked shared (not qcow2) +but the rounding should not harm qcow2 disks. + +libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2023-01-19T21:40:28.507063Z qemu-system-x86_64: +-device {"driver":"virtio-blk-pci","bus":"pci.8","addr":"0x0","share-rw":true,"drive":"libvirt-1-format","id":"virtio-disk1","write-cache":"on"}: +Cannot get 'write' permission without 'resize': Image size is not a multiple of request alignment + + +--- virt-manager-4.1.0/virtManager/createvol.py.orig 2023-01-20 10:58:40.230657960 -0700 ++++ virt-manager-4.1.0/virtManager/createvol.py 2023-01-20 11:03:54.722665454 -0700 +@@ -246,7 +246,13 @@ class vmmCreateVolume(vmmGObjectUI): + vol = self._make_stub_vol() + vol.name = volname + vol.capacity = (cap * 1024 * 1024 * 1024) ++ if vol.capacity: ++ # If a raw disk is marked 'shared', libvirt requires this ++ vol.capacity = 4096 * round(vol.capacity/4096) + vol.allocation = (alloc * 1024 * 1024 * 1024) ++ if vol.allocation: ++ vol.allocation = 4096 * round(vol.allocation/4096) ++ + if backing: + vol.backing_store = backing + if fmt: +--- virt-manager-4.1.0/virtinst/devices/disk.py.orig 2023-01-20 10:58:28.578657682 -0700 ++++ virt-manager-4.1.0/virtinst/devices/disk.py 2023-01-20 11:05:00.706667026 -0700 +@@ -361,6 +361,9 @@ class DeviceDisk(Device): + volname, poolobj.name()) + + cap = (size * 1024 * 1024 * 1024) ++ if cap: ++ # If a raw disk is marked 'shared', libvirt requires this ++ cap = 4096 * round(cap/4096) + if sparse: + alloc = 0 + else: