Rebased to version 1.1.0
Switch to libosinfo as OS metadata database (Giuseppe Scrivano) Use libosinfo for OS detection from CDROM media labels (Giuseppe Scrivano) Use libosinfo for improved OS defaults, like recommended disk size (Giuseppe Scrivano) virt-image tool has been removed, as previously announced Enable Hyper-V enlightenments for Windows VMs Revert virtio-console default, back to plain serial console Experimental q35 option in new VM 'customize' dialog UI for virtual network QoS settings (Giuseppe Scrivano) virt-install: --disk discard= support (Jim Minter) addhardware: Add spiceport UI (Marc-André Lureau) virt-install: --events on_poweroff etc. support (Chen Hanxiao) cli --network portgroup= support and UI support cli --boot initargs= and UI support addhardware: allow setting controller model (Chen Hanxiao) virt-install: support setting hugepage options (Chen Hanxiao)
This commit is contained in:
parent
fceaa983cc
commit
59f1d0859a
@ -1,36 +0,0 @@
|
||||
From 5307267536c7c1f7bf09bae81bff9aec3ee2622a Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Sun, 30 Mar 2014 17:34:26 -0400
|
||||
Subject: [PATCH] gfxdetails: Show port number for active autoport VM (bz
|
||||
1081614)
|
||||
|
||||
(cherry picked from commit 7f802e287c21a6395a0e9f5435c1eab78b2ce6b5)
|
||||
---
|
||||
virtManager/gfxdetails.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
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")
|
@ -1,112 +0,0 @@
|
||||
From 33a602c79792cfdbdc97be4e6c6c9acc04e4ba97 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Mon, 31 Mar 2014 12:43:49 -0400
|
||||
Subject: [PATCH] connection: Hook into domain balloon event (bz 1081424)
|
||||
|
||||
(cherry picked from commit adf3545671b155ca37c82bff0ab96d0c038ffee8)
|
||||
---
|
||||
virtManager/connection.py | 60 +++++++++++++++++++++++++++++++++++------------
|
||||
1 file changed, 45 insertions(+), 15 deletions(-)
|
||||
|
||||
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)
|
@ -1,42 +0,0 @@
|
||||
From 842835b3120d5c0825fa30f7dcc9c4090454c7e2 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Thu, 3 Apr 2014 10:30:37 -0400
|
||||
Subject: [PATCH] details: Fix showing vcpus values in 'customize' dialog (bz
|
||||
1083903)
|
||||
|
||||
(cherry picked from commit ee6a541167b787a84cc5c7e553089cbd5ab9ada3)
|
||||
---
|
||||
virtManager/details.py | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/virtManager/details.py b/virtManager/details.py
|
||||
index c1833ae..ea9d91a 100644
|
||||
--- a/virtManager/details.py
|
||||
+++ b/virtManager/details.py
|
||||
@@ -2533,6 +2533,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()
|
||||
@@ -2550,13 +2556,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)
|
@ -1,308 +0,0 @@
|
||||
From e8e4ad674d537c8531eb665a87dc6d40e6e3dd25 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Thu, 3 Apr 2014 10:53:54 -0400
|
||||
Subject: [PATCH] details: Fix changing graphics type (bz 1083903)
|
||||
|
||||
And clean up the API usage to avoid these types of issues in the future.
|
||||
|
||||
(cherry picked from commit 932e6e00bb08647800a62e59f61c8adee9c5de59)
|
||||
---
|
||||
virtManager/addhardware.py | 8 ++++----
|
||||
virtManager/create.py | 13 ++++++++-----
|
||||
virtManager/createinterface.py | 2 +-
|
||||
virtManager/details.py | 4 ++--
|
||||
virtManager/fsdetails.py | 20 ++++++++++----------
|
||||
virtManager/gfxdetails.py | 4 ++--
|
||||
virtManager/manager.py | 2 +-
|
||||
virtManager/migrate.py | 4 ++--
|
||||
virtManager/netlist.py | 10 ++++------
|
||||
virtManager/storagebrowse.py | 4 ++--
|
||||
virtManager/uiutil.py | 8 +++++---
|
||||
11 files changed, 41 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
|
||||
index c7ee0f0..653fdf5 100644
|
||||
--- a/virtManager/addhardware.py
|
||||
+++ b/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"]
|
||||
diff --git a/virtManager/create.py b/virtManager/create.py
|
||||
index 29f7c92..86f8bd3 100644
|
||||
--- a/virtManager/create.py
|
||||
+++ b/virtManager/create.py
|
||||
@@ -935,8 +935,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")
|
||||
@@ -960,8 +960,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
|
||||
@@ -1142,7 +1144,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
|
||||
diff --git a/virtManager/createinterface.py b/virtManager/createinterface.py
|
||||
index 77fb6e1..809da13 100644
|
||||
--- a/virtManager/createinterface.py
|
||||
+++ b/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()
|
||||
diff --git a/virtManager/details.py b/virtManager/details.py
|
||||
index ea9d91a..10b03ce 100644
|
||||
--- a/virtManager/details.py
|
||||
+++ b/virtManager/details.py
|
||||
@@ -1096,7 +1096,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:
|
||||
@@ -1104,7 +1104,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()
|
||||
diff --git a/virtManager/fsdetails.py b/virtManager/fsdetails.py
|
||||
index f47bd55..ce78912 100644
|
||||
--- a/virtManager/fsdetails.py
|
||||
+++ b/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):
|
||||
diff --git a/virtManager/gfxdetails.py b/virtManager/gfxdetails.py
|
||||
index d6865a8..1fcf643 100644
|
||||
--- a/virtManager/gfxdetails.py
|
||||
+++ b/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
|
||||
diff --git a/virtManager/manager.py b/virtManager/manager.py
|
||||
index 4c99a44..b611e0d 100644
|
||||
--- a/virtManager/manager.py
|
||||
+++ b/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()
|
||||
diff --git a/virtManager/migrate.py b/virtManager/migrate.py
|
||||
index f392737..f5cb86c 100644
|
||||
--- a/virtManager/migrate.py
|
||||
+++ b/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]
|
||||
diff --git a/virtManager/netlist.py b/virtManager/netlist.py
|
||||
index 0e24f4e..01ad2e4 100644
|
||||
--- a/virtManager/netlist.py
|
||||
+++ b/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
|
||||
|
||||
diff --git a/virtManager/storagebrowse.py b/virtManager/storagebrowse.py
|
||||
index 3f61352..30b5c2a 100644
|
||||
--- a/virtManager/storagebrowse.py
|
||||
+++ b/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()
|
||||
diff --git a/virtManager/uiutil.py b/virtManager/uiutil.py
|
||||
index 364aaa7..2ce6c9a 100644
|
||||
--- a/virtManager/uiutil.py
|
||||
+++ b/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():
|
@ -1,49 +0,0 @@
|
||||
From e99370e30b845b4ca645c9ace040f80356264e9e Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Thu, 3 Apr 2014 11:19:03 -0400
|
||||
Subject: [PATCH] createpool: Clarify iscsi IQN fields (bz 1084011)
|
||||
|
||||
(cherry picked from commit 8fa2aad1d31f811bb09505595c6401bdf6b90d78)
|
||||
---
|
||||
ui/createpool.ui | 4 ++--
|
||||
virtManager/createpool.py | 5 +++++
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ui/createpool.ui b/ui/createpool.ui
|
||||
index 5f3972f..21693a9 100644
|
||||
--- a/ui/createpool.ui
|
||||
+++ b/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>
|
||||
diff --git a/virtManager/createpool.py b/virtManager/createpool.py
|
||||
index abc35fb..ae94e35 100644
|
||||
--- a/virtManager/createpool.py
|
||||
+++ b/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,35 +0,0 @@
|
||||
From 5b6694efd7686684272c2d662bde52386ea1dc4f Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed, 16 Apr 2014 12:12:07 -0400
|
||||
Subject: [PATCH] error: Don't log redundant details bits
|
||||
|
||||
(cherry picked from commit 341a453d28e2b8dc97d22cd810d40bffac948af0)
|
||||
---
|
||||
virtManager/error.py | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/virtManager/error.py b/virtManager/error.py
|
||||
index 8a788ce..1f77a1f 100644
|
||||
--- a/virtManager/error.py
|
||||
+++ b/virtManager/error.py
|
||||
@@ -75,14 +75,16 @@ class vmmErrorDialog(vmmGObject):
|
||||
if tb != "None":
|
||||
details += "\n\n" + tb
|
||||
|
||||
+ if debug:
|
||||
+ debugmsg = "error dialog message:\nsummary=%s" % summary
|
||||
+ if details and details != summary:
|
||||
+ debugmsg += "\ndetails=%s" % details
|
||||
+ logging.debug(debugmsg)
|
||||
+
|
||||
# Make sure we have consistent details for error dialogs
|
||||
if (dialog_type == Gtk.MessageType.ERROR and not summary in details):
|
||||
details = summary + "\n\n" + details
|
||||
|
||||
- if debug:
|
||||
- logging.debug("error dialog message:\nsummary=%s\ndetails=%s",
|
||||
- summary, details)
|
||||
-
|
||||
dialog = _errorDialog(parent=self.get_parent(),
|
||||
flags=0,
|
||||
message_type=dialog_type,
|
@ -1,180 +0,0 @@
|
||||
From a9d30657b1865fa6efbced51e744b0450298e48a Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed, 16 Apr 2014 10:32:52 -0400
|
||||
Subject: [PATCH] engine: More work to fix cascading error dialogs
|
||||
|
||||
If a remote network connection stalls, the tick queue becomes backed
|
||||
up while we wait for the hung connection to continue. While this
|
||||
happens, the queue is filled up with other requests to poll the hung
|
||||
connection.
|
||||
|
||||
When the connection finally times out, the tick thread closes the
|
||||
connection via an idle callback. However before that callback gets
|
||||
a chance to run, all the other poll requests for the dead connection
|
||||
are processed, all launching their own error dialog.
|
||||
|
||||
Mark the connection as 'closing' before conn.close is scheduled, and
|
||||
use it to short circuit the tick() routine.
|
||||
|
||||
(cherry picked from commit 1f7604b2413a7a4431703f300fd854489e864c71)
|
||||
---
|
||||
virtManager/connection.py | 46 ++++++++++++++++++++++++++++++++++++++++++--
|
||||
virtManager/engine.py | 49 +++++++++++------------------------------------
|
||||
2 files changed, 55 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/virtManager/connection.py b/virtManager/connection.py
|
||||
index 27d5bd9..ffc2f27 100644
|
||||
--- a/virtManager/connection.py
|
||||
+++ b/virtManager/connection.py
|
||||
@@ -89,6 +89,7 @@ class vmmConnection(vmmGObject):
|
||||
self.connectThread = None
|
||||
self.connectError = None
|
||||
self._backend = virtinst.VirtualConnection(self._uri)
|
||||
+ self._closing = False
|
||||
|
||||
self._caps = None
|
||||
self._caps_xml = None
|
||||
@@ -959,6 +960,10 @@ class vmmConnection(vmmGObject):
|
||||
self.config.set_conn_autoconnect(self.get_uri(), val)
|
||||
|
||||
def close(self):
|
||||
+ if self.state != self.STATE_DISCONNECTED:
|
||||
+ logging.debug("conn.close() uri=%s", self.get_uri())
|
||||
+ self._closing = True
|
||||
+
|
||||
def cleanup(devs):
|
||||
for dev in devs.values():
|
||||
try:
|
||||
@@ -1004,6 +1009,7 @@ class vmmConnection(vmmGObject):
|
||||
self.vms = {}
|
||||
|
||||
self._change_state(self.STATE_DISCONNECTED)
|
||||
+ self._closing = False
|
||||
|
||||
def _cleanup(self):
|
||||
self.close()
|
||||
@@ -1166,7 +1172,43 @@ class vmmConnection(vmmGObject):
|
||||
kwargs["stats_update"] = False
|
||||
self.idle_emit("priority-tick", kwargs)
|
||||
|
||||
- def tick(self, stats_update,
|
||||
+ def tick(self, *args, **kwargs):
|
||||
+ e = None
|
||||
+ try:
|
||||
+ self._tick(*args, **kwargs)
|
||||
+ except KeyboardInterrupt:
|
||||
+ raise
|
||||
+ except Exception, e:
|
||||
+ pass
|
||||
+
|
||||
+ if e is None:
|
||||
+ return
|
||||
+
|
||||
+ from_remote = getattr(libvirt, "VIR_FROM_REMOTE", None)
|
||||
+ from_rpc = getattr(libvirt, "VIR_FROM_RPC", None)
|
||||
+ sys_error = getattr(libvirt, "VIR_ERR_SYSTEM_ERROR", None)
|
||||
+
|
||||
+ dom = -1
|
||||
+ code = -1
|
||||
+ if isinstance(e, libvirt.libvirtError):
|
||||
+ dom = e.get_error_domain()
|
||||
+ code = e.get_error_code()
|
||||
+
|
||||
+ logging.debug("Error polling connection %s",
|
||||
+ self.get_uri(), exc_info=True)
|
||||
+
|
||||
+ if (dom in [from_remote, from_rpc] and
|
||||
+ code in [sys_error]):
|
||||
+ e = None
|
||||
+ logging.debug("Not showing user error since libvirtd "
|
||||
+ "appears to have stopped.")
|
||||
+
|
||||
+ self._closing = True
|
||||
+ self.idle_add(self.close)
|
||||
+ if e:
|
||||
+ raise e # pylint: disable=raising-bad-type
|
||||
+
|
||||
+ def _tick(self, stats_update,
|
||||
pollvm=False, pollnet=False,
|
||||
pollpool=False, polliface=False,
|
||||
pollnodedev=False, pollmedia=False,
|
||||
@@ -1175,7 +1217,7 @@ class vmmConnection(vmmGObject):
|
||||
main update function: polls for new objects, updates stats, ...
|
||||
@force: Perform the requested polling even if async events are in use
|
||||
"""
|
||||
- if self.state != self.STATE_ACTIVE:
|
||||
+ if self.state != self.STATE_ACTIVE or self._closing:
|
||||
return
|
||||
|
||||
if not pollvm:
|
||||
diff --git a/virtManager/engine.py b/virtManager/engine.py
|
||||
index 0e5e15d..e41c829 100644
|
||||
--- a/virtManager/engine.py
|
||||
+++ b/virtManager/engine.py
|
||||
@@ -28,8 +28,8 @@ import logging
|
||||
import re
|
||||
import Queue
|
||||
import threading
|
||||
+import traceback
|
||||
|
||||
-import libvirt
|
||||
from virtinst import util
|
||||
|
||||
from virtManager import packageutils
|
||||
@@ -338,46 +338,19 @@ class vmmEngine(vmmGObject):
|
||||
|
||||
def _handle_tick_queue(self):
|
||||
while True:
|
||||
- ignore1, ignore2, obj, kwargs = self._tick_queue.get()
|
||||
- self._tick_single_conn(obj, kwargs)
|
||||
+ ignore1, ignore2, conn, kwargs = self._tick_queue.get()
|
||||
+ try:
|
||||
+ conn.tick(**kwargs)
|
||||
+ except Exception, e:
|
||||
+ tb = "".join(traceback.format_exc())
|
||||
+ error_msg = (_("Error polling connection '%s': %s")
|
||||
+ % (conn.get_uri(), e))
|
||||
+ self.idle_add(lambda: self.err.show_err(error_msg,
|
||||
+ details=tb))
|
||||
+
|
||||
self._tick_queue.task_done()
|
||||
return 1
|
||||
|
||||
- def _tick_single_conn(self, conn, kwargs):
|
||||
- e = None
|
||||
- try:
|
||||
- conn.tick(**kwargs)
|
||||
- except KeyboardInterrupt:
|
||||
- raise
|
||||
- except Exception, e:
|
||||
- pass
|
||||
-
|
||||
- if e is None:
|
||||
- return
|
||||
-
|
||||
- from_remote = getattr(libvirt, "VIR_FROM_REMOTE", None)
|
||||
- from_rpc = getattr(libvirt, "VIR_FROM_RPC", None)
|
||||
- sys_error = getattr(libvirt, "VIR_ERR_SYSTEM_ERROR", None)
|
||||
-
|
||||
- dom = -1
|
||||
- code = -1
|
||||
- if isinstance(e, libvirt.libvirtError):
|
||||
- dom = e.get_error_domain()
|
||||
- code = e.get_error_code()
|
||||
-
|
||||
- if (dom in [from_remote, from_rpc] and
|
||||
- code in [sys_error]):
|
||||
- logging.exception("Could not refresh connection %s",
|
||||
- conn.get_uri())
|
||||
- logging.debug("Closing connection since libvirtd "
|
||||
- "appears to have stopped")
|
||||
- else:
|
||||
- error_msg = _("Error polling connection '%s': %s") \
|
||||
- % (conn.get_uri(), e)
|
||||
- self.idle_add(lambda: self.err.show_err(error_msg))
|
||||
-
|
||||
- self.idle_add(conn.close)
|
||||
-
|
||||
|
||||
def increment_window_counter(self, src):
|
||||
ignore = src
|
@ -1,25 +0,0 @@
|
||||
From f3d8bec24a5f459d5aab199db309af5d3b5d3d54 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Mon, 21 Apr 2014 16:51:23 -0400
|
||||
Subject: [PATCH] filesystem: Fix target validation when editing device (bz
|
||||
1089422)
|
||||
|
||||
(cherry picked from commit e6a67fc7099ac39257108080c8cbcfcdc6371e56)
|
||||
---
|
||||
virtinst/devicefilesystem.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/virtinst/devicefilesystem.py b/virtinst/devicefilesystem.py
|
||||
index f516fed..28eda74 100644
|
||||
--- a/virtinst/devicefilesystem.py
|
||||
+++ b/virtinst/devicefilesystem.py
|
||||
@@ -100,7 +100,8 @@ class VirtualFilesystem(VirtualDevice):
|
||||
# actually a directory, it is merely a arbitrary string tag
|
||||
# that is exported to the guest as a hint for where to mount
|
||||
if (self.conn.is_qemu() and
|
||||
- (self.type == self.TYPE_DEFAULT or
|
||||
+ (self.type is None or
|
||||
+ self.type == self.TYPE_DEFAULT or
|
||||
self.type == self.TYPE_MOUNT)):
|
||||
pass
|
||||
elif not os.path.isabs(val):
|
@ -1,227 +0,0 @@
|
||||
From b52f1f0eb36a347971cb380f13044b549a92b9c4 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Mon, 21 Apr 2014 17:04:33 -0400
|
||||
Subject: [PATCH] details: Explicit warn that 'format' doesn't change image
|
||||
format (bz 1089457)
|
||||
|
||||
(cherry picked from commit 70da20682c9aba1e2bc738b19dfc6bb714d38496)
|
||||
---
|
||||
ui/details.ui | 104 +++++++++++++++++++++++++++++++++++++------------
|
||||
virtManager/details.py | 7 +++-
|
||||
2 files changed, 85 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/ui/details.ui b/ui/details.ui
|
||||
index 044654d..92de903 100644
|
||||
--- a/ui/details.ui
|
||||
+++ b/ui/details.ui
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
-<!-- Generated with glade 3.16.0 on Mon Feb 24 22:09:46 2014 -->
|
||||
+<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
- <!-- interface-requires gtk+ 3.0 -->
|
||||
+ <requires lib="gtk+" version="3.0"/>
|
||||
<object class="GtkAccelGroup" id="accelgroup1"/>
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
<property name="lower">1</property>
|
||||
@@ -1919,12 +1919,12 @@
|
||||
<property name="climb_rate">1</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="update_policy">if-valid</property>
|
||||
+ <signal name="changed" handler="on_config_vcpus_changed" swapped="no"/>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="config-vcpus-atkobject">
|
||||
<property name="AtkObject::accessible-name" translatable="yes">Virtual CPU Select</property>
|
||||
</object>
|
||||
</child>
|
||||
- <signal name="changed" handler="on_config_vcpus_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@@ -2319,12 +2319,12 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
+ <signal name="changed" handler="on_config_vcpupin_changed" swapped="no"/>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="config-vcpupin-atkobject">
|
||||
<property name="AtkObject::accessible-name" translatable="yes">Virtual CPU Affinity Select</property>
|
||||
</object>
|
||||
</child>
|
||||
- <signal name="changed" handler="on_config_vcpupin_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -2553,12 +2553,12 @@
|
||||
<property name="climb_rate">2</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="update_policy">if-valid</property>
|
||||
+ <signal name="changed" handler="on_config_memory_changed" swapped="no"/>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="config-memory-atkobject">
|
||||
<property name="AtkObject::accessible-name" translatable="yes">Memory Select</property>
|
||||
</object>
|
||||
</child>
|
||||
- <signal name="changed" handler="on_config_memory_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -2602,12 +2602,12 @@
|
||||
<property name="climb_rate">2</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="update_policy">if-valid</property>
|
||||
+ <signal name="changed" handler="on_config_maxmem_changed" swapped="no"/>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="config-maxmem-atkobject">
|
||||
<property name="AtkObject::accessible-name" translatable="yes">Max Memory Select</property>
|
||||
</object>
|
||||
</child>
|
||||
- <signal name="changed" handler="on_config_maxmem_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -3517,6 +3517,8 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
+ <property name="yalign">0</property>
|
||||
+ <property name="ypad">4</property>
|
||||
<property name="label" translatable="yes">Storage forma_t:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
@@ -3558,25 +3560,6 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
- <object class="GtkComboBox" id="disk-format">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <property name="has_entry">True</property>
|
||||
- <signal name="changed" handler="on_disk_format_changed" swapped="no"/>
|
||||
- <child internal-child="entry">
|
||||
- <object class="GtkEntry" id="combobox-entry9">
|
||||
- <property name="can_focus">True</property>
|
||||
- </object>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left_attach">1</property>
|
||||
- <property name="top_attach">2</property>
|
||||
- <property name="width">1</property>
|
||||
- <property name="height">1</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
<object class="GtkComboBox" id="disk-bus">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
@@ -3610,6 +3593,77 @@
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
+ <child>
|
||||
+ <object class="GtkBox" id="box15">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="orientation">vertical</property>
|
||||
+ <property name="spacing">6</property>
|
||||
+ <child>
|
||||
+ <object class="GtkComboBox" id="disk-format">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="has_entry">True</property>
|
||||
+ <signal name="changed" handler="on_disk_format_changed" swapped="no"/>
|
||||
+ <child internal-child="entry">
|
||||
+ <object class="GtkEntry" id="combobox-entry9">
|
||||
+ <property name="can_focus">True</property>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkBox" id="disk-format-warn">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="spacing">3</property>
|
||||
+ <child>
|
||||
+ <object class="GtkImage" id="image2">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="stock">gtk-dialog-warning</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel" id="label34">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes"><small>Changing this will not change the disk image format, it only tells libvirt about the existing image format. </small></property>
|
||||
+ <property name="use_markup">True</property>
|
||||
+ <property name="wrap">True</property>
|
||||
+ <property name="max_width_chars">30</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">False</property>
|
||||
+ <property name="position">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">1</property>
|
||||
+ <property name="top_attach">2</property>
|
||||
+ <property name="width">1</property>
|
||||
+ <property name="height">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
diff --git a/virtManager/details.py b/virtManager/details.py
|
||||
index 10b03ce..1bb57d5 100644
|
||||
--- a/virtManager/details.py
|
||||
+++ b/virtManager/details.py
|
||||
@@ -625,7 +625,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
"on_disk_cache_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_CACHE),
|
||||
"on_disk_io_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_IO),
|
||||
"on_disk_bus_combo_changed": lambda *x: self.enable_apply(x, EDIT_DISK_BUS),
|
||||
- "on_disk_format_changed": lambda *x: self.enable_apply(x, EDIT_DISK_FORMAT),
|
||||
+ "on_disk_format_changed": self.disk_format_changed,
|
||||
"on_disk_serial_changed": lambda *x: self.enable_apply(x, EDIT_DISK_SERIAL),
|
||||
"on_disk_iotune_changed": self.iotune_changed,
|
||||
|
||||
@@ -1787,6 +1787,10 @@ class vmmDetails(vmmGObjectUI):
|
||||
boot_list.get_selection().emit("changed")
|
||||
self.enable_apply(EDIT_BOOTORDER)
|
||||
|
||||
+ def disk_format_changed(self, ignore):
|
||||
+ self.widget("disk-format-warn").show()
|
||||
+ self.enable_apply(EDIT_DISK_FORMAT)
|
||||
+
|
||||
# IO Tuning
|
||||
def iotune_changed(self, ignore):
|
||||
iotune_rbs = int(self.get_text("disk-iotune-rbs") or 0)
|
||||
@@ -2682,6 +2686,7 @@ class vmmDetails(vmmGObjectUI):
|
||||
|
||||
self.widget("disk-format").set_sensitive(show_format)
|
||||
self.widget("disk-format").get_child().set_text(driver_type)
|
||||
+ self.widget("disk-format-warn").hide()
|
||||
|
||||
no_default = not self.is_customize_dialog
|
||||
|
@ -1,26 +0,0 @@
|
||||
From c8cb642b0f7069e0eb803d6e0c4d8a44df0c57d2 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Tue, 29 Apr 2014 13:26:26 -0400
|
||||
Subject: [PATCH] snapshots: Fix screenshot with qxl+spice (bz 1089780)
|
||||
|
||||
(cherry picked from commit 2272166844f84943342fc097af927a09737ee57f)
|
||||
---
|
||||
virtManager/snapshots.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/virtManager/snapshots.py b/virtManager/snapshots.py
|
||||
index 6d4d9ac..56fdc81 100644
|
||||
--- a/virtManager/snapshots.py
|
||||
+++ b/virtManager/snapshots.py
|
||||
@@ -379,6 +379,11 @@ class vmmSnapshotPage(vmmGObjectUI):
|
||||
return
|
||||
|
||||
try:
|
||||
+ # Perform two screenshots, because qemu + qxl has a bug where
|
||||
+ # screenshot generally only shows the data from the previous
|
||||
+ # screenshot request:
|
||||
+ # https://bugs.launchpad.net/qemu/+bug/1314293
|
||||
+ self._take_screenshot()
|
||||
mime, sdata = self._take_screenshot()
|
||||
except:
|
||||
logging.exception("Error taking screenshot")
|
@ -1,34 +0,0 @@
|
||||
From ca6d90b3d6d759e407855dfd4ba869c4f85542d3 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Tue, 29 Apr 2014 14:09:14 -0400
|
||||
Subject: [PATCH] Fix using storage when the directory name contains whitespace
|
||||
(bz 1091384)
|
||||
|
||||
(cherry picked from commit feadd98fed045ec40d5d5cf8250c7b05517eb9c9)
|
||||
---
|
||||
virtinst/diskbackend.py | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py
|
||||
index 370996c..3d5aed8 100644
|
||||
--- a/virtinst/diskbackend.py
|
||||
+++ b/virtinst/diskbackend.py
|
||||
@@ -137,13 +137,14 @@ def manage_path(conn, path):
|
||||
return vol, pool, path_is_pool
|
||||
|
||||
dirname = os.path.dirname(path)
|
||||
- poolname = StoragePool.find_free_name(
|
||||
- conn, os.path.basename(dirname) or "pool")
|
||||
+ poolname = os.path.basename(dirname).replace(" ", "_")
|
||||
+ if not poolname:
|
||||
+ poolname = "dirpool"
|
||||
+ poolname = StoragePool.find_free_name(conn, poolname)
|
||||
logging.debug("Attempting to build pool=%s target=%s", poolname, dirname)
|
||||
|
||||
poolxml = StoragePool(conn)
|
||||
- poolxml.name = poolxml.find_free_name(
|
||||
- conn, os.path.basename(dirname) or "dirpool")
|
||||
+ poolxml.name = poolname
|
||||
poolxml.type = poolxml.TYPE_DIR
|
||||
poolxml.target_path = dirname
|
||||
pool = poolxml.install(build=False, create=True, autostart=True)
|
@ -1,46 +0,0 @@
|
||||
From aa9a8aedfbbca635eb34f168b8e04ba9730584f5 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Tue, 29 Apr 2014 14:34:31 -0400
|
||||
Subject: [PATCH] packageutils: Fix install when one package is already
|
||||
installed (bz 1090181)
|
||||
|
||||
(cherry picked from commit 15449eb12601ec1b88aa6d8ee52986ef5ab41ae2)
|
||||
---
|
||||
virtManager/packageutils.py | 17 ++++++++++++++++-
|
||||
1 file changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/virtManager/packageutils.py b/virtManager/packageutils.py
|
||||
index 34478b7..bb84f45 100644
|
||||
--- a/virtManager/packageutils.py
|
||||
+++ b/virtManager/packageutils.py
|
||||
@@ -53,7 +53,12 @@ def check_packagekit(parent, errbox, packages):
|
||||
return
|
||||
|
||||
try:
|
||||
- packagekit_install(parent, packages)
|
||||
+ for package in packages[:]:
|
||||
+ if packagekit_isinstalled(package):
|
||||
+ packages.remove(package)
|
||||
+
|
||||
+ if packages:
|
||||
+ packagekit_install(parent, packages)
|
||||
except Exception, e:
|
||||
# PackageKit frontend should report an error for us, so just log
|
||||
# the actual error
|
||||
@@ -63,6 +68,16 @@ def check_packagekit(parent, errbox, packages):
|
||||
return True
|
||||
|
||||
|
||||
+def packagekit_isinstalled(package):
|
||||
+ bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
|
||||
+ pk_control = Gio.DBusProxy.new_sync(bus, 0, None,
|
||||
+ "org.freedesktop.PackageKit",
|
||||
+ "/org/freedesktop/PackageKit",
|
||||
+ "org.freedesktop.PackageKit.Query", None)
|
||||
+
|
||||
+ return pk_control.IsInstalled("(ss)", package, "")
|
||||
+
|
||||
+
|
||||
def packagekit_install(parent, package_list):
|
||||
bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
|
||||
pk_control = Gio.DBusProxy.new_sync(bus, 0, None,
|
2
sources
2
sources
@ -1 +1 @@
|
||||
4741c0d93d69cef5f936b2ea2d8348c5 virt-manager-1.0.1.tar.gz
|
||||
baf6eaa88b02bdd7a3c2fdd293eeb6ac virt-manager-1.1.0.tar.gz
|
||||
|
@ -19,10 +19,6 @@
|
||||
# End local config
|
||||
|
||||
|
||||
%define _version 1.0.1
|
||||
%define _release 3
|
||||
|
||||
|
||||
# This macro is used for the continuous automated builds. It just
|
||||
# allows an extra fragment based on the timestamp to be appended
|
||||
# to the release. This distinguishes automated builds, from formal
|
||||
@ -30,8 +26,8 @@
|
||||
%define _extra_release %{?dist:%{dist}}%{?extra_release:%{extra_release}}
|
||||
|
||||
Name: virt-manager
|
||||
Version: %{_version}
|
||||
Release: %{_release}%{_extra_release}.1
|
||||
Version: 1.1.0
|
||||
Release: 1%{_extra_release}
|
||||
%define verrel %{version}-%{release}
|
||||
|
||||
Summary: Virtual Machine Manager
|
||||
@ -39,33 +35,6 @@ Group: Applications/Emulators
|
||||
License: GPLv2+
|
||||
URL: http://virt-manager.org/
|
||||
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
|
||||
|
||||
# gfxdetails: Show port number for active autoport VM (bz #1081614)
|
||||
Patch0001: 0001-gfxdetails-Show-port-number-for-active-autoport-VM-b.patch
|
||||
# connection: Hook into domain balloon event (bz #1081424)
|
||||
Patch0002: 0002-connection-Hook-into-domain-balloon-event-bz-1081424.patch
|
||||
# details: Fix showing vcpus values in 'customize' dialog (bz #1083903)
|
||||
Patch0003: 0003-details-Fix-showing-vcpus-values-in-customize-dialog.patch
|
||||
# details: Fix changing graphics type (bz #1083903)
|
||||
Patch0004: 0004-details-Fix-changing-graphics-type-bz-1083903.patch
|
||||
# createpool: Clarify iscsi IQN fields (bz #1084011)
|
||||
Patch0005: 0005-createpool-Clarify-iscsi-IQN-fields-bz-1084011.patch
|
||||
# More fixes for errors on libvirtd disconnect (bz #1069351)
|
||||
Patch0006: 0006-error-Don-t-log-redundant-details-bits.patch
|
||||
Patch0007: 0007-engine-More-work-to-fix-cascading-error-dialogs.patch
|
||||
# filesystem: Fix target validation when editing device (bz #1089422)
|
||||
Patch0008: 0008-filesystem-Fix-target-validation-when-editing-device.patch
|
||||
# details: Explicit warn that 'format' doesn't change image format (bz
|
||||
# #1089457)
|
||||
Patch0009: 0009-details-Explicit-warn-that-format-doesn-t-change-ima.patch
|
||||
# snapshots: Fix screenshot with qxl+spice (bz #1089780)
|
||||
Patch0010: 0010-snapshots-Fix-screenshot-with-qxl-spice-bz-1089780.patch
|
||||
# Fix using storage when the directory name contains whitespace (bz
|
||||
# #1091384)
|
||||
Patch0011: 0011-Fix-using-storage-when-the-directory-name-contains-w.patch
|
||||
# packageutils: Fix install when one package is already installed (bz
|
||||
# #1090181)
|
||||
Patch0012: 0012-packageutils-Fix-install-when-one-package-is-already.patch
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
@ -77,6 +46,7 @@ Requires: libxml2-python
|
||||
Requires: vte3
|
||||
Requires: dconf
|
||||
Requires: dbus-x11
|
||||
Requires: libosinfo >= 0.2.10
|
||||
|
||||
# For console widget
|
||||
Requires: gtk-vnc2
|
||||
@ -118,7 +88,6 @@ Requires: virt-manager-common = %{verrel}
|
||||
|
||||
Provides: virt-install
|
||||
Provides: virt-clone
|
||||
Provides: virt-image
|
||||
Provides: virt-convert
|
||||
Provides: virt-xml
|
||||
Obsoletes: python-virtinst
|
||||
@ -132,33 +101,6 @@ machine).
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
# gfxdetails: Show port number for active autoport VM (bz #1081614)
|
||||
%patch0001 -p1
|
||||
# connection: Hook into domain balloon event (bz #1081424)
|
||||
%patch0002 -p1
|
||||
# details: Fix showing vcpus values in 'customize' dialog (bz #1083903)
|
||||
%patch0003 -p1
|
||||
# details: Fix changing graphics type (bz #1083903)
|
||||
%patch0004 -p1
|
||||
# createpool: Clarify iscsi IQN fields (bz #1084011)
|
||||
%patch0005 -p1
|
||||
# More fixes for errors on libvirtd disconnect (bz #1069351)
|
||||
%patch0006 -p1
|
||||
%patch0007 -p1
|
||||
# filesystem: Fix target validation when editing device (bz #1089422)
|
||||
%patch0008 -p1
|
||||
# details: Explicit warn that 'format' doesn't change image format (bz
|
||||
# #1089457)
|
||||
%patch0009 -p1
|
||||
# snapshots: Fix screenshot with qxl+spice (bz #1089780)
|
||||
%patch0010 -p1
|
||||
# Fix using storage when the directory name contains whitespace (bz
|
||||
# #1091384)
|
||||
%patch0011 -p1
|
||||
# packageutils: Fix install when one package is already installed (bz
|
||||
# #1090181)
|
||||
%patch0012 -p1
|
||||
|
||||
%build
|
||||
%if %{qemu_user}
|
||||
%define _qemu_user --qemu-user=%{qemu_user}
|
||||
@ -250,23 +192,39 @@ fi
|
||||
%{_mandir}/man1/virt-clone.1*
|
||||
%{_mandir}/man1/virt-convert.1*
|
||||
%{_mandir}/man1/virt-xml.1*
|
||||
%{_mandir}/man1/virt-image.1*
|
||||
%{_mandir}/man5/virt-image.5*
|
||||
|
||||
%{_datadir}/%{name}/virt-install
|
||||
%{_datadir}/%{name}/virt-clone
|
||||
%{_datadir}/%{name}/virt-image
|
||||
%{_datadir}/%{name}/virt-convert
|
||||
%{_datadir}/%{name}/virt-xml
|
||||
|
||||
%{_bindir}/virt-install
|
||||
%{_bindir}/virt-clone
|
||||
%{_bindir}/virt-image
|
||||
%{_bindir}/virt-convert
|
||||
%{_bindir}/virt-xml
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Sep 07 2014 Cole Robinson <crobinso@redhat.com> - 1.1.0-1
|
||||
- Rebased to version 1.1.0
|
||||
- Switch to libosinfo as OS metadata database (Giuseppe Scrivano)
|
||||
- Use libosinfo for OS detection from CDROM media labels (Giuseppe
|
||||
Scrivano)
|
||||
- Use libosinfo for improved OS defaults, like recommended disk size
|
||||
(Giuseppe Scrivano)
|
||||
- virt-image tool has been removed, as previously announced
|
||||
- Enable Hyper-V enlightenments for Windows VMs
|
||||
- Revert virtio-console default, back to plain serial console
|
||||
- Experimental q35 option in new VM 'customize' dialog
|
||||
- UI for virtual network QoS settings (Giuseppe Scrivano)
|
||||
- virt-install: --disk discard= support (Jim Minter)
|
||||
- addhardware: Add spiceport UI (Marc-André Lureau)
|
||||
- virt-install: --events on_poweroff etc. support (Chen Hanxiao)
|
||||
- cli --network portgroup= support and UI support
|
||||
- cli --boot initargs= and UI support
|
||||
- addhardware: allow setting controller model (Chen Hanxiao)
|
||||
- virt-install: support setting hugepage options (Chen Hanxiao)
|
||||
|
||||
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user