- bsc#955401 - Can't create VM without disk: "list index out of
range" virtinst-set-cache-mode-unsafe-for-install.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=281
This commit is contained in:
parent
abc39f49f9
commit
3a04fd715a
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 17 09:00:28 MST 2015 - carnold@suse.com
|
||||||
|
|
||||||
|
- bsc#955401 - Can't create VM without disk: "list index out of
|
||||||
|
range"
|
||||||
|
virtinst-set-cache-mode-unsafe-for-install.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 10 09:15:12 MST 2015 - carnold@suse.com
|
Tue Nov 10 09:15:12 MST 2015 - carnold@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package virt-manager
|
# spec file for package virt-manager
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
@ -12,7 +12,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
|
|||||||
|
|
||||||
|
|
||||||
class Guest(XMLBuilder):
|
class Guest(XMLBuilder):
|
||||||
@@ -671,6 +672,15 @@ class Guest(XMLBuilder):
|
@@ -674,6 +675,15 @@ class Guest(XMLBuilder):
|
||||||
return
|
return
|
||||||
self.add_device(VirtualGraphics(self.conn))
|
self.add_device(VirtualGraphics(self.conn))
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
|
|||||||
def add_default_devices(self):
|
def add_default_devices(self):
|
||||||
self.add_default_graphics()
|
self.add_default_graphics()
|
||||||
self.add_default_video_device()
|
self.add_default_video_device()
|
||||||
@@ -678,6 +688,7 @@ class Guest(XMLBuilder):
|
@@ -681,6 +691,7 @@ class Guest(XMLBuilder):
|
||||||
self.add_default_console_device()
|
self.add_default_console_device()
|
||||||
self.add_default_usb_controller()
|
self.add_default_usb_controller()
|
||||||
self.add_default_channels()
|
self.add_default_channels()
|
||||||
|
@ -16,7 +16,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
|
|||||||
self.x86_cpu_default = self.cpu.SPECIAL_MODE_HOST_MODEL_ONLY
|
self.x86_cpu_default = self.cpu.SPECIAL_MODE_HOST_MODEL_ONLY
|
||||||
|
|
||||||
self.__os_object = None
|
self.__os_object = None
|
||||||
@@ -620,11 +623,13 @@ class Guest(XMLBuilder):
|
@@ -623,11 +626,13 @@ class Guest(XMLBuilder):
|
||||||
self.conn.check_support(
|
self.conn.check_support(
|
||||||
self.conn.SUPPORT_CONN_VIRTIO_CONSOLE)):
|
self.conn.SUPPORT_CONN_VIRTIO_CONSOLE)):
|
||||||
dev.target_type = "virtio"
|
dev.target_type = "virtio"
|
||||||
@ -31,7 +31,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
|
|||||||
return
|
return
|
||||||
if self.get_devices("video"):
|
if self.get_devices("video"):
|
||||||
return
|
return
|
||||||
@@ -669,7 +674,7 @@ class Guest(XMLBuilder):
|
@@ -672,7 +677,7 @@ class Guest(XMLBuilder):
|
||||||
return
|
return
|
||||||
if self.os.is_container():
|
if self.os.is_container():
|
||||||
return
|
return
|
||||||
@ -40,7 +40,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
|
|||||||
return
|
return
|
||||||
self.add_device(VirtualGraphics(self.conn))
|
self.add_device(VirtualGraphics(self.conn))
|
||||||
|
|
||||||
@@ -997,7 +1002,7 @@ class Guest(XMLBuilder):
|
@@ -1000,7 +1005,7 @@ class Guest(XMLBuilder):
|
||||||
if self._hv_only_supports_virtio():
|
if self._hv_only_supports_virtio():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -12,28 +12,31 @@ Index: virt-manager-1.2.1/virtinst/guest.py
|
|||||||
|
|
||||||
|
|
||||||
class Guest(XMLBuilder):
|
class Guest(XMLBuilder):
|
||||||
@@ -354,6 +355,14 @@ class Guest(XMLBuilder):
|
@@ -354,6 +355,17 @@ class Guest(XMLBuilder):
|
||||||
|
|
||||||
self._set_osxml_defaults()
|
self._set_osxml_defaults()
|
||||||
|
|
||||||
+ # At install time set the target disk to 'unsafe' for
|
+ # At install time set the target disk to 'unsafe' for
|
||||||
+ # better performance if the target is not a block device
|
+ # better performance if the target is not a block device
|
||||||
|
+ saved_cache = "None"
|
||||||
+ if install:
|
+ if install:
|
||||||
+ target_disk = self.get_devices("disk")[0]
|
+ disk_devices = self.get_devices("disk")
|
||||||
+ saved_cache = target_disk.driver_cache
|
+ if disk_devices:
|
||||||
+ if target_disk.type != VirtualDisk.TYPE_BLOCK:
|
+ target_disk = self.get_devices("disk")[0]
|
||||||
+ target_disk.driver_cache = VirtualDisk.CACHE_MODE_UNSAFE
|
+ saved_cache = target_disk.driver_cache
|
||||||
|
+ if target_disk.type != VirtualDisk.TYPE_BLOCK:
|
||||||
|
+ target_disk.driver_cache = VirtualDisk.CACHE_MODE_UNSAFE
|
||||||
+
|
+
|
||||||
self.bootloader = None
|
self.bootloader = None
|
||||||
if (not install and
|
if (not install and
|
||||||
self.os.is_xenpv() and
|
self.os.is_xenpv() and
|
||||||
@@ -372,7 +381,10 @@ class Guest(XMLBuilder):
|
@@ -372,7 +384,10 @@ class Guest(XMLBuilder):
|
||||||
self.bootloader = "/usr/bin/pygrub"
|
self.bootloader = "/usr/bin/pygrub"
|
||||||
self.os.clear()
|
self.os.clear()
|
||||||
|
|
||||||
- return self.get_xml_config()
|
- return self.get_xml_config()
|
||||||
+ xml_config = self.get_xml_config()
|
+ xml_config = self.get_xml_config()
|
||||||
+ if install:
|
+ if install and saved_cache != "None":
|
||||||
+ target_disk.driver_cache = saved_cache
|
+ target_disk.driver_cache = saved_cache
|
||||||
+ return xml_config
|
+ return xml_config
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import urlgrabber.progress as progress
|
import urlgrabber.progress as progress
|
||||||
@@ -807,14 +808,29 @@ class Guest(XMLBuilder):
|
@@ -810,14 +811,29 @@ class Guest(XMLBuilder):
|
||||||
self.emulator = None
|
self.emulator = None
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user