Accepting request 228964 from Virtualization
Bug fixes for os13.2 OBS-URL: https://build.opensuse.org/request/show/228964 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virt-manager?expand=0&rev=96
This commit is contained in:
commit
9cc1b42a68
31
53375bad-raise-value-error-when-no-ipaddr-set.patch
Normal file
31
53375bad-raise-value-error-when-no-ipaddr-set.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
Subject: createinterface: raise value error when no ip addr set
|
||||||
|
From: Chen Hanxiao chenhanxiao@cn.fujitsu.com Sun Mar 30 07:47:22 2014 +0800
|
||||||
|
Date: Sun Mar 30 07:47:57 2014 +0800:
|
||||||
|
Git: 119025e1ef5e6b47d634c1e05d9143f0092da5c2
|
||||||
|
|
||||||
|
We could set blank ip address
|
||||||
|
|
||||||
|
IP setting->Configure->Mode (static), then press "OK".
|
||||||
|
|
||||||
|
And libvirt will throw an error not very helpful:
|
||||||
|
Error creating interface: 'Could not define interface:
|
||||||
|
XML error: could not get interface XML description:
|
||||||
|
XML invalid - Element protocol failed to validate attributes.
|
||||||
|
|
||||||
|
This patch will forbid setting an empty ip address.
|
||||||
|
|
||||||
|
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
|
||||||
|
|
||||||
|
diff --git a/virtManager/createinterface.py b/virtManager/createinterface.py
|
||||||
|
index 11fc9b2..4588bba 100644
|
||||||
|
--- a/virtManager/createinterface.py
|
||||||
|
+++ b/virtManager/createinterface.py
|
||||||
|
@@ -764,7 +764,7 @@ class vmmCreateInterface(vmmGObjectUI):
|
||||||
|
def build_ip_info(self):
|
||||||
|
def build_ip(addr_str):
|
||||||
|
if not addr_str:
|
||||||
|
- return None, None
|
||||||
|
+ raise ValueError(_("Please enter an IP address"))
|
||||||
|
ret = addr_str.rsplit("/", 1)
|
||||||
|
address = ret[0]
|
||||||
|
prefix = None
|
31
53388de2-show-port-number-for-active-autoport-VM.patch
Normal file
31
53388de2-show-port-number-for-active-autoport-VM.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
Subject: gfxdetails: Show port number for active autoport VM (bz 1081614)
|
||||||
|
From: Cole Robinson crobinso@redhat.com Sun Mar 30 17:34:26 2014 -0400
|
||||||
|
Date: Sun Mar 30 17:34:26 2014 -0400:
|
||||||
|
Git: 7f802e287c21a6395a0e9f5435c1eab78b2ce6b5
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/virtManager/gfxdetails.py b/virtManager/gfxdetails.py
|
||||||
|
index 0141f7e..d6865a8 100644
|
||||||
|
--- a/virtManager/gfxdetails.py
|
||||||
|
+++ b/virtManager/gfxdetails.py
|
||||||
|
@@ -154,15 +154,20 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
||||||
|
auto = self.widget(basename + "-auto")
|
||||||
|
widget = self.widget(basename)
|
||||||
|
auto.set_inconsistent(False)
|
||||||
|
+ label = auto.get_label().split(" (")[0]
|
||||||
|
|
||||||
|
if val == -1 or gfx.autoport:
|
||||||
|
auto.set_active(True)
|
||||||
|
+ if val and val != -1:
|
||||||
|
+ label += " (%s %s)" % (_("Port"), val)
|
||||||
|
elif val is None:
|
||||||
|
auto.set_inconsistent(True)
|
||||||
|
else:
|
||||||
|
auto.set_active(False)
|
||||||
|
widget.set_value(val)
|
||||||
|
|
||||||
|
+ auto.set_label(label)
|
||||||
|
+
|
||||||
|
gtype = gfx.type
|
||||||
|
is_vnc = (gtype == "vnc")
|
||||||
|
is_sdl = (gtype == "sdl")
|
62
53397ae0-check-ip-address-format.patch
Normal file
62
53397ae0-check-ip-address-format.patch
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
Subject: interface: check ip address format
|
||||||
|
From: Chen Hanxiao chenhanxiao@cn.fujitsu.com Mon Mar 31 22:25:36 2014 +0800
|
||||||
|
Date: Mon Mar 31 22:25:36 2014 +0800:
|
||||||
|
Git: 89c45af26deca41cba5dffcc4cae5e653fedc89a
|
||||||
|
|
||||||
|
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
|
||||||
|
|
||||||
|
Index: virt-manager-1.0.1/tests/xmlparse-xml/interface-test-bridge-ip-out.xml
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/tests/xmlparse-xml/interface-test-bridge-ip-out.xml
|
||||||
|
+++ virt-manager-1.0.1/tests/xmlparse-xml/interface-test-bridge-ip-out.xml
|
||||||
|
@@ -15,7 +15,7 @@
|
||||||
|
</protocol>
|
||||||
|
<protocol family="ipv6">
|
||||||
|
<ip address="fe99::215:58ff:fe6e:5" prefix="32"/>
|
||||||
|
- <ip address="foobar" prefix="38"/>
|
||||||
|
+ <ip address="2002::" prefix="38"/>
|
||||||
|
<route gateway="1.2.3.4"/>
|
||||||
|
</protocol>
|
||||||
|
</interface>
|
||||||
|
Index: virt-manager-1.0.1/tests/xmlparse.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/tests/xmlparse.py
|
||||||
|
+++ virt-manager-1.0.1/tests/xmlparse.py
|
||||||
|
@@ -958,7 +958,7 @@ class XMLParseTest(unittest.TestCase):
|
||||||
|
check("autoconf", True, False)
|
||||||
|
|
||||||
|
check = self._make_checker(iface.protocols[1].ips[1])
|
||||||
|
- check("address", "fe80::215:58ff:fe6e:5", "foobar")
|
||||||
|
+ check("address", "fe80::215:58ff:fe6e:5", "2002::")
|
||||||
|
check("prefix", 64, 38)
|
||||||
|
|
||||||
|
# Remove a child interface, verify it's data remains intact
|
||||||
|
Index: virt-manager-1.0.1/virtinst/interface.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtinst/interface.py
|
||||||
|
+++ virt-manager-1.0.1/virtinst/interface.py
|
||||||
|
@@ -23,6 +23,7 @@ Classes for building and installing libv
|
||||||
|
import logging
|
||||||
|
|
||||||
|
import libvirt
|
||||||
|
+import ipaddr
|
||||||
|
|
||||||
|
from virtinst import util
|
||||||
|
from virtinst.xmlbuilder import XMLBuilder, XMLChildProperty, XMLProperty
|
||||||
|
@@ -32,7 +33,15 @@ class _IPAddress(XMLBuilder):
|
||||||
|
_XML_PROP_ORDER = ["address", "prefix"]
|
||||||
|
_XML_ROOT_NAME = "ip"
|
||||||
|
|
||||||
|
- address = XMLProperty("./@address")
|
||||||
|
+ ######################
|
||||||
|
+ # Validation helpers #
|
||||||
|
+ ######################
|
||||||
|
+
|
||||||
|
+ def _validate_ipaddr(self, addr):
|
||||||
|
+ ipaddr.IPAddress(addr)
|
||||||
|
+ return addr
|
||||||
|
+
|
||||||
|
+ address = XMLProperty("./@address", validate_cb=_validate_ipaddr)
|
||||||
|
prefix = XMLProperty("./@prefix", is_int=True)
|
||||||
|
|
||||||
|
|
108
53399b45-hook-into-domain-balloon-event.patch
Normal file
108
53399b45-hook-into-domain-balloon-event.patch
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
Subject: connection: Hook into domain balloon event (bz 1081424)
|
||||||
|
From: Cole Robinson crobinso@redhat.com Mon Mar 31 12:43:49 2014 -0400
|
||||||
|
Date: Mon Mar 31 12:43:49 2014 -0400:
|
||||||
|
Git: adf3545671b155ca37c82bff0ab96d0c038ffee8
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/virtManager/connection.py b/virtManager/connection.py
|
||||||
|
index bc8a81f..27d5bd9 100644
|
||||||
|
--- a/virtManager/connection.py
|
||||||
|
+++ b/virtManager/connection.py
|
||||||
|
@@ -99,9 +99,9 @@ class vmmConnection(vmmGObject):
|
||||||
|
self._nodedev_capable = None
|
||||||
|
|
||||||
|
self.using_domain_events = False
|
||||||
|
- self._domain_cb_id = None
|
||||||
|
+ self._domain_cb_ids = []
|
||||||
|
self.using_network_events = False
|
||||||
|
- self._network_cb_id = None
|
||||||
|
+ self._network_cb_ids = []
|
||||||
|
|
||||||
|
self._xml_flags = {}
|
||||||
|
|
||||||
|
@@ -840,6 +840,16 @@ class vmmConnection(vmmGObject):
|
||||||
|
# event driven setup is hard, so we end up doing more polling than
|
||||||
|
# necessary on most events.
|
||||||
|
|
||||||
|
+ def _domain_xml_misc_event(self, conn, domain, *args):
|
||||||
|
+ # Just trigger a domain XML refresh for hotplug type events
|
||||||
|
+ ignore = conn
|
||||||
|
+ ignore = args
|
||||||
|
+
|
||||||
|
+ obj = self.vms.get(domain.UUIDString(), None)
|
||||||
|
+ if not obj:
|
||||||
|
+ return
|
||||||
|
+ self.idle_add(obj.refresh_xml, True)
|
||||||
|
+
|
||||||
|
def _domain_lifecycle_event(self, conn, domain, event, reason, userdata):
|
||||||
|
ignore = conn
|
||||||
|
ignore = reason
|
||||||
|
@@ -872,19 +882,41 @@ class vmmConnection(vmmGObject):
|
||||||
|
|
||||||
|
def _add_conn_events(self):
|
||||||
|
try:
|
||||||
|
- self._domain_cb_id = self.get_backend().domainEventRegisterAny(
|
||||||
|
+ self._domain_cb_ids.append(
|
||||||
|
+ self.get_backend().domainEventRegisterAny(
|
||||||
|
None, libvirt.VIR_DOMAIN_EVENT_ID_LIFECYCLE,
|
||||||
|
- self._domain_lifecycle_event, None)
|
||||||
|
+ self._domain_lifecycle_event, None))
|
||||||
|
self.using_domain_events = True
|
||||||
|
logging.debug("Using domain events")
|
||||||
|
except Exception, e:
|
||||||
|
self.using_domain_events = False
|
||||||
|
logging.debug("Error registering domain events: %s", e)
|
||||||
|
|
||||||
|
+ def _add_domain_xml_event(eventid, typestr):
|
||||||
|
+ if not self.using_domain_events:
|
||||||
|
+ return
|
||||||
|
+ try:
|
||||||
|
+ self._domain_cb_ids.append(
|
||||||
|
+ self.get_backend().domainEventRegisterAny(
|
||||||
|
+ None, eventid, self._domain_xml_misc_event, None))
|
||||||
|
+ except Exception, e:
|
||||||
|
+ logging.debug("Error registering domain %s event: %s",
|
||||||
|
+ typestr, e)
|
||||||
|
+
|
||||||
|
+ _add_domain_xml_event(
|
||||||
|
+ getattr(libvirt, "VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE", 13),
|
||||||
|
+ "balloon")
|
||||||
|
+ _add_domain_xml_event(
|
||||||
|
+ getattr(libvirt, "VIR_DOMAIN_EVENT_ID_TRAY_CHANGE", 10), "tray")
|
||||||
|
+ _add_domain_xml_event(
|
||||||
|
+ getattr(libvirt, "VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED", 15),
|
||||||
|
+ "device removed")
|
||||||
|
+
|
||||||
|
try:
|
||||||
|
eventid = getattr(libvirt, "VIR_NETWORK_EVENT_ID_LIFECYCLE", 0)
|
||||||
|
- self._network_cb_id = self.get_backend().networkEventRegisterAny(
|
||||||
|
- None, eventid, self._network_lifecycle_event, None)
|
||||||
|
+ self._network_cb_ids.append(
|
||||||
|
+ self.get_backend().networkEventRegisterAny(
|
||||||
|
+ None, eventid, self._network_lifecycle_event, None))
|
||||||
|
self.using_network_events = True
|
||||||
|
logging.debug("Using network events")
|
||||||
|
except Exception, e:
|
||||||
|
@@ -936,15 +968,13 @@ class vmmConnection(vmmGObject):
|
||||||
|
|
||||||
|
try:
|
||||||
|
if not self._backend.is_closed():
|
||||||
|
- if self._domain_cb_id is not None:
|
||||||
|
- self._backend.domainEventDeregisterAny(
|
||||||
|
- self._domain_cb_id)
|
||||||
|
- self._domain_cb_id = None
|
||||||
|
-
|
||||||
|
- if self._network_cb_id is not None:
|
||||||
|
- self._backend.networkEventDeregisterAny(
|
||||||
|
- self._network_cb_id)
|
||||||
|
- self._network_cb_id = None
|
||||||
|
+ for eid in self._domain_cb_ids:
|
||||||
|
+ self._backend.domainEventDeregisterAny(eid)
|
||||||
|
+ self._domain_cb_ids = []
|
||||||
|
+
|
||||||
|
+ for eid in self._network_cb_ids:
|
||||||
|
+ self._backend.networkEventDeregisterAny(eid)
|
||||||
|
+ self._network_cb_ids = []
|
||||||
|
except:
|
||||||
|
logging.debug("Failed to deregister events in conn cleanup",
|
||||||
|
exc_info=True)
|
37
533d708d-fix-showing-vcpus-values.patch
Normal file
37
533d708d-fix-showing-vcpus-values.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
Subject: details: Fix showing vcpus values in 'customize' dialog (bz 1083903)
|
||||||
|
From: Cole Robinson crobinso@redhat.com Thu Apr 3 10:30:37 2014 -0400
|
||||||
|
Date: Thu Apr 3 10:30:37 2014 -0400:
|
||||||
|
Git: ee6a541167b787a84cc5c7e553089cbd5ab9ada3
|
||||||
|
|
||||||
|
|
||||||
|
Index: virt-manager-1.0.1/virtManager/details.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/details.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/details.py
|
||||||
|
@@ -2546,6 +2546,12 @@ class vmmDetails(vmmGObjectUI):
|
||||||
|
self.vm.network_traffic_vector())
|
||||||
|
|
||||||
|
def refresh_config_cpu(self):
|
||||||
|
+ # This bit needs to come first, since CPU values can be affected
|
||||||
|
+ # by whether topology is enabled
|
||||||
|
+ cpu = self.vm.get_cpu_config()
|
||||||
|
+ show_top = bool(cpu.sockets or cpu.cores or cpu.threads)
|
||||||
|
+ self.widget("cpu-topology-enable").set_active(show_top)
|
||||||
|
+
|
||||||
|
conn = self.vm.conn
|
||||||
|
host_active_count = conn.host_active_processor_count()
|
||||||
|
maxvcpus = self.vm.vcpu_max_count()
|
||||||
|
@@ -2563,13 +2569,10 @@ class vmmDetails(vmmGObjectUI):
|
||||||
|
self.widget("config-vcpus-warn-box").set_visible(warn)
|
||||||
|
|
||||||
|
# CPU model config
|
||||||
|
- cpu = self.vm.get_cpu_config()
|
||||||
|
- show_top = bool(cpu.sockets or cpu.cores or cpu.threads)
|
||||||
|
sockets = cpu.sockets or 1
|
||||||
|
cores = cpu.cores or 1
|
||||||
|
threads = cpu.threads or 1
|
||||||
|
|
||||||
|
- self.widget("cpu-topology-enable").set_active(show_top)
|
||||||
|
self.widget("cpu-sockets").set_value(sockets)
|
||||||
|
self.widget("cpu-cores").set_value(cores)
|
||||||
|
self.widget("cpu-threads").set_value(threads)
|
293
533d7602-fix-changing-graphics-type.patch
Normal file
293
533d7602-fix-changing-graphics-type.patch
Normal file
@ -0,0 +1,293 @@
|
|||||||
|
Subject: details: Fix changing graphics type (bz 1083903)
|
||||||
|
From: Cole Robinson crobinso@redhat.com Thu Apr 3 10:53:54 2014 -0400
|
||||||
|
Date: Thu Apr 3 10:53:54 2014 -0400:
|
||||||
|
Git: 932e6e00bb08647800a62e59f61c8adee9c5de59
|
||||||
|
|
||||||
|
And clean up the API usage to avoid these types of issues in the future.
|
||||||
|
|
||||||
|
Index: virt-manager-1.0.1/virtManager/addhardware.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/addhardware.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/addhardware.py
|
||||||
|
@@ -905,12 +905,12 @@ class vmmAddHardware(vmmGObjectUI):
|
||||||
|
|
||||||
|
# Input getters
|
||||||
|
def get_config_input(self):
|
||||||
|
- row = uiutil.get_list_selection(self.widget("input-type"))
|
||||||
|
+ row = uiutil.get_list_selection(self.widget("input-type"), None)
|
||||||
|
return row[1], row[2]
|
||||||
|
|
||||||
|
# Network getters
|
||||||
|
def get_config_net_model(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("net-model"))[0]
|
||||||
|
+ return uiutil.get_list_selection(self.widget("net-model"), 0)
|
||||||
|
|
||||||
|
def get_config_macaddr(self):
|
||||||
|
macaddr = None
|
||||||
|
@@ -933,7 +933,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||||
|
return usb_info
|
||||||
|
|
||||||
|
def get_config_host_device_info(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("host-device"))
|
||||||
|
+ return uiutil.get_list_selection(self.widget("host-device"), None)
|
||||||
|
|
||||||
|
# Video Getters
|
||||||
|
def get_config_video_model(self):
|
||||||
|
@@ -1016,7 +1016,7 @@ class vmmAddHardware(vmmGObjectUI):
|
||||||
|
uiutil.set_list_selection(self.widget("hw-list"), page)
|
||||||
|
|
||||||
|
def get_hw_selection(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("hw-list"))
|
||||||
|
+ return uiutil.get_list_selection(self.widget("hw-list"), None)
|
||||||
|
|
||||||
|
def update_char_device_type_model(self):
|
||||||
|
stable_blacklist = ["pipe", "udp"]
|
||||||
|
Index: virt-manager-1.0.1/virtManager/create.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/create.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/create.py
|
||||||
|
@@ -940,8 +940,8 @@ class vmmCreate(vmmGObjectUI):
|
||||||
|
return self.widget("create-vm-name").get_text()
|
||||||
|
|
||||||
|
def get_config_machine(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("config-machine"),
|
||||||
|
- rowindex=0, check_visible=True)
|
||||||
|
+ return uiutil.get_list_selection(self.widget("config-machine"), 0,
|
||||||
|
+ check_visible=True)
|
||||||
|
|
||||||
|
def is_install_page(self):
|
||||||
|
notebook = self.widget("create-pages")
|
||||||
|
@@ -965,8 +965,10 @@ class vmmCreate(vmmGObjectUI):
|
||||||
|
return INSTALL_PAGE_CONTAINER_OS
|
||||||
|
|
||||||
|
def get_config_os_info(self):
|
||||||
|
- drow = uiutil.get_list_selection(self.widget("install-os-type"))
|
||||||
|
- vrow = uiutil.get_list_selection(self.widget("install-os-version"))
|
||||||
|
+ drow = uiutil.get_list_selection(
|
||||||
|
+ self.widget("install-os-type"), None)
|
||||||
|
+ vrow = uiutil.get_list_selection(
|
||||||
|
+ self.widget("install-os-version"), None)
|
||||||
|
distro = None
|
||||||
|
dlabel = None
|
||||||
|
variant = None
|
||||||
|
@@ -1153,7 +1155,8 @@ class vmmCreate(vmmGObjectUI):
|
||||||
|
self.detect_media_os()
|
||||||
|
|
||||||
|
def _selected_os_row(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("install-os-type"))
|
||||||
|
+ return uiutil.get_list_selection(
|
||||||
|
+ self.widget("install-os-type"), None)
|
||||||
|
|
||||||
|
def change_os_type(self, box):
|
||||||
|
ignore = box
|
||||||
|
Index: virt-manager-1.0.1/virtManager/createinterface.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/createinterface.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/createinterface.py
|
||||||
|
@@ -775,7 +775,7 @@ class vmmCreateInterface(vmmGObjectUI):
|
||||||
|
is_manual = self.widget("ip-do-manual").get_active()
|
||||||
|
|
||||||
|
copy_row = uiutil.get_list_selection(
|
||||||
|
- self.widget("ip-copy-interface-combo"))
|
||||||
|
+ self.widget("ip-copy-interface-combo"), None)
|
||||||
|
|
||||||
|
v4_mode = self.widget("ipv4-mode").get_active()
|
||||||
|
v4_addr = self.widget("ipv4-address").get_text()
|
||||||
|
Index: virt-manager-1.0.1/virtManager/details.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/details.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/details.py
|
||||||
|
@@ -1109,7 +1109,7 @@ class vmmDetails(vmmGObjectUI):
|
||||||
|
self.widget("toolbar-box").hide()
|
||||||
|
|
||||||
|
def get_boot_selection(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("config-boot-list"))
|
||||||
|
+ return uiutil.get_list_selection(self.widget("config-boot-list"), None)
|
||||||
|
|
||||||
|
def set_hw_selection(self, page, disable_apply=True):
|
||||||
|
if disable_apply:
|
||||||
|
@@ -1117,7 +1117,7 @@ class vmmDetails(vmmGObjectUI):
|
||||||
|
uiutil.set_list_selection(self.widget("hw-list"), page)
|
||||||
|
|
||||||
|
def get_hw_row(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("hw-list"))
|
||||||
|
+ return uiutil.get_list_selection(self.widget("hw-list"), None)
|
||||||
|
|
||||||
|
def get_hw_selection(self, field):
|
||||||
|
row = self.get_hw_row()
|
||||||
|
Index: virt-manager-1.0.1/virtManager/fsdetails.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/fsdetails.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/fsdetails.py
|
||||||
|
@@ -155,16 +155,16 @@ class vmmFSDetails(vmmGObjectUI):
|
||||||
|
return self._dev
|
||||||
|
|
||||||
|
def get_config_fs_mode(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("fs-mode-combo"),
|
||||||
|
- rowindex=0, check_visible=True)
|
||||||
|
+ return uiutil.get_list_selection(self.widget("fs-mode-combo"), 0,
|
||||||
|
+ check_visible=True)
|
||||||
|
|
||||||
|
def get_config_fs_wrpolicy(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("fs-wrpolicy-combo"),
|
||||||
|
- rowindex=0, check_visible=True)
|
||||||
|
+ return uiutil.get_list_selection(self.widget("fs-wrpolicy-combo"), 0,
|
||||||
|
+ check_visible=True)
|
||||||
|
|
||||||
|
def get_config_fs_type(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("fs-type-combo"),
|
||||||
|
- rowindex=0, check_visible=True)
|
||||||
|
+ return uiutil.get_list_selection(self.widget("fs-type-combo"), 0,
|
||||||
|
+ check_visible=True)
|
||||||
|
|
||||||
|
def get_config_fs_readonly(self):
|
||||||
|
if not self.widget("fs-readonly").is_visible():
|
||||||
|
@@ -172,12 +172,12 @@ class vmmFSDetails(vmmGObjectUI):
|
||||||
|
return self.widget("fs-readonly").get_active()
|
||||||
|
|
||||||
|
def get_config_fs_driver(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("fs-driver-combo"),
|
||||||
|
- rowindex=0, check_visible=True)
|
||||||
|
+ return uiutil.get_list_selection(self.widget("fs-driver-combo"), 0,
|
||||||
|
+ check_visible=True)
|
||||||
|
|
||||||
|
def get_config_fs_format(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("fs-format-combo"),
|
||||||
|
- rowindex=0, check_visible=True)
|
||||||
|
+ return uiutil.get_list_selection(self.widget("fs-format-combo"), 0,
|
||||||
|
+ check_visible=True)
|
||||||
|
|
||||||
|
# Setters
|
||||||
|
def set_dev(self, dev):
|
||||||
|
Index: virt-manager-1.0.1/virtManager/gfxdetails.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/gfxdetails.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/gfxdetails.py
|
||||||
|
@@ -134,9 +134,9 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
||||||
|
self.widget("graphics-password-chk").set_active(False)
|
||||||
|
|
||||||
|
def get_values(self):
|
||||||
|
- gtype = uiutil.get_list_selection(self.widget("graphics-type"))
|
||||||
|
+ gtype = uiutil.get_list_selection(self.widget("graphics-type"), 0)
|
||||||
|
port, tlsport = self._get_config_graphics_ports()
|
||||||
|
- addr = uiutil.get_list_selection(self.widget("graphics-address"))
|
||||||
|
+ addr = uiutil.get_list_selection(self.widget("graphics-address"), 0)
|
||||||
|
keymap = uiutil.get_combo_entry(self.widget("graphics-keymap"))
|
||||||
|
if keymap == "auto":
|
||||||
|
keymap = None
|
||||||
|
Index: virt-manager-1.0.1/virtManager/manager.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/manager.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/manager.py
|
||||||
|
@@ -427,7 +427,7 @@ class vmmManager(vmmGObjectUI):
|
||||||
|
##################
|
||||||
|
|
||||||
|
def current_row(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("vm-list"))
|
||||||
|
+ return uiutil.get_list_selection(self.widget("vm-list"), None)
|
||||||
|
|
||||||
|
def current_vm(self):
|
||||||
|
row = self.current_row()
|
||||||
|
Index: virt-manager-1.0.1/virtManager/migrate.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/migrate.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/migrate.py
|
||||||
|
@@ -184,7 +184,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
||||||
|
self.reset_state()
|
||||||
|
|
||||||
|
def destconn_changed(self, src):
|
||||||
|
- row = uiutil.get_list_selection(src)
|
||||||
|
+ row = uiutil.get_list_selection(src, None)
|
||||||
|
tooltip = ""
|
||||||
|
if row:
|
||||||
|
tooltip = _("A valid destination connection must be selected.")
|
||||||
|
@@ -212,7 +212,7 @@ class vmmMigrateDialog(vmmGObjectUI):
|
||||||
|
self.widget("migrate-port").set_sensitive(enable)
|
||||||
|
|
||||||
|
def get_config_destconn(self):
|
||||||
|
- row = uiutil.get_list_selection(self.widget("migrate-dest"))
|
||||||
|
+ row = uiutil.get_list_selection(self.widget("migrate-dest"), None)
|
||||||
|
if not row or not row[2]:
|
||||||
|
return None
|
||||||
|
return row[1]
|
||||||
|
Index: virt-manager-1.0.1/virtManager/netlist.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/netlist.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/netlist.py
|
||||||
|
@@ -284,13 +284,11 @@ class vmmNetworkList(vmmGObjectUI):
|
||||||
|
###############
|
||||||
|
|
||||||
|
def get_network_row(self):
|
||||||
|
- return uiutil.get_list_selection(self.widget("net-source"))
|
||||||
|
+ return uiutil.get_list_selection(self.widget("net-source"), None)
|
||||||
|
|
||||||
|
def get_network_selection(self):
|
||||||
|
- net_list = self.widget("net-source")
|
||||||
|
bridge_entry = self.widget("net-bridge-name")
|
||||||
|
-
|
||||||
|
- row = uiutil.get_list_selection(net_list)
|
||||||
|
+ row = self.get_network_row()
|
||||||
|
if not row:
|
||||||
|
return None, None, None
|
||||||
|
|
||||||
|
@@ -472,9 +470,9 @@ class vmmNetworkList(vmmGObjectUI):
|
||||||
|
return
|
||||||
|
|
||||||
|
def _on_net_source_changed(self, src):
|
||||||
|
+ ignore = src
|
||||||
|
self._emit_changed()
|
||||||
|
-
|
||||||
|
- row = uiutil.get_list_selection(src)
|
||||||
|
+ row = self.get_network_row()
|
||||||
|
if not row:
|
||||||
|
return
|
||||||
|
|
||||||
|
Index: virt-manager-1.0.1/virtManager/storagebrowse.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/storagebrowse.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/storagebrowse.py
|
||||||
|
@@ -221,7 +221,7 @@ class vmmStorageBrowser(vmmGObjectUI):
|
||||||
|
return data["enable_create"]
|
||||||
|
|
||||||
|
def current_pool(self):
|
||||||
|
- row = uiutil.get_list_selection(self.widget("pool-list"))
|
||||||
|
+ row = uiutil.get_list_selection(self.widget("pool-list"), None)
|
||||||
|
if not row:
|
||||||
|
return
|
||||||
|
try:
|
||||||
|
@@ -232,7 +232,7 @@ class vmmStorageBrowser(vmmGObjectUI):
|
||||||
|
def current_vol_row(self):
|
||||||
|
if not self.current_pool():
|
||||||
|
return
|
||||||
|
- return uiutil.get_list_selection(self.widget("vol-list"))
|
||||||
|
+ return uiutil.get_list_selection(self.widget("vol-list"), None)
|
||||||
|
|
||||||
|
def current_vol(self):
|
||||||
|
pool = self.current_pool()
|
||||||
|
Index: virt-manager-1.0.1/virtManager/uiutil.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/uiutil.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/uiutil.py
|
||||||
|
@@ -58,9 +58,11 @@ def spin_get_helper(widget):
|
||||||
|
return adj.get_value()
|
||||||
|
|
||||||
|
|
||||||
|
-def get_list_selection(widget, rowindex=None, check_visible=False):
|
||||||
|
+def get_list_selection(widget, rowindex, check_visible=False):
|
||||||
|
"""
|
||||||
|
- Helper to simplify getting the selected row in a list/tree/combo
|
||||||
|
+ Helper to simplify getting the selected row and value in a list/tree/combo
|
||||||
|
+
|
||||||
|
+ If rowindex is None, return the whole row.
|
||||||
|
"""
|
||||||
|
if check_visible and not widget.get_visible():
|
||||||
|
return None
|
||||||
|
@@ -145,7 +147,7 @@ def get_combo_entry(combo, rowidx=0):
|
||||||
|
Helper to get the value specified in a combo box, with or
|
||||||
|
without and entry
|
||||||
|
"""
|
||||||
|
- row = get_list_selection(combo)
|
||||||
|
+ row = get_list_selection(combo, None)
|
||||||
|
if row:
|
||||||
|
return row[rowidx]
|
||||||
|
if not combo.get_has_entry():
|
44
533d7be7-clarify-iscsi-IQN-fields.patch
Normal file
44
533d7be7-clarify-iscsi-IQN-fields.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
Subject: createpool: Clarify iscsi IQN fields (bz 1084011)
|
||||||
|
From: Cole Robinson crobinso@redhat.com Thu Apr 3 11:19:03 2014 -0400
|
||||||
|
Date: Thu Apr 3 11:19:03 2014 -0400:
|
||||||
|
Git: 8fa2aad1d31f811bb09505595c6401bdf6b90d78
|
||||||
|
|
||||||
|
|
||||||
|
Index: virt-manager-1.0.1/ui/createpool.ui
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/ui/createpool.ui
|
||||||
|
+++ virt-manager-1.0.1/ui/createpool.ui
|
||||||
|
@@ -315,7 +315,7 @@
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="xalign">1</property>
|
||||||
|
- <property name="label" translatable="yes">_Source Path:</property>
|
||||||
|
+ <property name="label" translatable="yes">sourcep:</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
@@ -330,7 +330,7 @@
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="xalign">1</property>
|
||||||
|
- <property name="label" translatable="yes">_IQN:</property>
|
||||||
|
+ <property name="label" translatable="yes">Initiator _IQN:</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">pool-iqn-chk</property>
|
||||||
|
</object>
|
||||||
|
Index: virt-manager-1.0.1/virtManager/createpool.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/createpool.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/createpool.py
|
||||||
|
@@ -277,6 +277,11 @@ class vmmCreatePool(vmmGObjectUI):
|
||||||
|
show_row("pool-iqn", iqn)
|
||||||
|
show_row("pool-source-name", src_name)
|
||||||
|
|
||||||
|
+ if iqn:
|
||||||
|
+ self.widget("pool-source-label").set_label(_("_Source IQN:"))
|
||||||
|
+ else:
|
||||||
|
+ self.widget("pool-source-label").set_label(_("_Source Path:"))
|
||||||
|
+
|
||||||
|
if tgt:
|
||||||
|
self.widget("pool-target-path").get_child().set_text(
|
||||||
|
self._pool.target_path)
|
@ -1,3 +1,45 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 3 19:25:41 MDT 2014 - carnold@suse.com
|
||||||
|
|
||||||
|
- Upstream bug fixes
|
||||||
|
533d708d-fix-showing-vcpus-values.patch
|
||||||
|
533d7602-fix-changing-graphics-type.patch
|
||||||
|
533d7be7-clarify-iscsi-IQN-fields.patch
|
||||||
|
- Dropped virtman-init-vm-processor-topology.patch in favor of
|
||||||
|
upstream 533d708d-fix-showing-vcpus-values.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 2 16:13:41 MDT 2014 - carnold@suse.com
|
||||||
|
|
||||||
|
- bnc#869024 - Build0198: Only option to create a virtual machine is
|
||||||
|
"import existing disk image"
|
||||||
|
virtman-add-s390x-arch-support.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 2 14:16:42 MDT 2014 - carnold@suse.com
|
||||||
|
|
||||||
|
- bnc#871642 - virt-manager wants to install libvirt-daemon-xen
|
||||||
|
even when it is installed
|
||||||
|
xen.spec
|
||||||
|
- Xen: Virt-install won't reboot VM after install of SLE HVM guest
|
||||||
|
because of libxl exception.
|
||||||
|
virtinst-keep-cdrom-media-attached.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 2 04:34:59 CST 2014 - cyliu@suse.com
|
||||||
|
|
||||||
|
- Fate#315125: add NOCOW flag
|
||||||
|
virtinst-vol-default-nocow.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 31 13:47:38 MDT 2014 - carnold@suse.com
|
||||||
|
|
||||||
|
- Upstream bug fixes
|
||||||
|
53375bad-raise-value-error-when-no-ipaddr-set.patch
|
||||||
|
53388de2-show-port-number-for-active-autoport-VM.patch
|
||||||
|
53397ae0-check-ip-address-format.patch
|
||||||
|
53399b45-hook-into-domain-balloon-event.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 28 11:42:38 MDT 2014 - carnold@suse.com
|
Fri Mar 28 11:42:38 MDT 2014 - carnold@suse.com
|
||||||
|
|
||||||
|
@ -19,15 +19,15 @@
|
|||||||
%define with_guestfs 0
|
%define with_guestfs 0
|
||||||
%define askpass_package "openssh-askpass"
|
%define askpass_package "openssh-askpass"
|
||||||
%define qemu_user "qemu"
|
%define qemu_user "qemu"
|
||||||
%define libvirt_kvm_packages "libvirt-daemon-qemu"
|
%define libvirt_kvm_packages ""
|
||||||
%define libvirt_xen_packages "libvirt-daemon-xen"
|
%define libvirt_xen_packages ""
|
||||||
%define preferred_distros "sles,opensuse"
|
%define preferred_distros "sles,opensuse"
|
||||||
%define kvm_packages "qemu-x86"
|
%define kvm_packages ""
|
||||||
%define _version 1.0.1
|
%define _version 1.0.1
|
||||||
%define _release 1
|
%define _release 1
|
||||||
|
|
||||||
Name: virt-manager
|
Name: virt-manager
|
||||||
Version: %{_version}
|
Version: 1.0.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Virtual Machine Manager
|
Summary: Virtual Machine Manager
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
@ -39,6 +39,13 @@ Source2: virt-install.desktop
|
|||||||
Patch1: 5332ee4d-enable-media-detection-for-ISO-images.patch
|
Patch1: 5332ee4d-enable-media-detection-for-ISO-images.patch
|
||||||
Patch2: 53341e7e-hide-hardware-removal-for-non-devices.patch
|
Patch2: 53341e7e-hide-hardware-removal-for-non-devices.patch
|
||||||
Patch3: 53342f31-set-right-ip-address-for-ipv6.patch
|
Patch3: 53342f31-set-right-ip-address-for-ipv6.patch
|
||||||
|
Patch4: 53375bad-raise-value-error-when-no-ipaddr-set.patch
|
||||||
|
Patch5: 53388de2-show-port-number-for-active-autoport-VM.patch
|
||||||
|
Patch6: 53397ae0-check-ip-address-format.patch
|
||||||
|
Patch7: 53399b45-hook-into-domain-balloon-event.patch
|
||||||
|
Patch8: 533d708d-fix-showing-vcpus-values.patch
|
||||||
|
Patch9: 533d7602-fix-changing-graphics-type.patch
|
||||||
|
Patch10: 533d7be7-clarify-iscsi-IQN-fields.patch
|
||||||
Patch50: virtman-desktop.patch
|
Patch50: virtman-desktop.patch
|
||||||
Patch51: virtman-cdrom.patch
|
Patch51: virtman-cdrom.patch
|
||||||
Patch52: virtman-kvm.patch
|
Patch52: virtman-kvm.patch
|
||||||
@ -59,7 +66,7 @@ Patch72: virtman-packages.patch
|
|||||||
Patch73: virtman-load-stored-uris.patch
|
Patch73: virtman-load-stored-uris.patch
|
||||||
Patch74: virtman-libvirtd-not-running.patch
|
Patch74: virtman-libvirtd-not-running.patch
|
||||||
Patch75: virtman-stable-os-support.patch
|
Patch75: virtman-stable-os-support.patch
|
||||||
Patch76: virtman-init-vm-processor-topology.patch
|
Patch76: virtman-add-s390x-arch-support.patch
|
||||||
Patch150: virtinst-cdrom.patch
|
Patch150: virtinst-cdrom.patch
|
||||||
Patch151: virtinst-storage-ocfs2.patch
|
Patch151: virtinst-storage-ocfs2.patch
|
||||||
Patch152: virtinst-qed.patch
|
Patch152: virtinst-qed.patch
|
||||||
@ -69,16 +76,18 @@ Patch155: virtinst-xen-drive-type.patch
|
|||||||
Patch156: virtinst-modify-gui-defaults.patch
|
Patch156: virtinst-modify-gui-defaults.patch
|
||||||
Patch157: virtinst-pvgrub2-bootloader.patch
|
Patch157: virtinst-pvgrub2-bootloader.patch
|
||||||
Patch158: virtinst-set-qemu-emulator.patch
|
Patch158: virtinst-set-qemu-emulator.patch
|
||||||
|
Patch159: virtinst-vol-default-nocow.patch
|
||||||
|
Patch160: virtinst-keep-cdrom-media-attached.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%define verrel %{version}-%{release}
|
%define verrel %{version}-%{release}
|
||||||
Requires: virt-manager-common = %{verrel}
|
Requires: avahi
|
||||||
Requires: avahi
|
Requires: dbus-1-x11
|
||||||
|
Requires: dconf
|
||||||
Requires: gtk3
|
Requires: gtk3
|
||||||
Requires: python-gconf
|
Requires: python-gconf
|
||||||
Requires: dconf
|
Requires: virt-manager-common = %{verrel}
|
||||||
Requires: dbus-1-x11
|
|
||||||
Requires: vm-install >= 0.5.6
|
Requires: vm-install >= 0.5.6
|
||||||
|
|
||||||
# Libvirt-glib
|
# Libvirt-glib
|
||||||
@ -93,12 +102,12 @@ Requires: typelib-1_0-Vte-2_90
|
|||||||
Requires: gtk-vnc2
|
Requires: gtk-vnc2
|
||||||
Requires: libspice-client-glib-2_0-8
|
Requires: libspice-client-glib-2_0-8
|
||||||
Requires: libspice-client-gtk-3_0-4
|
Requires: libspice-client-gtk-3_0-4
|
||||||
|
Requires: python-gobject-cairo
|
||||||
|
Requires: typelib-1_0-GVnc-1_0
|
||||||
|
Requires: typelib-1_0-Gtk-3_0
|
||||||
|
Requires: typelib-1_0-GtkVnc-2_0
|
||||||
Requires: typelib-1_0-SpiceClientGlib-2_0
|
Requires: typelib-1_0-SpiceClientGlib-2_0
|
||||||
Requires: typelib-1_0-SpiceClientGtk-3_0
|
Requires: typelib-1_0-SpiceClientGtk-3_0
|
||||||
Requires: typelib-1_0-Gtk-3_0
|
|
||||||
Requires: typelib-1_0-GVnc-1_0
|
|
||||||
Requires: typelib-1_0-GtkVnc-2_0
|
|
||||||
Requires: python-gobject-cairo
|
|
||||||
Recommends: python-SpiceClientGtk
|
Recommends: python-SpiceClientGtk
|
||||||
|
|
||||||
Requires: virt-install
|
Requires: virt-install
|
||||||
@ -127,9 +136,9 @@ Group: System/Monitoring
|
|||||||
# This version not strictly required: virt-manager should work with older,
|
# This version not strictly required: virt-manager should work with older,
|
||||||
# however varying amounts of functionality will not be enabled.
|
# however varying amounts of functionality will not be enabled.
|
||||||
Requires: libvirt-python >= 0.7.0
|
Requires: libvirt-python >= 0.7.0
|
||||||
Requires: python-urlgrabber
|
|
||||||
Requires: python-ipaddr
|
Requires: python-ipaddr
|
||||||
Requires: python-libxml2
|
Requires: python-libxml2
|
||||||
|
Requires: python-urlgrabber
|
||||||
|
|
||||||
%description common
|
%description common
|
||||||
Common files used by the different virt-manager interfaces, as well as
|
Common files used by the different virt-manager interfaces, as well as
|
||||||
@ -142,10 +151,10 @@ Group: System/Monitoring
|
|||||||
|
|
||||||
Requires: virt-manager-common = %{verrel}
|
Requires: virt-manager-common = %{verrel}
|
||||||
|
|
||||||
Provides: virt-clone
|
|
||||||
Provides: virt-image
|
|
||||||
Provides: virt-convert
|
|
||||||
Provides: python-virtinst
|
Provides: python-virtinst
|
||||||
|
Provides: virt-clone
|
||||||
|
Provides: virt-convert
|
||||||
|
Provides: virt-image
|
||||||
Obsoletes: python-virtinst <= 0.600.4
|
Obsoletes: python-virtinst <= 0.600.4
|
||||||
Supplements: virt-manager
|
Supplements: virt-manager
|
||||||
|
|
||||||
@ -160,6 +169,13 @@ machine).
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
|
%patch9 -p1
|
||||||
|
%patch10 -p1
|
||||||
%patch50 -p1
|
%patch50 -p1
|
||||||
%patch51 -p1
|
%patch51 -p1
|
||||||
%patch52 -p1
|
%patch52 -p1
|
||||||
@ -190,6 +206,8 @@ machine).
|
|||||||
%patch156 -p1
|
%patch156 -p1
|
||||||
%patch157 -p1
|
%patch157 -p1
|
||||||
%patch158 -p1
|
%patch158 -p1
|
||||||
|
%patch159 -p1
|
||||||
|
%patch160 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{qemu_user}
|
%if %{qemu_user}
|
||||||
|
@ -96,7 +96,7 @@ Index: virt-manager-1.0.1/virtinst/urlfetcher.py
|
|||||||
Distro.__init__(self, *args, **kwargs)
|
Distro.__init__(self, *args, **kwargs)
|
||||||
if re.match(r'i[4-9]86', self.arch):
|
if re.match(r'i[4-9]86', self.arch):
|
||||||
self.arch = 'i386'
|
self.arch = 'i386'
|
||||||
@@ -824,18 +889,34 @@ class SuseDistro(Distro):
|
@@ -824,22 +889,44 @@ class SuseDistro(Distro):
|
||||||
oldkern += "64"
|
oldkern += "64"
|
||||||
oldinit += "64"
|
oldinit += "64"
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ Index: virt-manager-1.0.1/virtinst/urlfetcher.py
|
|||||||
- self._xen_kernel_paths = [("boot/%s/vmlinuz-xen" % self.arch,
|
- self._xen_kernel_paths = [("boot/%s/vmlinuz-xen" % self.arch,
|
||||||
- "boot/%s/initrd-xen" % self.arch)]
|
- "boot/%s/initrd-xen" % self.arch)]
|
||||||
+ if self.arch == "s390x":
|
+ if self.arch == "s390x":
|
||||||
+ self._hvm_kernel_paths = [ ("boot/%s/vmrdr.ikr" % self.arch,
|
+ self._hvm_kernel_paths = [ ("boot/%s/linux" % self.arch,
|
||||||
+ "boot/%s/initrd" % self.arch) ]
|
+ "boot/%s/initrd" % self.arch) ]
|
||||||
+ # No Xen on s390x
|
+ # No Xen on s390x
|
||||||
+ self._xen_kernel_paths = []
|
+ self._xen_kernel_paths = []
|
||||||
@ -141,7 +141,17 @@ Index: virt-manager-1.0.1/virtinst/urlfetcher.py
|
|||||||
if not self.fetcher.hasFile("directory.yast"):
|
if not self.fetcher.hasFile("directory.yast"):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -860,6 +941,27 @@ class SuseDistro(Distro):
|
self.os_variant = self._detect_osdict_from_url()
|
||||||
|
+
|
||||||
|
+ # Reset kernel name for sle11 source on s390x
|
||||||
|
+ if self.arch == "s390x":
|
||||||
|
+ if self.os_variant == "sles11" or self.os_variant == "sled11":
|
||||||
|
+ self._hvm_kernel_paths = [ ("boot/%s/vmrdr.ikr" % self.arch,
|
||||||
|
+ "boot/%s/initrd" % self.arch) ]
|
||||||
|
return True
|
||||||
|
|
||||||
|
def _get_method_arg(self):
|
||||||
|
@@ -860,6 +947,27 @@ class SuseDistro(Distro):
|
||||||
return name
|
return name
|
||||||
return self.os_variant
|
return self.os_variant
|
||||||
|
|
||||||
|
17
virtinst-keep-cdrom-media-attached.patch
Normal file
17
virtinst-keep-cdrom-media-attached.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
--- virt-manager-1.0.1/virtinst/guest.py.orig 2014-04-02 14:12:01.000000000 -0600
|
||||||
|
+++ virt-manager-1.0.1/virtinst/guest.py 2014-04-02 14:14:08.000000000 -0600
|
||||||
|
@@ -626,10 +626,13 @@ class Guest(XMLBuilder):
|
||||||
|
# Keep cdrom around, but with no media attached,
|
||||||
|
# But only if we are a distro that doesn't have a multi
|
||||||
|
# stage install (aka not Windows)
|
||||||
|
+ # libxl will throw an exception with the XML that gets generated
|
||||||
|
+ # for a cdrom device that has no actual media attached
|
||||||
|
return (d.is_cdrom() and
|
||||||
|
d.transient and
|
||||||
|
not install and
|
||||||
|
- not self.get_continue_inst())
|
||||||
|
+ not self.get_continue_inst() and
|
||||||
|
+ self.type != "xen")
|
||||||
|
|
||||||
|
def do_skip_disk(d):
|
||||||
|
# Skip transient labeled non-media disks
|
21
virtinst-vol-default-nocow.patch
Normal file
21
virtinst-vol-default-nocow.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
Set NOCOW flag to newly created volume by default, to solve performance
|
||||||
|
issue on btrfs.
|
||||||
|
|
||||||
|
Signed-off-by: Chunyan Liu <cyliu@suse.com>
|
||||||
|
|
||||||
|
Index: virt-manager-1.0.0/virtinst/storage.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.0.orig/virtinst/storage.py
|
||||||
|
+++ virt-manager-1.0.0/virtinst/storage.py
|
||||||
|
@@ -656,6 +656,11 @@ class StorageVolume(_StorageObject):
|
||||||
|
lazy_refcounts = XMLProperty("./target/features/lazy_refcounts",
|
||||||
|
is_bool=True, default_cb=_lazy_refcounts_default_cb)
|
||||||
|
|
||||||
|
+ def _nocow_default_cb(self):
|
||||||
|
+ return True
|
||||||
|
+ nocow = XMLProperty("./target/nocow",
|
||||||
|
+ is_bool=True, default_cb=_nocow_default_cb)
|
||||||
|
+
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Public API helpers #
|
48
virtman-add-s390x-arch-support.patch
Normal file
48
virtman-add-s390x-arch-support.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
Index: virt-manager-1.0.1/virtManager/create.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtManager/create.py
|
||||||
|
+++ virt-manager-1.0.1/virtManager/create.py
|
||||||
|
@@ -415,7 +415,7 @@ class vmmCreate(vmmGObjectUI):
|
||||||
|
can_remote_url = self.conn.get_backend().support_remote_url_install()
|
||||||
|
|
||||||
|
installable_arch = (self.capsguest.arch in
|
||||||
|
- ["i686", "x86_64", "ppc64", "ia64"])
|
||||||
|
+ ["i686", "x86_64", "ppc64", "ia64", "s390x"])
|
||||||
|
|
||||||
|
# Install Options
|
||||||
|
method_tree = self.widget("method-tree")
|
||||||
|
@@ -677,7 +677,7 @@ class vmmCreate(vmmGObjectUI):
|
||||||
|
archs.remove("i686")
|
||||||
|
archs.sort()
|
||||||
|
|
||||||
|
- prios = ["x86_64", "i686", "armv7l", "ppc64"]
|
||||||
|
+ prios = ["x86_64", "i686", "armv7l", "ppc64", "s390x"]
|
||||||
|
if self.conn.caps.host.cpu.arch not in prios:
|
||||||
|
prios = []
|
||||||
|
else:
|
||||||
|
Index: virt-manager-1.0.1/virtinst/osxml.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtinst/osxml.py
|
||||||
|
+++ virt-manager-1.0.1/virtinst/osxml.py
|
||||||
|
@@ -53,6 +53,8 @@ class OSXML(XMLBuilder):
|
||||||
|
return self.arch == "ppc64"
|
||||||
|
def is_pseries(self):
|
||||||
|
return self.is_ppc64 and self.machine == "pseries"
|
||||||
|
+ def is_s390x(self):
|
||||||
|
+ return self.arch == "s390x"
|
||||||
|
|
||||||
|
_XML_ROOT_NAME = "os"
|
||||||
|
_XML_PROP_ORDER = ["arch", "os_type", "loader",
|
||||||
|
Index: virt-manager-1.0.1/virtinst/guest.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.0.1.orig/virtinst/guest.py
|
||||||
|
+++ virt-manager-1.0.1/virtinst/guest.py
|
||||||
|
@@ -598,7 +598,7 @@ class Guest(XMLBuilder):
|
||||||
|
return
|
||||||
|
if self.os.is_container():
|
||||||
|
return
|
||||||
|
- if self.os.arch not in ["x86_64", "i686", "ppc64", "ia64"]:
|
||||||
|
+ if self.os.arch not in ["x86_64", "i686", "ppc64", "ia64", "s390x"]:
|
||||||
|
return
|
||||||
|
self.add_device(virtinst.VirtualGraphics(self.conn))
|
||||||
|
|
@ -2,7 +2,7 @@ Index: virt-manager-1.0.1/virtManager/create.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- virt-manager-1.0.1.orig/virtManager/create.py
|
--- virt-manager-1.0.1.orig/virtManager/create.py
|
||||||
+++ virt-manager-1.0.1/virtManager/create.py
|
+++ virt-manager-1.0.1/virtManager/create.py
|
||||||
@@ -1227,11 +1227,34 @@ class vmmCreate(vmmGObjectUI):
|
@@ -1230,11 +1230,34 @@ class vmmCreate(vmmGObjectUI):
|
||||||
variant = self.widget("install-os-version")
|
variant = self.widget("install-os-version")
|
||||||
variant.set_active(0)
|
variant.set_active(0)
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ Index: virt-manager-1.0.1/virtManager/create.py
|
|||||||
# Get previous
|
# Get previous
|
||||||
type_row = self._selected_os_row()
|
type_row = self._selected_os_row()
|
||||||
if not type_row:
|
if not type_row:
|
||||||
@@ -1585,7 +1608,10 @@ class vmmCreate(vmmGObjectUI):
|
@@ -1588,7 +1611,10 @@ class vmmCreate(vmmGObjectUI):
|
||||||
if extra:
|
if extra:
|
||||||
extraargs += extra
|
extraargs += extra
|
||||||
if ks:
|
if ks:
|
||||||
@ -49,7 +49,7 @@ Index: virt-manager-1.0.1/virtManager/create.py
|
|||||||
|
|
||||||
if extraargs:
|
if extraargs:
|
||||||
self.guest.installer.extraargs = extraargs
|
self.guest.installer.extraargs = extraargs
|
||||||
@@ -1981,6 +2007,7 @@ class vmmCreate(vmmGObjectUI):
|
@@ -1984,6 +2010,7 @@ class vmmCreate(vmmGObjectUI):
|
||||||
dl = self.set_os_val(self.widget("install-os-type"), distro_type)
|
dl = self.set_os_val(self.widget("install-os-type"), distro_type)
|
||||||
vl = self.set_os_val(self.widget("install-os-version"), distro_var)
|
vl = self.set_os_val(self.widget("install-os-version"), distro_var)
|
||||||
self.set_distro_labels(dl, vl)
|
self.set_distro_labels(dl, vl)
|
||||||
|
@ -11,7 +11,7 @@ Index: virt-manager-1.0.1/virtManager/create.py
|
|||||||
|
|
||||||
# pylint: disable=E0611
|
# pylint: disable=E0611
|
||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
@@ -1140,6 +1142,55 @@ class vmmCreate(vmmGObjectUI):
|
@@ -1142,6 +1144,55 @@ class vmmCreate(vmmGObjectUI):
|
||||||
return
|
return
|
||||||
self.start_detection(forward=forward)
|
self.start_detection(forward=forward)
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ Index: virt-manager-1.0.1/virtManager/create.py
|
|||||||
def toggle_detect_os(self, src):
|
def toggle_detect_os(self, src):
|
||||||
dodetect = src.get_active()
|
dodetect = src.get_active()
|
||||||
|
|
||||||
@@ -1151,6 +1202,8 @@ class vmmCreate(vmmGObjectUI):
|
@@ -1153,6 +1204,8 @@ class vmmCreate(vmmGObjectUI):
|
||||||
if dodetect:
|
if dodetect:
|
||||||
self.mediaDetected = False
|
self.mediaDetected = False
|
||||||
self.detect_media_os()
|
self.detect_media_os()
|
||||||
@ -75,4 +75,4 @@ Index: virt-manager-1.0.1/virtManager/create.py
|
|||||||
+ self.detect_host_os()
|
+ self.detect_host_os()
|
||||||
|
|
||||||
def _selected_os_row(self):
|
def _selected_os_row(self):
|
||||||
return uiutil.get_list_selection(self.widget("install-os-type"))
|
return uiutil.get_list_selection(
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
Index: virt-manager-1.0.1/virtManager/details.py
|
|
||||||
===================================================================
|
|
||||||
--- virt-manager-1.0.1.orig/virtManager/details.py
|
|
||||||
+++ virt-manager-1.0.1/virtManager/details.py
|
|
||||||
@@ -2564,13 +2564,6 @@ class vmmDetails(vmmGObjectUI):
|
|
||||||
def refresh_config_cpu(self):
|
|
||||||
conn = self.vm.conn
|
|
||||||
host_active_count = conn.host_active_processor_count()
|
|
||||||
- maxvcpus = self.vm.vcpu_max_count()
|
|
||||||
- curvcpus = self.vm.vcpu_count()
|
|
||||||
-
|
|
||||||
- curadj = self.widget("config-vcpus")
|
|
||||||
- maxadj = self.widget("config-maxvcpus")
|
|
||||||
- curadj.set_value(int(curvcpus))
|
|
||||||
- maxadj.set_value(int(maxvcpus))
|
|
||||||
|
|
||||||
self.widget("state-host-cpus").set_text(str(host_active_count))
|
|
||||||
|
|
||||||
@@ -2592,6 +2585,14 @@ class vmmDetails(vmmGObjectUI):
|
|
||||||
if show_top:
|
|
||||||
self.widget("cpu-topology-expander").set_expanded(True)
|
|
||||||
|
|
||||||
+ maxvcpus = self.vm.vcpu_max_count()
|
|
||||||
+ curvcpus = self.vm.vcpu_count()
|
|
||||||
+
|
|
||||||
+ curadj = self.widget("config-vcpus")
|
|
||||||
+ maxadj = self.widget("config-maxvcpus")
|
|
||||||
+ curadj.set_value(int(curvcpus))
|
|
||||||
+ maxadj.set_value(int(maxvcpus))
|
|
||||||
+
|
|
||||||
model = cpu.model or None
|
|
||||||
if not model:
|
|
||||||
if cpu.mode == "host-model" or cpu.mode == "host-passthrough":
|
|
Loading…
Reference in New Issue
Block a user