[virt-tools-list] [virt-manager PATCH 2/2] addhardware: Add support for disk detect zeroes option
Lin Ma
lma at suse.com
Wed Sep 5 08:15:08 UTC 2018
Complete this part of feature for commit e6c7e46a
Signed-off-by: Lin Ma <lma at suse.com>
---
virtManager/addhardware.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
index 87b0d918..556524d2 100644
--- a/virtManager/addhardware.py
+++ b/virtManager/addhardware.py
@@ -1275,6 +1275,8 @@ class vmmAddHardware(vmmGObjectUI):
self.widget("storage-cache"))
discard = uiutil.get_list_selection(
self.widget("storage-discard"))
+ detect_zeroes = uiutil.get_list_selection(
+ self.widget("storage-detect-zeroes"))
controller_model = None
if (bus == "scsi" and
@@ -1303,6 +1305,9 @@ class vmmAddHardware(vmmGObjectUI):
if discard:
disk.driver_discard = discard
+ if detect_zeroes:
+ disk.driver_detect_zeroes = detect_zeroes
+
# Generate target
disks = (self.vm.xmlobj.devices.disk +
self.vm.get_xmlobj(inactive=True).devices.disk)
--
2.15.1
More information about the virt-tools-list
mailing list