Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.4:ARM
virt-manager
virtinst-set-cache-mode-unsafe-for-install.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File virtinst-set-cache-mode-unsafe-for-install.patch of Package virt-manager
Set cache mode for target installation disk to unsafe for better performance. Index: virt-manager-3.3.0/virtinst/install/installer.py =================================================================== --- virt-manager-3.3.0.orig/virtinst/install/installer.py +++ virt-manager-3.3.0/virtinst/install/installer.py @@ -567,16 +567,29 @@ class Installer(object): def _build_postboot_xml(self, final_xml, meter): initial_guest = Guest(self.conn, parsexml=final_xml) + # At install time set the target disk to 'unsafe' for + # better performance if the target is not a block device + saved_cache = "None" + if initial_guest.devices.disk: + target_disk = initial_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 + self._alter_bootconfig(initial_guest) self._alter_install_resources(initial_guest, meter) if self.has_cloudinit(): initial_guest.set_smbios_serial_cloudinit() + install_xml = initial_guest.get_xml() + if saved_cache != "None": + target_disk.driver_cache = saved_cache + final_guest = Guest(self.conn, parsexml=final_xml) self._remove_install_cdrom_media(final_guest) self._remove_unattended_install_cdrom_device(final_guest) - return initial_guest.get_xml(), final_guest.get_xml() + return install_xml, final_guest.get_xml() def _build_xml(self, guest, meter): initial_xml = None
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor