Make sure we round up for the disk.
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=589
This commit is contained in:
parent
36aa37cc98
commit
0aabe59115
@ -11,31 +11,35 @@ libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2023
|
|||||||
Cannot get 'write' permission without 'resize': Image size is not a multiple of request alignment
|
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
|
Index: virt-manager-4.1.0/virtManager/createvol.py
|
||||||
+++ virt-manager-4.1.0/virtManager/createvol.py 2023-01-20 11:03:54.722665454 -0700
|
===================================================================
|
||||||
|
--- virt-manager-4.1.0.orig/virtManager/createvol.py
|
||||||
|
+++ virt-manager-4.1.0/virtManager/createvol.py
|
||||||
@@ -246,7 +246,13 @@ class vmmCreateVolume(vmmGObjectUI):
|
@@ -246,7 +246,13 @@ class vmmCreateVolume(vmmGObjectUI):
|
||||||
vol = self._make_stub_vol()
|
vol = self._make_stub_vol()
|
||||||
vol.name = volname
|
vol.name = volname
|
||||||
vol.capacity = (cap * 1024 * 1024 * 1024)
|
vol.capacity = (cap * 1024 * 1024 * 1024)
|
||||||
+ if vol.capacity:
|
+ if vol.capacity:
|
||||||
+ # If a raw disk is marked 'shared', libvirt requires this
|
+ # If a raw disk is marked 'shared', round up for libvirt
|
||||||
+ vol.capacity = 4096 * round(vol.capacity/4096)
|
+ vol.capacity -= vol.capacity % -4096
|
||||||
vol.allocation = (alloc * 1024 * 1024 * 1024)
|
vol.allocation = (alloc * 1024 * 1024 * 1024)
|
||||||
+ if vol.allocation:
|
+ if vol.allocation:
|
||||||
+ vol.allocation = 4096 * round(vol.allocation/4096)
|
+ vol.allocation -= vol.allocation % -4096
|
||||||
+
|
+
|
||||||
if backing:
|
if backing:
|
||||||
vol.backing_store = backing
|
vol.backing_store = backing
|
||||||
if fmt:
|
if fmt:
|
||||||
--- virt-manager-4.1.0/virtinst/devices/disk.py.orig 2023-01-20 10:58:28.578657682 -0700
|
Index: virt-manager-4.1.0/virtinst/devices/disk.py
|
||||||
+++ virt-manager-4.1.0/virtinst/devices/disk.py 2023-01-20 11:05:00.706667026 -0700
|
===================================================================
|
||||||
|
--- virt-manager-4.1.0.orig/virtinst/devices/disk.py
|
||||||
|
+++ virt-manager-4.1.0/virtinst/devices/disk.py
|
||||||
@@ -361,6 +361,9 @@ class DeviceDisk(Device):
|
@@ -361,6 +361,9 @@ class DeviceDisk(Device):
|
||||||
volname, poolobj.name())
|
volname, poolobj.name())
|
||||||
|
|
||||||
cap = (size * 1024 * 1024 * 1024)
|
cap = (size * 1024 * 1024 * 1024)
|
||||||
+ if cap:
|
+ if cap:
|
||||||
+ # If a raw disk is marked 'shared', libvirt requires this
|
+ # If a raw disk is marked 'shared', round up for libvirt
|
||||||
+ cap = 4096 * round(cap/4096)
|
+ cap -= cap % -4096
|
||||||
if sparse:
|
if sparse:
|
||||||
alloc = 0
|
alloc = 0
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user