virt-manager/virtinst-set-cache-mode-unsafe-for-install.patch
Charles Arnold 8d6890f068 - Update to virt-manager 2.1.0 (fate#326786)
virt-manager-2.1.0.tar.bz2
  virtman-fix-env-script-interpreter.patch
  * Bash autocompletion support (Lin Ma, Cole Robinson)
  * UI and command line –vsock support (Slavomir Kaslev)
  * virt-xml: Add –os-variant option (Andrea Bolognani)
  * virt-install: use libosinfo cpu, mem, disk size defaults (Fabiano Fidencio)
  * virt-install: Better usage of libosinfo -unknown distro IDs (Fabiano Fidencio)
  * virt-install: More usage of libosinfo for ISO –location detection
  * virt-install: Add –location LOCATION,kernel=X,initrd=Y for pointing to kernel/initrd in media that virt-install/libosinfo fails to detect
- Drop
  25b88733-urldetect-Dont-overload-suse_content-variable.patch
  9308bae3-util-Fix-typo-vpcu-vcpu.patch
  b8aff280-virtinst-quickfix-ubuntu-net-preseed-insert-cdrom-error.patch
  c30b3bc6-increase-timeout-for-vm-to-start.patch
  virtinst-use-latest-opensuse-version-when-unknown-media.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=456
2019-02-04 18:46:20 +00:00

29 lines
1.2 KiB
Diff

Set cache mode for target installation disk to unsafe for better
performance.
Index: virt-manager-2.1.0/virtinst/installer.py
===================================================================
--- virt-manager-2.1.0.orig/virtinst/installer.py
+++ virt-manager-2.1.0/virtinst/installer.py
@@ -290,10 +290,21 @@ class Installer(object):
guest.os.kernel_args, guest.on_reboot) = data
def _get_install_xml(self, guest):
+ # 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:
+ target_disk.driver_cache = DeviceDisk.CACHE_MODE_UNSAFE
+
data = self._prepare_get_install_xml(guest)
try:
self._alter_bootconfig(guest)
ret = guest.get_xml()
+ if saved_cache != "None":
+ target_disk.driver_cache = saved_cache
return ret
finally:
self._remove_install_cdrom_media(guest)