f88a913443
* Slim down filesystem device editor UI * Fix TOCTTOU virt-install bugs (Martin Pitt) * Several other bug fixes virt-manager-3.2.0.tar.bz2 - Drop patches contained in new tarball 1a1e4580-cloner-Explicitly-reject-network-disks-we-dont-know-how-to-clone.patch 2773bc35-storagepool-cleanup-volumes-on-pool-cleanup.patch b1328202-devices-disk-Skip-check_path_search-for-path.patch virtman-append-usr-sbin-to-search-path.patch - Upstream bug fixes (bsc#1027942) 1a1e4580-cloner-Explicitly-reject-network-disks-we-dont-know-how-to-clone.patch 2773bc35-storagepool-cleanup-volumes-on-pool-cleanup.patch b1328202-devices-disk-Skip-check_path_search-for-path.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=525
30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
Set cache mode for target installation disk to unsafe for better
|
|
performance.
|
|
Index: virt-manager-3.2.0/virtinst/install/installer.py
|
|
===================================================================
|
|
--- virt-manager-3.2.0.orig/virtinst/install/installer.py
|
|
+++ virt-manager-3.2.0/virtinst/install/installer.py
|
|
@@ -580,11 +580,22 @@ class Installer(object):
|
|
guest.memory) = data
|
|
|
|
def _get_install_xml(self, guest, meter):
|
|
+ # At install time set the target disk to 'unsafe' for
|
|
+ # better performance if the target is not a block device
|
|
+ saved_cache = "None"
|
|
+ if guest.devices.disk:
|
|
+ target_disk = guest.devices.disk[0]
|
|
+ saved_cache = target_disk.driver_cache
|
|
+ if target_disk.type != DeviceDisk.TYPE_BLOCK and target_disk.driver_io != "native":
|
|
+ target_disk.driver_cache = DeviceDisk.CACHE_MODE_UNSAFE
|
|
+
|
|
data = self._prepare_get_install_xml(guest)
|
|
try:
|
|
self._alter_bootconfig(guest)
|
|
self._alter_install_resources(guest, meter)
|
|
ret = guest.get_xml()
|
|
+ if saved_cache != "None":
|
|
+ target_disk.driver_cache = saved_cache
|
|
return ret
|
|
finally:
|
|
self._remove_install_cdrom_media(guest)
|