mirror of
https://src.fedoraproject.org/rpms/virt-manager.git
synced 2025-07-16 09:04:55 +00:00
- Update to version 0.8.4
- 'Import' install option, to create a VM around an existing OS image - Support multiple boot devices and boot order - Watchdog device support - Enable setting a human readable VM description. - Option to manually specifying a bridge name, if bridge isn't detected
This commit is contained in:
@@ -1 +1 @@
|
||||
virt-manager-0.8.3.tar.gz
|
||||
virt-manager-0.8.4.tar.gz
|
||||
|
2
sources
2
sources
@@ -1 +1 @@
|
||||
2994055bd83b7fe621f0258089e171f4 virt-manager-0.8.3.tar.gz
|
||||
133723a0495b79669b0903533d4a4671 virt-manager-0.8.4.tar.gz
|
||||
|
@@ -1,921 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1265909520 18000
|
||||
# Node ID 2a65e0b160a98b1969484ff61a8dcafc66f508d2
|
||||
# Parent 40fb60222e4e1cc6a03942bbcfb9d2e727236410
|
||||
Make sure all idle and timeout routines are thread safe.
|
||||
|
||||
Unbeknownst to me, these functions are not run thread safe:
|
||||
|
||||
http://library.gnome.org/devel/gdk/unstable/gdk-Threads.html
|
||||
|
||||
However since they are run from the main loop, the chance of them conflicting
|
||||
with another running thread is slim, since we have very few threads that
|
||||
actually update the UI.
|
||||
|
||||
diff -r 40fb60222e4e -r 2a65e0b160a9 src/virtManager/connection.py
|
||||
--- a/src/virtManager/connection.py Thu Feb 11 09:32:05 2010 -0500
|
||||
+++ b/src/virtManager/connection.py Thu Feb 11 12:32:00 2010 -0500
|
||||
@@ -988,8 +988,8 @@
|
||||
self.vms.keys())
|
||||
|
||||
if self.state == self.STATE_DISCONNECTED:
|
||||
- gobject.idle_add(util.idle_emit, self, "connect-error",
|
||||
- self.connectError)
|
||||
+ util.safe_idle_add(util.idle_emit, self, "connect-error",
|
||||
+ self.connectError)
|
||||
self.connectError = None
|
||||
finally:
|
||||
self.connectThreadEvent.set()
|
||||
@@ -1445,7 +1445,7 @@
|
||||
for name in newNodedevs:
|
||||
self.emit("nodedev-added", self.uri, name)
|
||||
|
||||
- gobject.idle_add(tick_send_signals)
|
||||
+ util.safe_idle_add(tick_send_signals)
|
||||
|
||||
# Finally, we sample each domain
|
||||
now = time()
|
||||
@@ -1468,7 +1468,7 @@
|
||||
if not noStatsUpdate:
|
||||
self._recalculate_stats(now)
|
||||
|
||||
- gobject.idle_add(util.idle_emit, self, "resources-sampled")
|
||||
+ util.safe_idle_add(util.idle_emit, self, "resources-sampled")
|
||||
|
||||
return 1
|
||||
|
||||
diff -r 40fb60222e4e -r 2a65e0b160a9 src/virtManager/console.py
|
||||
--- a/src/virtManager/console.py Thu Feb 11 09:32:05 2010 -0500
|
||||
+++ b/src/virtManager/console.py Thu Feb 11 12:32:00 2010 -0500
|
||||
@@ -477,7 +478,7 @@
|
||||
logging.error("Too many connection failures, not retrying again")
|
||||
return
|
||||
logging.warn("Retrying connection in %d ms", self.vncViewerRetryDelay)
|
||||
- gobject.timeout_add(self.vncViewerRetryDelay, self.retry_login)
|
||||
+ util.safe_timeout_add(self.vncViewerRetryDelay, self.retry_login)
|
||||
if self.vncViewerRetryDelay < 2000:
|
||||
self.vncViewerRetryDelay = self.vncViewerRetryDelay * 2
|
||||
|
||||
@@ -489,12 +490,8 @@
|
||||
libvirt.VIR_DOMAIN_CRASHED ]:
|
||||
return
|
||||
|
||||
- gtk.gdk.threads_enter()
|
||||
- try:
|
||||
- self.try_login()
|
||||
- return
|
||||
- finally:
|
||||
- gtk.gdk.threads_leave()
|
||||
+ self.try_login()
|
||||
+ return
|
||||
|
||||
def open_tunnel(self, server, vncaddr, vncport, username, sshport):
|
||||
if self.vncTunnel is not None:
|
||||
@@ -676,7 +673,7 @@
|
||||
|
||||
def unset_cb(src):
|
||||
src.queue_resize_no_redraw()
|
||||
- gobject.idle_add(restore_scroll, src)
|
||||
+ util.safe_idle_add(restore_scroll, src)
|
||||
return False
|
||||
|
||||
def request_cb(src, req):
|
||||
@@ -686,7 +683,7 @@
|
||||
|
||||
src.disconnect(signal_id)
|
||||
|
||||
- gobject.idle_add(unset_cb, widget)
|
||||
+ util.safe_idle_add(unset_cb, widget)
|
||||
return False
|
||||
|
||||
# Disable scroll bars while we resize, since resizing to the VM's
|
||||
diff -r 40fb60222e4e -r 2a65e0b160a9 src/virtManager/create.py
|
||||
--- a/src/virtManager/create.py Thu Feb 11 09:32:05 2010 -0500
|
||||
+++ b/src/virtManager/create.py Thu Feb 11 12:32:00 2010 -0500
|
||||
@@ -349,7 +349,7 @@
|
||||
|
||||
# Storage
|
||||
if not self.host_storage_timer:
|
||||
- self.host_storage_timer = gobject.timeout_add(3 * 1000,
|
||||
+ self.host_storage_timer = util.safe_timeout_add(3 * 1000,
|
||||
self.host_space_tick)
|
||||
self.window.get_widget("enable-storage").set_active(True)
|
||||
self.window.get_widget("config-storage-create").set_active(True)
|
||||
diff -r 40fb60222e4e -r 2a65e0b160a9 src/virtManager/domain.py
|
||||
--- a/src/virtManager/domain.py Thu Feb 11 09:32:05 2010 -0500
|
||||
+++ b/src/virtManager/domain.py Thu Feb 11 12:32:00 2010 -0500
|
||||
@@ -1357,7 +1357,7 @@
|
||||
if origxml != self._xml:
|
||||
# 'tick' to make sure we have the latest time
|
||||
self.tick(time.time())
|
||||
- gobject.idle_add(util.idle_emit, self, "config-changed")
|
||||
+ util.safe_idle_add(util.idle_emit, self, "config-changed")
|
||||
|
||||
def _redefine(self, xml_func, *args):
|
||||
"""
|
||||
@@ -1848,7 +1848,7 @@
|
||||
self._startup_vcpus = None
|
||||
self.vcpu_max_count()
|
||||
self.lastStatus = status
|
||||
- gobject.idle_add(util.idle_emit, self, "status-changed", status)
|
||||
+ util.safe_idle_add(util.idle_emit, self, "status-changed", status)
|
||||
|
||||
|
||||
def tick(self, now):
|
||||
@@ -1917,7 +1917,7 @@
|
||||
|
||||
self.record.insert(0, newStats)
|
||||
self._update_status(info[0])
|
||||
- gobject.idle_add(util.idle_emit, self, "resources-sampled")
|
||||
+ util.safe_idle_add(util.idle_emit, self, "resources-sampled")
|
||||
|
||||
|
||||
class vmmDomainVirtinst(vmmDomainBase):
|
||||
diff -r 40fb60222e4e -r 2a65e0b160a9 src/virtManager/engine.py
|
||||
--- a/src/virtManager/engine.py Thu Feb 11 09:32:05 2010 -0500
|
||||
+++ b/src/virtManager/engine.py Thu Feb 11 12:32:00 2010 -0500
|
||||
@@ -191,6 +191,8 @@
|
||||
gobject.source_remove(self.timer)
|
||||
self.timer = None
|
||||
|
||||
+ # No need to use 'safe_timeout_add', the tick should be
|
||||
+ # manually made thread safe
|
||||
self.timer = gobject.timeout_add(interval, self.tick)
|
||||
|
||||
def tick(self):
|
||||
@@ -205,7 +207,7 @@
|
||||
|
||||
self._tick_thread = threading.Thread(name="Tick thread",
|
||||
target=self._tick, args=())
|
||||
- self._tick_thread.daemon = False
|
||||
+ self._tick_thread.daemon = True
|
||||
self._tick_thread.start()
|
||||
return 1
|
||||
|
||||
@@ -221,7 +223,7 @@
|
||||
logging.exception("Could not refresh connection %s." % uri)
|
||||
logging.debug("Closing connection since libvirtd "
|
||||
"appears to have stopped.")
|
||||
- gobject.idle_add(conn.close)
|
||||
+ util.safe_idle_add(conn.close)
|
||||
else:
|
||||
raise
|
||||
return 1
|
||||
diff -r 40fb60222e4e -r 2a65e0b160a9 src/virtManager/mediadev.py
|
||||
--- a/src/virtManager/mediadev.py Thu Feb 11 09:32:05 2010 -0500
|
||||
+++ b/src/virtManager/mediadev.py Thu Feb 11 12:32:00 2010 -0500
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
import virtinst
|
||||
|
||||
+from virtManager import util
|
||||
+
|
||||
MEDIA_FLOPPY = "floppy"
|
||||
MEDIA_CDROM = "cdrom"
|
||||
|
||||
@@ -136,8 +138,8 @@
|
||||
if self.poll_signal:
|
||||
return
|
||||
|
||||
- self.poll_signal = gobject.timeout_add(MEDIA_TIMEOUT * 1000,
|
||||
- self._poll_for_media)
|
||||
+ self.poll_signal = util.safe_timeout_add(MEDIA_TIMEOUT * 1000,
|
||||
+ self._poll_for_media)
|
||||
|
||||
def disable_poll_for_media(self):
|
||||
self.poll_signal = None
|
||||
diff -r 40fb60222e4e -r 2a65e0b160a9 src/virtManager/util.py
|
||||
--- a/src/virtManager/util.py Thu Feb 11 09:32:05 2010 -0500
|
||||
+++ b/src/virtManager/util.py Thu Feb 11 12:32:00 2010 -0500
|
||||
@@ -18,12 +18,14 @@
|
||||
# MA 02110-1301 USA.
|
||||
#
|
||||
|
||||
-import logging
|
||||
import gtk
|
||||
-import libxml2
|
||||
-import os.path
|
||||
+import gobject
|
||||
|
||||
import libvirt
|
||||
+import libxml2
|
||||
+
|
||||
+import logging
|
||||
+import os.path
|
||||
|
||||
import virtManager
|
||||
import virtinst
|
||||
@@ -245,6 +247,25 @@
|
||||
self.emit(signal, *args)
|
||||
return False
|
||||
|
||||
+def _safe_wrapper(func, *args):
|
||||
+ gtk.gdk.threads_enter()
|
||||
+ try:
|
||||
+ func(*args)
|
||||
+ finally:
|
||||
+ gtk.gdk.threads_leave()
|
||||
+
|
||||
+def safe_idle_add(func, *args):
|
||||
+ """
|
||||
+ Make sure idle functions are run thread safe
|
||||
+ """
|
||||
+ return gobject.idle_add(_safe_wrapper, func, *args)
|
||||
+
|
||||
+def safe_timeout_add(timeout, func, *args):
|
||||
+ """
|
||||
+ Make sure timeout functions are run thread safe
|
||||
+ """
|
||||
+ return gobject.timeout_add(timeout, _safe_wrapper, func, *args)
|
||||
+
|
||||
def uuidstr(rawuuid):
|
||||
hx = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']
|
||||
uuid = []
|
||||
diff -rup virt-manager-0.8.3/src/virtManager/connection.py new/src/virtManager/connection.py
|
||||
--- virt-manager-0.8.3/src/virtManager/connection.py 2010-03-22 10:17:19.000000000 -0400
|
||||
+++ new/src/virtManager/connection.py 2010-03-22 10:18:23.000000000 -0400
|
||||
@@ -935,14 +935,14 @@ class vmmConnection(gobject.GObject):
|
||||
# We want to kill off this thread asap, so schedule a gobject
|
||||
# idle even to inform the UI of result
|
||||
logging.debug("Background open thread complete, scheduling notify")
|
||||
- gobject.idle_add(self._open_notify)
|
||||
+ util.safe_idle_add(self._open_notify)
|
||||
self.connectThread = None
|
||||
|
||||
def _open_notify(self):
|
||||
logging.debug("Notifying open result")
|
||||
|
||||
try:
|
||||
- gobject.idle_add(util.idle_emit, self, "state-changed")
|
||||
+ util.safe_idle_add(util.idle_emit, self, "state-changed")
|
||||
|
||||
if self.state == self.STATE_ACTIVE:
|
||||
logging.debug("%s capabilities:\n%s" %
|
||||
diff -rup virt-manager-0.8.3/src/virtManager/console.py new/src/virtManager/console.py
|
||||
--- virt-manager-0.8.3/src/virtManager/console.py 2010-03-22 10:17:19.000000000 -0400
|
||||
+++ new/src/virtManager/console.py 2010-03-22 10:18:58.000000000 -0400
|
||||
@@ -30,6 +30,7 @@ import gtkvnc
|
||||
import os
|
||||
import socket
|
||||
|
||||
+from virtManager import util
|
||||
from virtManager.error import vmmErrorDialog
|
||||
|
||||
# Console pages
|
||||
diff -rup abc/src/virtManager/asyncjob.py virt-manager-0.8.3/src/virtManager/asyncjob.py
|
||||
--- abc/src/virtManager/asyncjob.py 2010-03-21 22:43:09.000000000 -0400
|
||||
+++ virt-manager-0.8.3/src/virtManager/asyncjob.py 2010-03-21 22:44:22.000000000 -0400
|
||||
@@ -25,25 +25,31 @@ import gtk.gdk
|
||||
import gtk.glade
|
||||
import gobject
|
||||
|
||||
-# Displays a progress bar while executing the "callback" method.
|
||||
+from virtManager import util
|
||||
|
||||
-class vmmAsyncJob(gobject.GObject):
|
||||
- # This thin wrapper only exists so we can put debugging
|
||||
- # code in the run() method every now & then
|
||||
- class asyncJobWorker(threading.Thread):
|
||||
- def __init__(self, callback, args):
|
||||
- threading.Thread.__init__(self, target=callback, args=args)
|
||||
+# This thin wrapper only exists so we can put debugging
|
||||
+# code in the run() method every now & then
|
||||
+class asyncJobWorker(threading.Thread):
|
||||
+ def __init__(self, callback, args):
|
||||
+ threading.Thread.__init__(self, target=callback, args=args)
|
||||
+
|
||||
+ def run(self):
|
||||
+ threading.Thread.run(self)
|
||||
|
||||
- def run(self):
|
||||
- threading.Thread.run(self)
|
||||
+# Displays a progress bar while executing the "callback" method.
|
||||
+class vmmAsyncJob(gobject.GObject):
|
||||
|
||||
def __init__(self, config, callback, args=None,
|
||||
text=_("Please wait a few moments..."),
|
||||
- title=_("Operation in progress")):
|
||||
+ title=_("Operation in progress"),
|
||||
+ run_main=True):
|
||||
self.__gobject_init__()
|
||||
self.config = config
|
||||
+ self.run_main = bool(run_main)
|
||||
|
||||
- self.window = gtk.glade.XML(config.get_glade_dir() + "/vmm-progress.glade", "vmm-progress", domain="virt-manager")
|
||||
+ self.window = gtk.glade.XML(config.get_glade_dir() + \
|
||||
+ "/vmm-progress.glade",
|
||||
+ "vmm-progress", domain="virt-manager")
|
||||
self.window.get_widget("pbar-text").set_text(text)
|
||||
|
||||
self.topwin = self.window.get_widget("vmm-progress")
|
||||
@@ -52,20 +58,27 @@ class vmmAsyncJob(gobject.GObject):
|
||||
|
||||
# Callback sets this if there is an error
|
||||
self._error_info = None
|
||||
+ self._data = None
|
||||
+
|
||||
self.stage = self.window.get_widget("pbar-stage")
|
||||
self.pbar = self.window.get_widget("pbar")
|
||||
|
||||
args.append(self)
|
||||
- self.bg_thread = vmmAsyncJob.asyncJobWorker(callback, args)
|
||||
+ self.bg_thread = asyncJobWorker(callback, args)
|
||||
self.bg_thread.setDaemon(True)
|
||||
self.is_pulsing = True
|
||||
|
||||
def run(self):
|
||||
- timer = gobject.timeout_add (100, self.exit_if_necessary)
|
||||
+ timer = gobject.timeout_add(100, self.exit_if_necessary)
|
||||
self.topwin.present()
|
||||
self.topwin.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
|
||||
- self.bg_thread.start()
|
||||
- gtk.main()
|
||||
+
|
||||
+ if self.run_main:
|
||||
+ self.bg_thread.start()
|
||||
+ gtk.main()
|
||||
+ else:
|
||||
+ self.bg_thread.run()
|
||||
+
|
||||
gobject.source_remove(timer)
|
||||
timer = 0
|
||||
|
||||
@@ -74,7 +87,7 @@ class vmmAsyncJob(gobject.GObject):
|
||||
# async dialog is running. This forces us to clean up properly
|
||||
# and not leave a dead process around.
|
||||
logging.debug("Forcing main_quit from async job.")
|
||||
- self._exit_if_necessary(force_exit=True)
|
||||
+ self.exit_if_necessary(force_exit=True)
|
||||
|
||||
self.topwin.destroy()
|
||||
|
||||
@@ -132,6 +145,11 @@ class vmmAsyncJob(gobject.GObject):
|
||||
return (None, None)
|
||||
return self._error_info
|
||||
|
||||
+ def set_data(self, data):
|
||||
+ self._data = data
|
||||
+ def get_data(self):
|
||||
+ return self._data
|
||||
+
|
||||
def exit_if_necessary(self):
|
||||
gtk.gdk.threads_enter()
|
||||
try:
|
||||
@@ -140,11 +158,15 @@ class vmmAsyncJob(gobject.GObject):
|
||||
gtk.gdk.threads_leave()
|
||||
|
||||
def _exit_if_necessary(self, force_exit=False):
|
||||
- if self.bg_thread.isAlive() and not force_exit:
|
||||
- if(self.is_pulsing):
|
||||
+ thread_active = (self.bg_thread.isAlive() or not self.run_main)
|
||||
+
|
||||
+ if thread_active and not force_exit:
|
||||
+ if (self.is_pulsing):
|
||||
+ # Don't call pulse_pbar: this function is thread wrapped
|
||||
self.pbar.pulse()
|
||||
return True
|
||||
else:
|
||||
- gtk.main_quit()
|
||||
+ if self.run_main:
|
||||
+ gtk.main_quit()
|
||||
return False
|
||||
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1267580154 18000
|
||||
# Node ID a52c2654d7db28dca4e28f2170f23fea7a727b24
|
||||
# Parent da1c162094663d6ffa474d6b2a05130277ec01dc
|
||||
manager: Improve startup error when no default connection.
|
||||
|
||||
diff -r da1c16209466 -r a52c2654d7db src/virtManager/manager.py
|
||||
--- a/src/virtManager/manager.py Tue Mar 02 12:18:48 2010 -0500
|
||||
+++ b/src/virtManager/manager.py Tue Mar 02 20:35:54 2010 -0500
|
||||
@@ -130,7 +130,6 @@
|
||||
self.engine = engine
|
||||
|
||||
self.delete_dialog = None
|
||||
- self.startup_error = None
|
||||
self.ignore_pause = False
|
||||
|
||||
# Mapping of VM UUID -> tree model rows to
|
||||
@@ -207,13 +206,13 @@
|
||||
# Select first list entry
|
||||
vmlist = self.window.get_widget("vm-list")
|
||||
if len(vmlist.get_model()) == 0:
|
||||
- self.startup_error = _("Could not populate a default connection. "
|
||||
- "Make sure the appropriate virtualization "
|
||||
- "packages are installed (kvm, qemu, etc.) "
|
||||
- "and that libvirtd has been restarted to "
|
||||
- "notice the changes.\n\n"
|
||||
- "A hypervisor connection can be manually "
|
||||
- "added via \nFile->Add Connection")
|
||||
+ msg = _("Could not detect a default hypervisor. Make\n"
|
||||
+ "sure the appropriate virtualization packages\n"
|
||||
+ "are installed (kvm, qemu, libvirt, etc.), and\n"
|
||||
+ "that libvirtd is running.\n\n"
|
||||
+ "A hypervisor connection can be manually added\n"
|
||||
+ "via File->Add Connection")
|
||||
+ self.set_startup_error(msg)
|
||||
else:
|
||||
vmlist.get_selection().select_iter(vmlist.get_model().get_iter_first())
|
||||
|
||||
@@ -229,10 +228,6 @@
|
||||
|
||||
self.engine.increment_window_counter()
|
||||
|
||||
- if self.startup_error:
|
||||
- self.err.val_err(_("Error determining default hypervisor."),
|
||||
- self.startup_error, _("Startup Error"))
|
||||
- self.startup_error = None
|
||||
|
||||
def close(self, src=None, src2=None):
|
||||
if self.is_visible():
|
||||
@@ -246,6 +241,9 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
+ def set_startup_error(self, msg):
|
||||
+ self.window.get_widget("vm-notebook").set_current_page(1)
|
||||
+ self.window.get_widget("startup-error-label").set_text(msg)
|
||||
|
||||
################
|
||||
# Init methods #
|
||||
@@ -430,6 +428,7 @@
|
||||
|
||||
def init_vmlist(self):
|
||||
vmlist = self.window.get_widget("vm-list")
|
||||
+ self.window.get_widget("vm-notebook").set_show_tabs(False)
|
||||
|
||||
# Handle, name, markup, status, status icon, key/uuid, hint, is conn,
|
||||
# is conn connected, is vm, is vm running, fg color
|
||||
@@ -905,6 +904,9 @@
|
||||
return _iter
|
||||
|
||||
def _add_connection(self, engine, conn):
|
||||
+ # Make sure error page isn't showing
|
||||
+ self.window.get_widget("vm-notebook").set_current_page(0)
|
||||
+
|
||||
if self.rows.has_key(conn.get_uri()):
|
||||
return
|
||||
|
||||
diff -r da1c16209466 -r a52c2654d7db src/vmm-manager.glade
|
||||
--- a/src/vmm-manager.glade Tue Mar 02 12:18:48 2010 -0500
|
||||
+++ b/src/vmm-manager.glade Tue Mar 02 20:35:54 2010 -0500
|
||||
@@ -342,23 +342,59 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
+ <widget class="GtkNotebook" id="vm-notebook">
|
||||
<property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <property name="hscrollbar_policy">automatic</property>
|
||||
- <property name="vscrollbar_policy">automatic</property>
|
||||
- <property name="shadow_type">in</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
<child>
|
||||
- <widget class="GtkTreeView" id="vm-list">
|
||||
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
- <signal name="button_press_event" handler="on_vm_list_button_press_event"/>
|
||||
- <signal name="row_expanded" handler="on_vm_list_row_expanded"/>
|
||||
- <signal name="key_press_event" handler="on_vm_list_key_press_event"/>
|
||||
- <signal name="row_collapsed" handler="on_vm_list_row_collapsed"/>
|
||||
- <signal name="row_activated" handler="on_vm_list_row_activated"/>
|
||||
+ <property name="hscrollbar_policy">automatic</property>
|
||||
+ <property name="vscrollbar_policy">automatic</property>
|
||||
+ <property name="shadow_type">in</property>
|
||||
+ <child>
|
||||
+ <widget class="GtkTreeView" id="vm-list">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <signal name="button_press_event" handler="on_vm_list_button_press_event"/>
|
||||
+ <signal name="row_expanded" handler="on_vm_list_row_expanded"/>
|
||||
+ <signal name="key_press_event" handler="on_vm_list_key_press_event"/>
|
||||
+ <signal name="row_collapsed" handler="on_vm_list_row_collapsed"/>
|
||||
+ <signal name="row_activated" handler="on_vm_list_row_activated"/>
|
||||
+ </widget>
|
||||
+ </child>
|
||||
</widget>
|
||||
</child>
|
||||
+ <child>
|
||||
+ <widget class="GtkLabel" id="label1">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="label">manager</property>
|
||||
+ </widget>
|
||||
+ <packing>
|
||||
+ <property name="tab_fill">False</property>
|
||||
+ <property name="type">tab</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <widget class="GtkLabel" id="startup-error-label">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="label">error</property>
|
||||
+ </widget>
|
||||
+ <packing>
|
||||
+ <property name="position">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <widget class="GtkLabel" id="label2">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="label">error</property>
|
||||
+ </widget>
|
||||
+ <packing>
|
||||
+ <property name="position">1</property>
|
||||
+ <property name="tab_fill">False</property>
|
||||
+ <property name="type">tab</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1267550328 18000
|
||||
# Node ID da1c162094663d6ffa474d6b2a05130277ec01dc
|
||||
# Parent 7473bf514f915b537ba0d29550c6741fb5b72cac
|
||||
engine: Remove redundant function
|
||||
|
||||
diff -r 7473bf514f91 -r da1c16209466 src/virtManager/engine.py
|
||||
--- a/src/virtManager/engine.py Tue Mar 02 11:56:04 2010 -0500
|
||||
+++ b/src/virtManager/engine.py Tue Mar 02 12:18:48 2010 -0500
|
||||
@@ -137,9 +137,6 @@
|
||||
self.connect_to_uri(uri)
|
||||
|
||||
def connect_to_uri(self, uri, readOnly=None, autoconnect=False):
|
||||
- return self._connect_to_uri(None, uri, readOnly, autoconnect)
|
||||
-
|
||||
- def _connect_to_uri(self, connect, uri, readOnly, autoconnect):
|
||||
self.windowConnect = None
|
||||
|
||||
try:
|
||||
@@ -316,7 +313,7 @@
|
||||
def show_connect(self):
|
||||
if self.windowConnect == None:
|
||||
self.windowConnect = vmmConnect(self.get_config(), self)
|
||||
- self.windowConnect.connect("completed", self._connect_to_uri)
|
||||
+ self.windowConnect.connect("completed", self.connect_to_uri)
|
||||
self.windowConnect.connect("cancelled", self._connect_cancelled)
|
||||
self.windowConnect.show()
|
||||
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1267653530 18000
|
||||
# Node ID 437cb7da4c9741ebbbf2baca7e90f3699eb2756d
|
||||
# Parent 711c94d23f4c81e5997dfbeac6a30ae556b38c82
|
||||
PackageKit integration for first start hypervisor detection
|
||||
|
||||
Check to make sure the expected local packages are installed for
|
||||
the default connection (KVM).
|
||||
|
||||
diff -r 711c94d23f4c -r 437cb7da4c97 src/virt-manager.py.in
|
||||
--- a/src/virt-manager.py.in Wed Mar 03 16:55:00 2010 -0500
|
||||
+++ b/src/virt-manager.py.in Wed Mar 03 16:58:50 2010 -0500
|
||||
@@ -203,17 +203,6 @@
|
||||
|
||||
return optParser.parse_args()
|
||||
|
||||
-def default_uri():
|
||||
- tryuri = None
|
||||
- if os.path.exists("/var/lib/xend") and os.path.exists("/proc/xen"):
|
||||
- tryuri = "xen:///"
|
||||
- elif (os.path.exists("/usr/bin/qemu") or
|
||||
- os.path.exists("/usr/bin/qemu-kvm") or
|
||||
- os.path.exists("/usr/bin/kvm")):
|
||||
- tryuri = "qemu:///system"
|
||||
-
|
||||
- return tryuri
|
||||
-
|
||||
def launch_specific_window(engine, show, uri, uuid):
|
||||
if not engine.wait_for_open(uri):
|
||||
# Connection failed, don't attempt to continue
|
||||
@@ -238,15 +227,10 @@
|
||||
args=(engine, show, uri, uuid),
|
||||
name="Launching '%s' window" % show)
|
||||
thread.start()
|
||||
+
|
||||
elif show=='summary' or uri:
|
||||
engine.connect_to_uri(uri)
|
||||
else:
|
||||
- if engine.config.get_connections() is None \
|
||||
- or len(engine.config.get_connections()) == 0:
|
||||
-
|
||||
- tryuri = default_uri()
|
||||
- if tryuri is not None:
|
||||
- engine.add_connection(tryuri, autoconnect=True)
|
||||
engine.show_manager()
|
||||
|
||||
if not no_conn_auto:
|
||||
diff -r 711c94d23f4c -r 437cb7da4c97 src/virtManager/engine.py
|
||||
--- a/src/virtManager/engine.py Wed Mar 03 16:55:00 2010 -0500
|
||||
+++ b/src/virtManager/engine.py Wed Mar 03 16:58:50 2010 -0500
|
||||
@@ -24,9 +24,11 @@
|
||||
import logging
|
||||
import traceback
|
||||
import threading
|
||||
+import os
|
||||
|
||||
import libvirt
|
||||
import virtinst
|
||||
+import dbus
|
||||
|
||||
from virtManager.about import vmmAbout
|
||||
from virtManager.halhelper import vmmHalHelper
|
||||
@@ -44,6 +46,149 @@
|
||||
from virtManager.systray import vmmSystray
|
||||
import virtManager.util as util
|
||||
|
||||
+
|
||||
+# List of packages to look for via packagekit at first startup.
|
||||
+# If this list is empty, no attempt to contact packagekit is made
|
||||
+LIBVIRT_DAEMON = "libvirt"
|
||||
+PACKAGEKIT_PACKAGES = [LIBVIRT_DAEMON, "qemu-system-x86"]
|
||||
+
|
||||
+
|
||||
+def default_uri():
|
||||
+ tryuri = None
|
||||
+ if os.path.exists("/var/lib/xend") and os.path.exists("/proc/xen"):
|
||||
+ tryuri = "xen:///"
|
||||
+ elif (os.path.exists("/usr/bin/qemu") or
|
||||
+ os.path.exists("/usr/bin/qemu-kvm") or
|
||||
+ os.path.exists("/usr/bin/kvm")):
|
||||
+ tryuri = "qemu:///system"
|
||||
+
|
||||
+ return tryuri
|
||||
+
|
||||
+#############################
|
||||
+# PackageKit lookup helpers #
|
||||
+#############################
|
||||
+
|
||||
+def check_packagekit(config, errbox):
|
||||
+ """
|
||||
+ Returns None when we determine nothing useful.
|
||||
+ Returns (success, did we just install libvirt) otherwise.
|
||||
+ """
|
||||
+ if not PACKAGEKIT_PACKAGES:
|
||||
+ return
|
||||
+
|
||||
+ logging.debug("Asking PackageKit what's installed locally.")
|
||||
+ try:
|
||||
+ session = dbus.SystemBus()
|
||||
+
|
||||
+ pk_control = dbus.Interface(
|
||||
+ session.get_object("org.freedesktop.PackageKit",
|
||||
+ "/org/freedesktop/PackageKit"),
|
||||
+ "org.freedesktop.PackageKit")
|
||||
+ except Exception:
|
||||
+ logging.exception("Couldn't connect to packagekit")
|
||||
+ return
|
||||
+
|
||||
+ found = []
|
||||
+ progWin = vmmAsyncJob(config, _do_async_search,
|
||||
+ [session, pk_control],
|
||||
+ _("Searching for available hypervisors..."),
|
||||
+ run_main=False)
|
||||
+ progWin.run()
|
||||
+ error, ignore = progWin.get_error()
|
||||
+ if error:
|
||||
+ return
|
||||
+
|
||||
+ found = progWin.get_data()
|
||||
+
|
||||
+ not_found = filter(lambda x: x not in found, PACKAGEKIT_PACKAGES)
|
||||
+ logging.debug("Missing packages: %s" % not_found)
|
||||
+
|
||||
+ do_install = not_found
|
||||
+ if not do_install:
|
||||
+ if not not_found:
|
||||
+ # Got everything we wanted, try to connect
|
||||
+ logging.debug("All packages found locally.")
|
||||
+ return (True, False)
|
||||
+
|
||||
+ else:
|
||||
+ logging.debug("No packages are available for install.")
|
||||
+ return
|
||||
+
|
||||
+ msg = (_("The following packages are not installed:\n%s\n\n"
|
||||
+ "These are required to create KVM guests locally.\n"
|
||||
+ "Would you like to install them now?") %
|
||||
+ reduce(lambda x, y: x + "\n" + y, do_install, ""))
|
||||
+
|
||||
+ ret = errbox.yes_no(_("Packages required for KVM usage"), msg)
|
||||
+
|
||||
+ if not ret:
|
||||
+ logging.debug("Package install declined.")
|
||||
+ return
|
||||
+
|
||||
+ try:
|
||||
+ packagekit_install(do_install)
|
||||
+ except Exception, e:
|
||||
+ errbox.show_err(_("Error talking to PackageKit: %s") % str(e),
|
||||
+ "".join(traceback.format_exc()))
|
||||
+ return
|
||||
+
|
||||
+ return (True, LIBVIRT_DAEMON in do_install)
|
||||
+
|
||||
+def _do_async_search(session, pk_control, asyncjob):
|
||||
+ found = []
|
||||
+ try:
|
||||
+ for name in PACKAGEKIT_PACKAGES:
|
||||
+ ret_found = packagekit_search(session, pk_control, name)
|
||||
+ found += ret_found
|
||||
+
|
||||
+ except Exception, e:
|
||||
+ logging.exception("Error searching for installed packages")
|
||||
+ asyncjob.set_error(str(e), "".join(traceback.format_exc()))
|
||||
+
|
||||
+ asyncjob.set_data(found)
|
||||
+
|
||||
+def packagekit_install(package_list):
|
||||
+ session = dbus.SessionBus()
|
||||
+
|
||||
+ pk_control = dbus.Interface(
|
||||
+ session.get_object("org.freedesktop.PackageKit",
|
||||
+ "/org/freedesktop/PackageKit"),
|
||||
+ "org.freedesktop.PackageKit.Modify")
|
||||
+
|
||||
+ logging.debug("Installing packages: %s" % package_list)
|
||||
+ pk_control.InstallPackageNames(0, package_list, "hide-confirm-search")
|
||||
+
|
||||
+def packagekit_search(session, pk_control, package_name):
|
||||
+ tid = pk_control.GetTid()
|
||||
+ pk_trans = dbus.Interface(
|
||||
+ session.get_object("org.freedesktop.PackageKit", tid),
|
||||
+ "org.freedesktop.PackageKit.Transaction")
|
||||
+
|
||||
+ found = []
|
||||
+ def package(info, package_id, summary):
|
||||
+ found_name = str(package_id.split(";")[0])
|
||||
+ if found_name in PACKAGEKIT_PACKAGES:
|
||||
+ found.append(found_name)
|
||||
+
|
||||
+ def error(code, details):
|
||||
+ raise RuntimeError("PackageKit search failure: %s %s" %
|
||||
+ (code, details))
|
||||
+
|
||||
+ def finished(ignore, runtime):
|
||||
+ gtk.main_quit()
|
||||
+
|
||||
+ pk_trans.connect_to_signal('Finished', finished)
|
||||
+ pk_trans.connect_to_signal('ErrorCode', error)
|
||||
+ pk_trans.connect_to_signal('Package', package)
|
||||
+ pk_trans.SearchNames("installed", [package_name])
|
||||
+
|
||||
+ # Call main() so this function is synchronous
|
||||
+ gtk.main()
|
||||
+
|
||||
+ return found
|
||||
+
|
||||
+
|
||||
+
|
||||
class vmmEngine(gobject.GObject):
|
||||
__gsignals__ = {
|
||||
"connection-added": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
|
||||
@@ -96,6 +241,7 @@
|
||||
self.load_stored_uris()
|
||||
self.tick()
|
||||
|
||||
+
|
||||
def init_systray(self):
|
||||
if self.systray:
|
||||
return
|
||||
@@ -123,6 +269,60 @@
|
||||
self.hal_helper = vmmHalHelper()
|
||||
return self.hal_helper
|
||||
|
||||
+
|
||||
+ # First run helpers
|
||||
+
|
||||
+ def add_default_connection(self):
|
||||
+ # Only add default if no connections are currently known
|
||||
+ if self.config.get_connections():
|
||||
+ return
|
||||
+
|
||||
+ # Manager fail message
|
||||
+ msg = _("Could not detect a default hypervisor. Make\n"
|
||||
+ "sure the appropriate virtualization packages\n"
|
||||
+ "are installed (kvm, qemu, libvirt, etc.), and\n"
|
||||
+ "that libvirtd is running.\n\n"
|
||||
+ "A hypervisor connection can be manually\n"
|
||||
+ "added via File->Add Connection")
|
||||
+
|
||||
+ manager = self.get_manager()
|
||||
+ logging.debug("Determining default libvirt URI")
|
||||
+
|
||||
+ ret = None
|
||||
+ did_install_libvirt = False
|
||||
+ try:
|
||||
+ ret = check_packagekit(self.config, self.err)
|
||||
+ except:
|
||||
+ logging.exception("Error talking to PackageKit")
|
||||
+
|
||||
+ if ret:
|
||||
+ # We found the default packages via packagekit: use default URI
|
||||
+ ignore, did_install_libvirt = ret
|
||||
+ tryuri = "qemu:///system"
|
||||
+
|
||||
+ else:
|
||||
+ tryuri = default_uri()
|
||||
+
|
||||
+ if tryuri is None:
|
||||
+ manager.set_startup_error(msg)
|
||||
+ return
|
||||
+
|
||||
+ if did_install_libvirt:
|
||||
+ warnmsg = _(
|
||||
+ "Libvirt was just installed, so the 'libvirtd' service will\n"
|
||||
+ "will need to be started. This can be done with one \n"
|
||||
+ "of the following:\n\n"
|
||||
+ "- From GNOME menus: System->Administration->Services\n"
|
||||
+ "- From the terminal: su -c 'service libvirtd restart'\n"
|
||||
+ "- Restart your computer\n\n"
|
||||
+ "virt-manager will connect to libvirt on the next application\n"
|
||||
+ "start up.")
|
||||
+ self.err.ok(_("Libvirt service must be started"), warnmsg)
|
||||
+
|
||||
+ self.connect_to_uri(tryuri, autoconnect=True,
|
||||
+ do_start=not did_install_libvirt)
|
||||
+
|
||||
+
|
||||
def load_stored_uris(self):
|
||||
uris = self.config.get_connections()
|
||||
if uris != None:
|
||||
@@ -136,7 +336,8 @@
|
||||
if conn.get_autoconnect():
|
||||
self.connect_to_uri(uri)
|
||||
|
||||
- def connect_to_uri(self, uri, readOnly=None, autoconnect=False):
|
||||
+ def connect_to_uri(self, uri, readOnly=None, autoconnect=False,
|
||||
+ do_start=True):
|
||||
self.windowConnect = None
|
||||
|
||||
try:
|
||||
@@ -146,7 +347,8 @@
|
||||
conn = self.add_connection(uri, readOnly, autoconnect)
|
||||
|
||||
self.show_manager()
|
||||
- conn.open()
|
||||
+ if do_start:
|
||||
+ conn.open()
|
||||
return conn
|
||||
except Exception:
|
||||
return None
|
||||
diff -r 711c94d23f4c -r 437cb7da4c97 src/virtManager/error.py
|
||||
--- a/src/virtManager/error.py Wed Mar 03 16:55:00 2010 -0500
|
||||
+++ b/src/virtManager/error.py Wed Mar 03 16:58:50 2010 -0500
|
||||
@@ -145,6 +145,9 @@
|
||||
def ok_cancel(self, text1, text2=None):
|
||||
return self._show_warning(gtk.BUTTONS_OK_CANCEL, text1, text2)
|
||||
|
||||
+ def ok(self, text1, text2=None):
|
||||
+ return self._show_warning(gtk.BUTTONS_OK, text1, text2)
|
||||
+
|
||||
def warn_chkbox(self, text1, text2=None, chktext=None, buttons=None):
|
||||
chkbox = vmmCheckDialog(self.get_transient_for(),
|
||||
gtk.MESSAGE_WARNING, buttons)
|
||||
diff -r 711c94d23f4c -r 437cb7da4c97 src/virtManager/manager.py
|
||||
--- a/src/virtManager/manager.py Wed Mar 03 16:55:00 2010 -0500
|
||||
+++ b/src/virtManager/manager.py Wed Mar 03 16:58:50 2010 -0500
|
||||
@@ -21,6 +21,7 @@
|
||||
import gobject
|
||||
import gtk
|
||||
import gtk.glade
|
||||
+
|
||||
import logging
|
||||
import traceback
|
||||
|
||||
@@ -205,16 +206,12 @@
|
||||
|
||||
# Select first list entry
|
||||
vmlist = self.window.get_widget("vm-list")
|
||||
- if len(vmlist.get_model()) == 0:
|
||||
- msg = _("Could not detect a default hypervisor. Make\n"
|
||||
- "sure the appropriate virtualization packages\n"
|
||||
- "are installed (kvm, qemu, libvirt, etc.), and\n"
|
||||
- "that libvirtd is running.\n\n"
|
||||
- "A hypervisor connection can be manually added\n"
|
||||
- "via File->Add Connection")
|
||||
- self.set_startup_error(msg)
|
||||
- else:
|
||||
- vmlist.get_selection().select_iter(vmlist.get_model().get_iter_first())
|
||||
+ if len(vmlist.get_model()) != 0:
|
||||
+ vmlist.get_selection().select_iter(
|
||||
+ vmlist.get_model().get_iter_first())
|
||||
+
|
||||
+ # Queue up the default connection detector
|
||||
+ gobject.idle_add(self.engine.add_default_connection)
|
||||
|
||||
##################
|
||||
# Common methods #
|
||||
@@ -228,7 +225,6 @@
|
||||
|
||||
self.engine.increment_window_counter()
|
||||
|
||||
-
|
||||
def close(self, src=None, src2=None):
|
||||
if self.is_visible():
|
||||
win = self.window.get_widget("vmm-manager")
|
@@ -1,173 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1268858510 14400
|
||||
# Node ID fc1360e7ded9029e6b5ad3e9eadc0f694f5d5b52
|
||||
# Parent 91818a16657ccc11abe20179691ce7ca2127d05a
|
||||
Attempt to 'fake' reboot if it isn't supported
|
||||
|
||||
We do this by attempting vm.shutdown(), followed by a vm.start() when
|
||||
the vm actually stops. Any manual 'shutdown' or 'destroy' call will undo
|
||||
the reboot command, similar to how xen acts (on RHEL5 at least).
|
||||
|
||||
diff -r 91818a16657c -r fc1360e7ded9 src/virtManager/domain.py
|
||||
--- a/src/virtManager/domain.py Wed Mar 17 08:49:06 2010 +0000
|
||||
+++ b/src/virtManager/domain.py Wed Mar 17 16:41:50 2010 -0400
|
||||
@@ -1231,7 +1233,47 @@
|
||||
def disk_write_rate(self):
|
||||
return self._get_record_helper("diskWrRate")
|
||||
|
||||
+ def _unregister_reboot_listener(self):
|
||||
+ if self.reboot_listener == None:
|
||||
+ return
|
||||
+
|
||||
+ try:
|
||||
+ self.disconnect(self.reboot_listener)
|
||||
+ self.reboot_listener = None
|
||||
+ except:
|
||||
+ pass
|
||||
+
|
||||
+ def manual_reboot(self):
|
||||
+ # Attempt a manual reboot via 'shutdown' followed by startup
|
||||
+ def reboot_listener(vm, ignore1, self):
|
||||
+ if vm.is_crashed():
|
||||
+ # Abandon reboot plans
|
||||
+ self.reboot_listener = None
|
||||
+ return True
|
||||
+
|
||||
+ if not vm.is_shutoff():
|
||||
+ # Not shutoff, continue waiting
|
||||
+ return
|
||||
+
|
||||
+ try:
|
||||
+ logging.debug("Fake reboot detected shutdown. Restarting VM")
|
||||
+ vm.startup()
|
||||
+ except:
|
||||
+ logging.exception("Fake reboot startup failed")
|
||||
+
|
||||
+ self.reboot_listener = None
|
||||
+ return True
|
||||
+
|
||||
+ self._unregister_reboot_listener()
|
||||
+
|
||||
+ # Request a shutdown
|
||||
+ self.shutdown()
|
||||
+
|
||||
+ self.reboot_listener = util.connect_opt_out(self, "status-changed",
|
||||
+ reboot_listener, self)
|
||||
+
|
||||
def shutdown(self):
|
||||
+ self._unregister_reboot_listener()
|
||||
self._backend.shutdown()
|
||||
self._update_status()
|
||||
|
||||
@@ -1265,7 +1307,9 @@
|
||||
self._update_status()
|
||||
|
||||
def destroy(self):
|
||||
+ self._unregister_reboot_listener()
|
||||
self._backend.destroy()
|
||||
+ self._update_status()
|
||||
|
||||
def interfaceStats(self, device):
|
||||
return self._backend.interfaceStats(device)
|
||||
diff -r 91818a16657c -r fc1360e7ded9 src/virtManager/engine.py
|
||||
--- a/src/virtManager/engine.py Wed Mar 17 08:49:06 2010 +0000
|
||||
+++ b/src/virtManager/engine.py Wed Mar 17 16:41:50 2010 -0400
|
||||
@@ -834,10 +834,30 @@
|
||||
self.config.set_confirm_poweroff(not skip_prompt)
|
||||
|
||||
logging.debug("Rebooting vm '%s'." % vm.get_name())
|
||||
+ no_support = False
|
||||
+ reboot_err = None
|
||||
try:
|
||||
vm.reboot()
|
||||
- except Exception, e:
|
||||
- self.err.show_err(_("Error shutting down domain: %s" % str(e)),
|
||||
+ except Exception, reboot_err:
|
||||
+ no_support = virtinst.support.is_error_nosupport(reboot_err)
|
||||
+ if not no_support:
|
||||
+ self.err.show_err(_("Error rebooting domain: %s" %
|
||||
+ str(reboot_err)),
|
||||
+ "".join(traceback.format_exc()))
|
||||
+
|
||||
+ if not no_support:
|
||||
+ return
|
||||
+
|
||||
+ # Reboot isn't supported. Let's try to emulate it
|
||||
+ logging.debug("Hypervisor doesn't support reboot, let's fake it")
|
||||
+ try:
|
||||
+ vm.manual_reboot()
|
||||
+ except:
|
||||
+ logging.exception("Could not fake a reboot")
|
||||
+
|
||||
+ # Raise the original error message
|
||||
+ self.err.show_err(_("Error rebooting domain: %s" %
|
||||
+ str(reboot_err)),
|
||||
"".join(traceback.format_exc()))
|
||||
|
||||
def migrate_domain(self, uri, uuid):
|
||||
diff -rup old/src/virtManager/domain.py virt-manager-0.8.3/src/virtManager/domain.py
|
||||
--- old/src/virtManager/domain.py 2010-03-21 22:10:03.000000000 -0400
|
||||
+++ virt-manager-0.8.3/src/virtManager/domain.py 2010-03-21 22:10:41.000000000 -0400
|
||||
@@ -1145,6 +1145,8 @@ class vmmDomain(vmmDomainBase):
|
||||
self.toggle_sample_network_traffic()
|
||||
self.toggle_sample_disk_io()
|
||||
|
||||
+ self.reboot_listener = None
|
||||
+
|
||||
# Determine available XML flags (older libvirt versions will error
|
||||
# out if passed SECURE_XML, INACTIVE_XML, etc)
|
||||
self._set_dom_flags()
|
||||
diff -r c9d3c8dec04f -r 976f202f5dbd src/virtManager/util.py
|
||||
--- a/src/virtManager/util.py Sat Feb 27 10:42:43 2010 -0500
|
||||
+++ b/src/virtManager/util.py Sun Feb 28 19:40:06 2010 -0500
|
||||
@@ -240,6 +240,33 @@
|
||||
|
||||
return label
|
||||
|
||||
+def connect_once(obj, signal, func, *args):
|
||||
+ id_list = []
|
||||
+
|
||||
+ def wrap_func(*wrapargs):
|
||||
+ if id_list:
|
||||
+ obj.disconnect(id_list[0])
|
||||
+
|
||||
+ return func(*wrapargs)
|
||||
+
|
||||
+ conn_id = obj.connect(signal, wrap_func, *args)
|
||||
+ id_list.append(conn_id)
|
||||
+
|
||||
+ return conn_id
|
||||
+
|
||||
+def connect_opt_out(obj, signal, func, *args):
|
||||
+ id_list = []
|
||||
+
|
||||
+ def wrap_func(*wrapargs):
|
||||
+ ret = func(*wrapargs)
|
||||
+ if ret and id_list:
|
||||
+ obj.disconnect(id_list[0])
|
||||
+
|
||||
+ conn_id = obj.connect(signal, wrap_func, *args)
|
||||
+ id_list.append(conn_id)
|
||||
+
|
||||
+ return conn_id
|
||||
+
|
||||
def idle_emit(self, signal, *args):
|
||||
"""
|
||||
Safe wrapper for using 'self.emit' with gobject.idle_add
|
||||
diff -rup virt-manager-0.8.3/src/virtManager/domain.py new/src/virtManager/domain.py
|
||||
--- virt-manager-0.8.3/src/virtManager/domain.py 2010-03-22 10:57:56.526155000 -0400
|
||||
+++ new/src/virtManager/domain.py 2010-03-22 11:05:35.723429000 -0400
|
||||
@@ -1025,6 +1025,12 @@ class vmmDomainBase(gobject.GObject):
|
||||
def disk_io_vector_limit(self, limit):
|
||||
return self.in_out_vector_limit(self.disk_io_vector(), limit)
|
||||
|
||||
+ def is_shutoff(self):
|
||||
+ return self.status() == libvirt.VIR_DOMAIN_SHUTOFF
|
||||
+
|
||||
+ def is_crashed(self):
|
||||
+ return self.status() == libvirt.VIR_DOMAIN_CRASHED
|
||||
+
|
||||
def is_stoppable(self):
|
||||
return self.status() in [libvirt.VIR_DOMAIN_RUNNING,
|
||||
libvirt.VIR_DOMAIN_PAUSED]
|
@@ -1,66 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1269442662 14400
|
||||
# Node ID f7d7a91070504287678514abe645fa7227bb963f
|
||||
# Parent 3ae371c1a9fb4c233f10870e1d1508ef7b951137
|
||||
Fix 'Open Connection' dialog
|
||||
|
||||
diff -r 3ae371c1a9fb -r f7d7a9107050 src/virtManager/engine.py
|
||||
--- a/src/virtManager/engine.py Wed Mar 24 10:54:38 2010 -0400
|
||||
+++ b/src/virtManager/engine.py Wed Mar 24 10:57:42 2010 -0400
|
||||
@@ -341,9 +341,9 @@
|
||||
self.windowConnect = None
|
||||
|
||||
try:
|
||||
- try:
|
||||
- conn = self._lookup_connection(uri)
|
||||
- except Exception:
|
||||
+ conn = self._check_connection(uri)
|
||||
+ if not conn:
|
||||
+ # Unknown connection, add it
|
||||
conn = self.add_connection(uri, readOnly, autoconnect)
|
||||
|
||||
self.show_manager()
|
||||
@@ -351,6 +351,7 @@
|
||||
conn.open()
|
||||
return conn
|
||||
except Exception:
|
||||
+ logging.exception("Error connecting to %s" % uri)
|
||||
return None
|
||||
|
||||
def _connect_cancelled(self, connect):
|
||||
@@ -513,9 +514,12 @@
|
||||
self.connections[uri]["windowHost"].show()
|
||||
|
||||
def show_connect(self):
|
||||
+ def connect_wrap(src, *args):
|
||||
+ return self.connect_to_uri(*args)
|
||||
+
|
||||
if self.windowConnect == None:
|
||||
self.windowConnect = vmmConnect(self.get_config(), self)
|
||||
- self.windowConnect.connect("completed", self.connect_to_uri)
|
||||
+ self.windowConnect.connect("completed", connect_wrap)
|
||||
self.windowConnect.connect("cancelled", self._connect_cancelled)
|
||||
self.windowConnect.show()
|
||||
|
||||
@@ -680,12 +684,17 @@
|
||||
|
||||
return handle_id
|
||||
|
||||
+ def _check_connection(self, uri):
|
||||
+ conn = self.connections.get(uri)
|
||||
+ if conn:
|
||||
+ return conn["connection"]
|
||||
+ return None
|
||||
+
|
||||
def _lookup_connection(self, uri):
|
||||
- conn = self.connections.get(uri)
|
||||
+ conn = self._check_connection(uri)
|
||||
if not conn:
|
||||
raise RuntimeError(_("Unknown connection URI %s") % uri)
|
||||
-
|
||||
- return conn["connection"]
|
||||
+ return conn
|
||||
|
||||
def save_domain(self, src, uri, uuid):
|
||||
conn = self._lookup_connection(uri)
|
@@ -1,12 +0,0 @@
|
||||
diff -rup old/src/virtManager/manager.py virt-manager-0.8.3/src/virtManager/manager.py
|
||||
--- old/src/virtManager/manager.py 2010-04-14 13:01:23.776680000 -0400
|
||||
+++ virt-manager-0.8.3/src/virtManager/manager.py 2010-04-14 13:02:45.615300000 -0400
|
||||
@@ -211,7 +211,7 @@ class vmmManager(gobject.GObject):
|
||||
vmlist.get_model().get_iter_first())
|
||||
|
||||
# Queue up the default connection detector
|
||||
- gobject.idle_add(self.engine.add_default_connection)
|
||||
+ util.safe_idle_add(self.engine.add_default_connection)
|
||||
|
||||
##################
|
||||
# Common methods #
|
@@ -1,45 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1266846561 18000
|
||||
# Node ID 1eea5c799a3259099963d49980794d381a6b4d33
|
||||
# Parent f7f39e05fafc254b55110c9668df00e034e9305b
|
||||
createvol: Sensitize 'Finish' if default name suggested
|
||||
|
||||
diff -r f7f39e05fafc -r 1eea5c799a32 src/virtManager/createvol.py
|
||||
--- a/src/virtManager/createvol.py Sun Feb 21 18:40:45 2010 +0000
|
||||
+++ b/src/virtManager/createvol.py Mon Feb 22 08:49:21 2010 -0500
|
||||
@@ -113,12 +113,16 @@
|
||||
return ""
|
||||
|
||||
suffix = self.default_suffix()
|
||||
+ ret = ""
|
||||
try:
|
||||
- return Storage.StorageVolume.find_free_name(self.name_hint,
|
||||
+ ret = Storage.StorageVolume.find_free_name(self.name_hint,
|
||||
pool_object=self.parent_pool.pool,
|
||||
suffix=suffix)
|
||||
+ ret = ret.rstrip(suffix)
|
||||
except:
|
||||
- return ""
|
||||
+ pass
|
||||
+
|
||||
+ return ret
|
||||
|
||||
def default_suffix(self):
|
||||
suffix = ""
|
||||
@@ -127,9 +131,13 @@
|
||||
return suffix
|
||||
|
||||
def reset_state(self):
|
||||
- self.window.get_widget("vol-name").set_text(self.default_vol_name())
|
||||
+ default_name = self.default_vol_name()
|
||||
+ self.window.get_widget("vol-name").set_text("")
|
||||
+ self.window.get_widget("vol-create").set_sensitive(False)
|
||||
+ if default_name:
|
||||
+ self.window.get_widget("vol-name").set_text(default_name)
|
||||
+
|
||||
self.window.get_widget("vol-name").grab_focus()
|
||||
- self.window.get_widget("vol-create").set_sensitive(False)
|
||||
self.populate_vol_format()
|
||||
self.populate_vol_suffix()
|
||||
|
@@ -1,52 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1266002236 18000
|
||||
# Node ID 831fa7210e0467ddd9039cc9f372f11b2b22c5b5
|
||||
# Parent 9fb5880026535f6e373d3487ab31069eeae51489
|
||||
create: Allow using a manually created 'default' pool
|
||||
|
||||
diff -r 9fb588002653 -r 831fa7210e04 src/virtManager/create.py
|
||||
--- a/src/virtManager/create.py Fri Feb 12 14:01:59 2010 -0500
|
||||
+++ b/src/virtManager/create.py Fri Feb 12 14:17:16 2010 -0500
|
||||
@@ -454,7 +454,6 @@
|
||||
self.usepool = False
|
||||
try:
|
||||
if is_storage_capable:
|
||||
- # FIXME: Emit 'pool-added' or something?
|
||||
util.build_default_pool(self.conn.vmm)
|
||||
self.usepool = True
|
||||
except Exception, e:
|
||||
@@ -845,7 +844,6 @@
|
||||
return self.failed_guest.disks[0].path
|
||||
|
||||
if not self.usepool:
|
||||
-
|
||||
# Use old generating method
|
||||
d = self.config.get_default_image_dir(self.conn)
|
||||
origf = os.path.join(d, name + ".img")
|
||||
@@ -860,12 +858,22 @@
|
||||
f = origf
|
||||
|
||||
path = f
|
||||
+
|
||||
else:
|
||||
- pool = self.conn.vmm.storagePoolLookupByName(util.DEFAULT_POOL_NAME)
|
||||
+ pool = None
|
||||
+ for uuid in self.conn.list_pool_uuids():
|
||||
+ p = self.conn.get_pool(uuid)
|
||||
+ if p.get_name() == util.DEFAULT_POOL_NAME:
|
||||
+ pool = p
|
||||
+
|
||||
+ if not pool:
|
||||
+ raise RuntimeError(_("Did not find pool '%s'") %
|
||||
+ util.DEFAULT_POOL_NAME)
|
||||
+
|
||||
path = virtinst.Storage.StorageVolume.find_free_name(name,
|
||||
- pool_object=pool, suffix=".img")
|
||||
+ pool_object=pool.pool, suffix=".img")
|
||||
|
||||
- path = os.path.join(util.DEFAULT_POOL_PATH, path)
|
||||
+ path = os.path.join(pool.get_target_path(), path)
|
||||
|
||||
return path
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,244 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1266952692 18000
|
||||
# Node ID 962e52a4b4c0441eb5e9e8aeb1bb17597282579c
|
||||
# Parent 4e4e674d4921264cfe376ed48dcab10c8d3a3b69
|
||||
Drop redundant calls to window.show()
|
||||
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/about.py
|
||||
--- a/src/virtManager/about.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/about.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -48,7 +48,6 @@
|
||||
def show(self):
|
||||
dialog = self.window.get_widget("vmm-about")
|
||||
dialog.set_version(self.config.get_appversion())
|
||||
- dialog.show_all()
|
||||
dialog.present()
|
||||
|
||||
def close(self,ignore1=None,ignore2=None):
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/addhardware.py
|
||||
--- a/src/virtManager/addhardware.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/addhardware.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -166,7 +166,6 @@
|
||||
|
||||
def show(self):
|
||||
self.reset_state()
|
||||
- self.topwin.show()
|
||||
self.topwin.present()
|
||||
|
||||
def close(self, ignore1=None,ignore2=None):
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/clone.py
|
||||
--- a/src/virtManager/clone.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/clone.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -140,7 +140,6 @@
|
||||
|
||||
def show(self):
|
||||
self.reset_state()
|
||||
- self.topwin.show()
|
||||
self.topwin.present()
|
||||
|
||||
def close(self, ignore1=None, ignore2=None):
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/connect.py
|
||||
--- a/src/virtManager/connect.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/connect.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -108,7 +108,6 @@
|
||||
|
||||
def show(self):
|
||||
win = self.window.get_widget("vmm-open-connection")
|
||||
- win.show_all()
|
||||
win.present()
|
||||
self.reset_state()
|
||||
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/createinterface.py
|
||||
--- a/src/virtManager/createinterface.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/createinterface.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -124,7 +124,6 @@
|
||||
|
||||
def show(self):
|
||||
self.reset_state()
|
||||
- self.topwin.show()
|
||||
self.topwin.present()
|
||||
|
||||
def show_bond_config(self, src):
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/createnet.py
|
||||
--- a/src/virtManager/createnet.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/createnet.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -82,7 +82,6 @@
|
||||
self.set_initial_state()
|
||||
|
||||
def show(self):
|
||||
- self.topwin.show()
|
||||
self.reset_state()
|
||||
self.topwin.present()
|
||||
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/createpool.py
|
||||
--- a/src/virtManager/createpool.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/createpool.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -115,7 +115,6 @@
|
||||
self.set_initial_state()
|
||||
|
||||
def show(self):
|
||||
- self.topwin.show()
|
||||
self.reset_state()
|
||||
self.topwin.present()
|
||||
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/createvol.py
|
||||
--- a/src/virtManager/createvol.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/createvol.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -89,7 +89,6 @@
|
||||
|
||||
def show(self):
|
||||
self.reset_state()
|
||||
- self.topwin.show()
|
||||
self.topwin.present()
|
||||
|
||||
def close(self, ignore1=None, ignore2=None):
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/delete.py
|
||||
--- a/src/virtManager/delete.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/delete.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -85,7 +85,6 @@
|
||||
|
||||
def show(self):
|
||||
self.reset_state()
|
||||
- self.topwin.show()
|
||||
self.topwin.present()
|
||||
|
||||
def close(self, ignore1=None, ignore2=None):
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/details.py
|
||||
--- a/src/virtManager/details.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/details.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -302,7 +302,6 @@
|
||||
if self.is_visible():
|
||||
self.topwin.present()
|
||||
return
|
||||
- self.topwin.show()
|
||||
self.topwin.present()
|
||||
|
||||
self.engine.increment_window_counter()
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/domain.py
|
||||
--- a/src/virtManager/domain.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/domain.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -134,7 +134,7 @@
|
||||
def set_autostart(self, val):
|
||||
raise NotImplementedError()
|
||||
|
||||
- def attach_device(self, devobj):
|
||||
+ def attach_device(self, devobj, devxml=None):
|
||||
raise NotImplementedError()
|
||||
def detach_device(self, devtype, dev_id_info):
|
||||
raise NotImplementedError()
|
||||
@@ -1314,13 +1314,17 @@
|
||||
def get_id(self):
|
||||
return self._backend.ID()
|
||||
|
||||
- def attach_device(self, devobj):
|
||||
+ def attach_device(self, devobj, devxml=None):
|
||||
"""
|
||||
Hotplug device to running guest
|
||||
"""
|
||||
- if self.is_active():
|
||||
- xml = devobj.get_xml_config()
|
||||
- self._backend.attachDevice(xml)
|
||||
+ if not self.is_active():
|
||||
+ return
|
||||
+
|
||||
+ if not devxml:
|
||||
+ devxml = devobj.get_xml_config()
|
||||
+
|
||||
+ self._backend.attachDevice(devxml)
|
||||
|
||||
def detach_device(self, devtype, dev_id_info):
|
||||
"""
|
||||
@@ -1591,7 +1595,7 @@
|
||||
ignore, diskxml = util.xml_parse_wrapper(self.get_xml(), func,
|
||||
dev_id_info, newpath, _type)
|
||||
|
||||
- self.attach_device(diskxml)
|
||||
+ self.attach_device(None, diskxml)
|
||||
|
||||
# VCPU changing
|
||||
def define_vcpus(self, vcpus):
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/host.py
|
||||
--- a/src/virtManager/host.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/host.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -294,8 +294,10 @@
|
||||
|
||||
|
||||
def show(self):
|
||||
- dialog = self.window.get_widget("vmm-host")
|
||||
- dialog.present()
|
||||
+ if self.is_visible():
|
||||
+ self.topwin.present()
|
||||
+ return
|
||||
+ self.topwin.present()
|
||||
|
||||
self.engine.increment_window_counter()
|
||||
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/manager.py
|
||||
--- a/src/virtManager/manager.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/manager.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -124,6 +124,8 @@
|
||||
0, gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE,
|
||||
_("Unexpected Error"),
|
||||
_("An unexpected error occurred"))
|
||||
+ self.topwin = self.window.get_widget("vmm-manager")
|
||||
+
|
||||
self.config = config
|
||||
self.engine = engine
|
||||
|
||||
@@ -136,8 +138,7 @@
|
||||
self.rows = {}
|
||||
|
||||
w, h = self.config.get_manager_window_size()
|
||||
- self.window.get_widget("vmm-manager").set_default_size(w or 550,
|
||||
- h or 550)
|
||||
+ self.topwin.set_default_size(w or 550, h or 550)
|
||||
|
||||
self.init_vmlist()
|
||||
self.init_stats()
|
||||
@@ -221,12 +222,11 @@
|
||||
##################
|
||||
|
||||
def show(self):
|
||||
- win = self.window.get_widget("vmm-manager")
|
||||
if self.is_visible():
|
||||
- win.present()
|
||||
+ self.topwin.present()
|
||||
return
|
||||
- win.show()
|
||||
- win.present()
|
||||
+ self.topwin.present()
|
||||
+
|
||||
self.engine.increment_window_counter()
|
||||
|
||||
if self.startup_error:
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/preferences.py
|
||||
--- a/src/virtManager/preferences.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/preferences.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -37,7 +37,6 @@
|
||||
self.config = config
|
||||
|
||||
self.topwin = self.window.get_widget("vmm-preferences")
|
||||
- self.topwin.hide()
|
||||
|
||||
self.config.on_view_system_tray_changed(self.refresh_view_system_tray)
|
||||
self.config.on_console_popup_changed(self.refresh_console_popup)
|
||||
@@ -102,7 +101,6 @@
|
||||
return 1
|
||||
|
||||
def show(self):
|
||||
- self.topwin.show()
|
||||
self.topwin.present()
|
||||
|
||||
#########################
|
||||
diff -r 4e4e674d4921 -r 962e52a4b4c0 src/virtManager/storagebrowse.py
|
||||
--- a/src/virtManager/storagebrowse.py Tue Feb 23 09:03:13 2010 +0000
|
||||
+++ b/src/virtManager/storagebrowse.py Tue Feb 23 14:18:12 2010 -0500
|
||||
@@ -90,7 +90,6 @@
|
||||
|
||||
def show(self, conn=None):
|
||||
self.reset_state(conn)
|
||||
- self.topwin.show()
|
||||
self.topwin.present()
|
||||
|
||||
def close(self, ignore1=None, ignore2=None):
|
20
virt-manager-0.8.4-close-remote-error.patch
Normal file
20
virt-manager-0.8.4-close-remote-error.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1271858884 14400
|
||||
# Node ID 33ec21628630a9b468150b1eba635b1a83fc8a36
|
||||
# Parent 41182500ddeff72cb9b875f3884042b922ed8c15
|
||||
Only close connection on error from 'remote' error domain.
|
||||
|
||||
diff -r 41182500ddef -r 33ec21628630 src/virtManager/engine.py
|
||||
--- a/src/virtManager/engine.py Sun Apr 18 00:15:36 2010 -0500
|
||||
+++ b/src/virtManager/engine.py Wed Apr 21 10:08:04 2010 -0400
|
||||
@@ -428,7 +428,8 @@
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except libvirt.libvirtError, e:
|
||||
- if e.get_error_code() == libvirt.VIR_ERR_SYSTEM_ERROR:
|
||||
+ if (e.get_error_domain() == libvirt.VIR_FROM_REMOTE and
|
||||
+ e.get_error_code() == libvirt.VIR_ERR_SYSTEM_ERROR):
|
||||
logging.exception("Could not refresh connection %s." % uri)
|
||||
logging.debug("Closing connection since libvirtd "
|
||||
"appears to have stopped.")
|
28
virt-manager-0.8.4-fix-border.patch
Normal file
28
virt-manager-0.8.4-fix-border.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1273508425 14400
|
||||
# Node ID b2a12e3e2691e1dc7f485de58899b232cbc1a880
|
||||
# Parent f2d3931243fe7576701dec6deddf19cfc0145409
|
||||
manager: Remove borders from VM list
|
||||
|
||||
diff -r f2d3931243fe -r b2a12e3e2691 src/vmm-manager.glade
|
||||
--- a/src/vmm-manager.glade Thu May 06 13:54:16 2010 -0400
|
||||
+++ b/src/vmm-manager.glade Mon May 10 12:20:25 2010 -0400
|
||||
@@ -345,13 +345,16 @@
|
||||
<widget class="GtkNotebook" id="vm-notebook">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
+ <property name="show_border">False</property>
|
||||
+ <property name="tab_border">0</property>
|
||||
+ <property name="tab_hborder">0</property>
|
||||
+ <property name="tab_vborder">0</property>
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">automatic</property>
|
||||
<property name="vscrollbar_policy">automatic</property>
|
||||
- <property name="shadow_type">in</property>
|
||||
<child>
|
||||
<widget class="GtkTreeView" id="vm-list">
|
||||
<property name="visible">True</property>
|
93
virt-manager-0.8.4-fix-icon-install.patch
Normal file
93
virt-manager-0.8.4-fix-icon-install.patch
Normal file
@@ -0,0 +1,93 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1270757920 14400
|
||||
# Node ID 5e11e6b33fec05dc5cd155ee9931464c2e10ef2b
|
||||
# Parent 4c80ef09e3f03acdc7e6ec10e70812a263ef8d45
|
||||
Fix custom icon installation.
|
||||
|
||||
diff -r 4c80ef09e3f0 -r 5e11e6b33fec pixmaps/hicolor/16x16/actions/Makefile.am
|
||||
--- a/pixmaps/hicolor/16x16/actions/Makefile.am Thu Apr 08 10:26:41 2010 +0000
|
||||
+++ b/pixmaps/hicolor/16x16/actions/Makefile.am Thu Apr 08 16:18:40 2010 -0400
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
-pixmapdir = $(pkgdatadir)/pixmaps/hicolor/16x16/action
|
||||
+pixmapdir = $(pkgdatadir)/pixmaps/hicolor/16x16/actions
|
||||
pixmap_DATA = $(wildcard *.png)
|
||||
|
||||
EXTRA_DIST = $(pixmap_DATA)
|
||||
diff -r 4c80ef09e3f0 -r 5e11e6b33fec pixmaps/hicolor/22x22/actions/Makefile.am
|
||||
--- a/pixmaps/hicolor/22x22/actions/Makefile.am Thu Apr 08 10:26:41 2010 +0000
|
||||
+++ b/pixmaps/hicolor/22x22/actions/Makefile.am Thu Apr 08 16:18:40 2010 -0400
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
-pixmapdir = $(pkgdatadir)/pixmaps/hicolor/22x22/action
|
||||
+pixmapdir = $(pkgdatadir)/pixmaps/hicolor/22x22/actions
|
||||
pixmap_DATA = $(wildcard *.png)
|
||||
|
||||
EXTRA_DIST = $(pixmap_DATA)
|
||||
diff -r 4c80ef09e3f0 -r 5e11e6b33fec pixmaps/hicolor/24x24/actions/Makefile.am
|
||||
--- a/pixmaps/hicolor/24x24/actions/Makefile.am Thu Apr 08 10:26:41 2010 +0000
|
||||
+++ b/pixmaps/hicolor/24x24/actions/Makefile.am Thu Apr 08 16:18:40 2010 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-pixmapdir = $(pkgdatadir)/pixmaps/hicolor/24x24/action
|
||||
+pixmapdir = $(pkgdatadir)/pixmaps/hicolor/24x24/actions
|
||||
pixmap_DATA = $(wildcard *.png)
|
||||
|
||||
EXTRA_DIST = $(pixmap_DATA)
|
||||
diff -r 4c80ef09e3f0 -r 5e11e6b33fec pixmaps/hicolor/32x32/actions/Makefile.am
|
||||
--- a/pixmaps/hicolor/32x32/actions/Makefile.am Thu Apr 08 10:26:41 2010 +0000
|
||||
+++ b/pixmaps/hicolor/32x32/actions/Makefile.am Thu Apr 08 16:18:40 2010 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-pixmapdir = $(pkgdatadir)/pixmaps/hicolor/32x32/action
|
||||
+pixmapdir = $(pkgdatadir)/pixmaps/hicolor/32x32/actions
|
||||
pixmap_DATA = $(wildcard *.png)
|
||||
|
||||
EXTRA_DIST = $(pixmap_DATA)
|
||||
diff -rup virt-manager-0.8.4/pixmaps/hicolor/16x16/actions/Makefile.in new/pixmaps/hicolor/16x16/actions/Makefile.in
|
||||
--- virt-manager-0.8.4/pixmaps/hicolor/16x16/actions/Makefile.in 2010-03-24 11:55:07.000000000 -0400
|
||||
+++ new/pixmaps/hicolor/16x16/actions/Makefile.in 2010-05-13 14:59:44.281882000 -0400
|
||||
@@ -184,7 +184,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-pixmapdir = $(pkgdatadir)/pixmaps/hicolor/16x16/action
|
||||
+pixmapdir = $(pkgdatadir)/pixmaps/hicolor/16x16/actions
|
||||
pixmap_DATA = $(wildcard *.png)
|
||||
EXTRA_DIST = $(pixmap_DATA)
|
||||
all: all-am
|
||||
diff -rup virt-manager-0.8.4/pixmaps/hicolor/22x22/actions/Makefile.in new/pixmaps/hicolor/22x22/actions/Makefile.in
|
||||
--- virt-manager-0.8.4/pixmaps/hicolor/22x22/actions/Makefile.in 2010-03-24 11:55:07.000000000 -0400
|
||||
+++ new/pixmaps/hicolor/22x22/actions/Makefile.in 2010-05-13 14:59:44.416882000 -0400
|
||||
@@ -184,7 +184,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-pixmapdir = $(pkgdatadir)/pixmaps/hicolor/22x22/action
|
||||
+pixmapdir = $(pkgdatadir)/pixmaps/hicolor/22x22/actions
|
||||
pixmap_DATA = $(wildcard *.png)
|
||||
EXTRA_DIST = $(pixmap_DATA)
|
||||
all: all-am
|
||||
diff -rup virt-manager-0.8.4/pixmaps/hicolor/24x24/actions/Makefile.in new/pixmaps/hicolor/24x24/actions/Makefile.in
|
||||
--- virt-manager-0.8.4/pixmaps/hicolor/24x24/actions/Makefile.in 2010-03-24 11:55:07.000000000 -0400
|
||||
+++ new/pixmaps/hicolor/24x24/actions/Makefile.in 2010-05-13 14:59:44.547881000 -0400
|
||||
@@ -184,7 +184,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-pixmapdir = $(pkgdatadir)/pixmaps/hicolor/24x24/action
|
||||
+pixmapdir = $(pkgdatadir)/pixmaps/hicolor/24x24/actions
|
||||
pixmap_DATA = $(wildcard *.png)
|
||||
EXTRA_DIST = $(pixmap_DATA)
|
||||
all: all-am
|
||||
diff -rup virt-manager-0.8.4/pixmaps/hicolor/32x32/actions/Makefile.in new/pixmaps/hicolor/32x32/actions/Makefile.in
|
||||
--- virt-manager-0.8.4/pixmaps/hicolor/32x32/actions/Makefile.in 2010-03-24 11:55:07.000000000 -0400
|
||||
+++ new/pixmaps/hicolor/32x32/actions/Makefile.in 2010-05-13 14:59:44.676885000 -0400
|
||||
@@ -184,7 +184,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-pixmapdir = $(pkgdatadir)/pixmaps/hicolor/32x32/action
|
||||
+pixmapdir = $(pkgdatadir)/pixmaps/hicolor/32x32/actions
|
||||
pixmap_DATA = $(wildcard *.png)
|
||||
EXTRA_DIST = $(pixmap_DATA)
|
||||
all: all-am
|
75
virt-manager-0.8.4-install-force-off.patch
Normal file
75
virt-manager-0.8.4-install-force-off.patch
Normal file
@@ -0,0 +1,75 @@
|
||||
diff -rup virt-manager-0.8.4/src/virtManager/create.py new/src/virtManager/create.py
|
||||
--- virt-manager-0.8.4/src/virtManager/create.py 2010-05-27 15:46:28.064880000 -0400
|
||||
+++ new/src/virtManager/create.py 2010-05-27 15:47:11.751259000 -0400
|
||||
@@ -1603,10 +1603,16 @@ class vmmCreate(gobject.GObject):
|
||||
# out handler, removing the virtinst_guest which
|
||||
# will force one final restart.
|
||||
virtinst_guest.continue_install()
|
||||
+
|
||||
util.connect_opt_out(vm, "status-changed",
|
||||
self.check_install_status, None)
|
||||
return True
|
||||
|
||||
+ if vm.get_install_abort():
|
||||
+ logging.debug("User manually shutdown VM, not restarting "
|
||||
+ "guest after install.")
|
||||
+ return True
|
||||
+
|
||||
logging.debug("Install should be completed, starting VM.")
|
||||
vm.startup()
|
||||
except Exception, e:
|
||||
diff -rup virt-manager-0.8.4/src/virtManager/domain.py new/src/virtManager/domain.py
|
||||
--- virt-manager-0.8.4/src/virtManager/domain.py 2010-05-27 15:46:28.008912000 -0400
|
||||
+++ new/src/virtManager/domain.py 2010-05-27 15:47:48.539183000 -0400
|
||||
@@ -75,6 +75,7 @@ class vmmDomainBase(vmmLibvirtObject):
|
||||
self._backend = backend
|
||||
self.uuid = uuid
|
||||
|
||||
+ self._install_abort = False
|
||||
self._startup_vcpus = None
|
||||
|
||||
self._network_traffic = None
|
||||
@@ -120,6 +121,13 @@ class vmmDomainBase(vmmLibvirtObject):
|
||||
def get_autostart(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
+ # If manual shutdown or destroy specified, make sure we don't continue
|
||||
+ # install process
|
||||
+ def set_install_abort(self, val):
|
||||
+ self._install_abort = bool(val)
|
||||
+ def get_install_abort(self):
|
||||
+ return bool(self._install_abort)
|
||||
+
|
||||
# Device/XML altering API
|
||||
def set_autostart(self, val):
|
||||
raise NotImplementedError()
|
||||
@@ -1274,11 +1282,13 @@ class vmmDomain(vmmDomainBase):
|
||||
reboot_listener, self)
|
||||
|
||||
def shutdown(self):
|
||||
+ self.set_install_abort(True)
|
||||
self._unregister_reboot_listener()
|
||||
self._backend.shutdown()
|
||||
self._update_status()
|
||||
|
||||
def reboot(self):
|
||||
+ self.set_install_abort(True)
|
||||
self._backend.reboot(0)
|
||||
self._update_status()
|
||||
|
||||
@@ -1298,6 +1308,7 @@ class vmmDomain(vmmDomainBase):
|
||||
self._update_status()
|
||||
|
||||
def save(self, filename, background=True):
|
||||
+ self.set_install_abort(True)
|
||||
if background:
|
||||
conn = util.dup_conn(self.config, self.connection)
|
||||
vm = conn.lookupByID(self.get_id())
|
||||
@@ -1308,6 +1319,7 @@ class vmmDomain(vmmDomainBase):
|
||||
self._update_status()
|
||||
|
||||
def destroy(self):
|
||||
+ self.set_install_abort(True)
|
||||
self._unregister_reboot_listener()
|
||||
self._backend.destroy()
|
||||
self._update_status()
|
22
virt-manager-0.8.4-livecd-customize.patch
Normal file
22
virt-manager-0.8.4-livecd-customize.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1273168456 14400
|
||||
# Node ID f2d3931243fe7576701dec6deddf19cfc0145409
|
||||
# Parent beb2272277eecd4bdc4015c905edf0b910bf9fa8
|
||||
Fix livecd 'customize before install' traceback
|
||||
|
||||
diff -r beb2272277ee -r f2d3931243fe src/virtManager/domain.py
|
||||
--- a/src/virtManager/domain.py Wed May 05 16:46:46 2010 -0400
|
||||
+++ b/src/virtManager/domain.py Thu May 06 13:54:16 2010 -0400
|
||||
@@ -1990,7 +1990,10 @@
|
||||
return libvirt.VIR_DOMAIN_SHUTOFF
|
||||
|
||||
def get_xml(self):
|
||||
- return self._backend.get_config_xml()
|
||||
+ xml = self._backend.get_config_xml()
|
||||
+ if not xml:
|
||||
+ xml = self._backend.get_config_xml(install=False)
|
||||
+ return xml
|
||||
def _get_inactive_xml(self):
|
||||
return self.get_xml()
|
||||
|
14
virt-manager-0.8.4-packagekit-packages.patch
Normal file
14
virt-manager-0.8.4-packagekit-packages.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff -rup virt-manager-0.8.4/src/virtManager/engine.py new/src/virtManager/engine.py
|
||||
--- virt-manager-0.8.4/src/virtManager/engine.py 2010-03-24 11:21:39.000000000 -0400
|
||||
+++ new/src/virtManager/engine.py 2010-03-24 19:57:56.000000000 -0400
|
||||
@@ -49,8 +49,8 @@ import virtManager.util as util
|
||||
|
||||
# List of packages to look for via packagekit at first startup.
|
||||
# If this list is empty, no attempt to contact packagekit is made
|
||||
-LIBVIRT_DAEMON = ""
|
||||
-HV_PACKAGE = ""
|
||||
+LIBVIRT_DAEMON = "libvirt"
|
||||
+HV_PACKAGE = "qemu-system-x86"
|
||||
OTHER_PACKAGES = []
|
||||
PACKAGEKIT_PACKAGES = []
|
||||
|
126
virt-manager-0.8.4-pool-refresh-button.patch
Normal file
126
virt-manager-0.8.4-pool-refresh-button.patch
Normal file
@@ -0,0 +1,126 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1271861766 14400
|
||||
# Node ID 679b824e92dc7c8c1966b0a01a37eaaea61ea1ef
|
||||
# Parent 33ec21628630a9b468150b1eba635b1a83fc8a36
|
||||
host: storage: Add pool refresh button
|
||||
|
||||
diff -r 33ec21628630 -r 679b824e92dc src/virtManager/host.py
|
||||
--- a/src/virtManager/host.py Wed Apr 21 10:08:04 2010 -0400
|
||||
+++ b/src/virtManager/host.py Wed Apr 21 10:56:06 2010 -0400
|
||||
@@ -128,6 +128,7 @@
|
||||
"on_pool_stop_clicked": self.stop_pool,
|
||||
"on_pool_start_clicked": self.start_pool,
|
||||
"on_pool_delete_clicked": self.delete_pool,
|
||||
+ "on_pool_refresh_clicked": self.pool_refresh,
|
||||
"on_pool_autostart_toggled": self.pool_autostart_changed,
|
||||
"on_vol_delete_clicked": self.delete_vol,
|
||||
"on_vol_list_button_press_event": self.popup_vol_menu,
|
||||
@@ -604,6 +605,19 @@
|
||||
self.err.show_err(_("Error deleting pool: %s") % str(e),
|
||||
"".join(traceback.format_exc()))
|
||||
|
||||
+ def pool_refresh(self, src):
|
||||
+ pool = self.current_pool()
|
||||
+ if pool is None:
|
||||
+ return
|
||||
+
|
||||
+ try:
|
||||
+ pool.refresh()
|
||||
+ self.refresh_current_pool()
|
||||
+ except Exception, e:
|
||||
+ self.err.show_err(_("Error refreshing pool '%s': %s") % \
|
||||
+ (pool.get_name(), str(e)),
|
||||
+ "".join(traceback.format_exc()))
|
||||
+
|
||||
def delete_vol(self, src):
|
||||
vol = self.current_vol()
|
||||
if vol is None:
|
||||
diff -r 33ec21628630 -r 679b824e92dc src/virtManager/storagepool.py
|
||||
--- a/src/virtManager/storagepool.py Wed Apr 21 10:08:04 2010 -0400
|
||||
+++ b/src/virtManager/storagepool.py Wed Apr 21 10:56:06 2010 -0400
|
||||
@@ -25,7 +25,9 @@
|
||||
from virtManager.storagevol import vmmStorageVolume
|
||||
|
||||
class vmmStoragePool(gobject.GObject):
|
||||
- __gsignals__ = { }
|
||||
+ __gsignals__ = {
|
||||
+ "refreshed": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, []),
|
||||
+ }
|
||||
|
||||
def __init__(self, config, connection, pool, uuid, active):
|
||||
self.__gobject_init__()
|
||||
@@ -40,8 +42,6 @@
|
||||
self._xml = None # xml cache
|
||||
|
||||
self.refresh()
|
||||
- self._update_xml()
|
||||
- self.update_volumes()
|
||||
|
||||
def set_active(self, state):
|
||||
self.active = state
|
||||
@@ -120,9 +120,13 @@
|
||||
return self._volumes[uuid]
|
||||
|
||||
def refresh(self):
|
||||
- if self.active:
|
||||
- self.pool.refresh(0)
|
||||
- self._update_xml()
|
||||
+ if not self.active:
|
||||
+ return
|
||||
+
|
||||
+ self.pool.refresh(0)
|
||||
+ self._update_xml()
|
||||
+ self.update_volumes()
|
||||
+ self.emit("refreshed")
|
||||
|
||||
def update_volumes(self):
|
||||
if not self.is_active():
|
||||
diff -r 33ec21628630 -r 679b824e92dc src/vmm-host.glade
|
||||
--- a/src/vmm-host.glade Wed Apr 21 10:08:04 2010 -0400
|
||||
+++ b/src/vmm-host.glade Wed Apr 21 10:56:06 2010 -0400
|
||||
@@ -1229,11 +1229,40 @@
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
- <widget class="GtkLabel" id="label77">
|
||||
+ <widget class="GtkHBox" id="hbox12">
|
||||
<property name="visible">True</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <property name="label" translatable="yes"><b>Volumes</b></property>
|
||||
- <property name="use_markup">True</property>
|
||||
+ <property name="spacing">6</property>
|
||||
+ <child>
|
||||
+ <widget class="GtkLabel" id="label77">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ <property name="label" translatable="yes"><b>Volumes</b></property>
|
||||
+ <property name="use_markup">True</property>
|
||||
+ </widget>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">False</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <widget class="GtkButton" id="pool-refresh">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="receives_default">True</property>
|
||||
+ <signal name="clicked" handler="on_pool_refresh_clicked"/>
|
||||
+ <child>
|
||||
+ <widget class="GtkImage" id="image8">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="stock">gtk-refresh</property>
|
||||
+ </widget>
|
||||
+ </child>
|
||||
+ </widget>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="position">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
45
virt-manager-0.8.4-vnc-auto-keymap.patch
Normal file
45
virt-manager-0.8.4-vnc-auto-keymap.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1273090006 14400
|
||||
# Node ID 7b09131ffffcb9a49fbd2a9dae60530786d4d753
|
||||
# Parent 99cf13a133f304abf4597194070aec5d397234c7
|
||||
Specify connection when building all virtinst devices
|
||||
|
||||
diff -r 99cf13a133f3 -r 7b09131ffffc src/virtManager/addhardware.py
|
||||
--- a/src/virtManager/addhardware.py Wed May 05 15:57:00 2010 -0400
|
||||
+++ b/src/virtManager/addhardware.py Wed May 05 16:06:46 2010 -0400
|
||||
@@ -1222,7 +1222,8 @@
|
||||
def validate_page_sound(self):
|
||||
smodel = self.get_config_sound_model()
|
||||
try:
|
||||
- self._dev = virtinst.VirtualAudio(model=smodel)
|
||||
+ self._dev = virtinst.VirtualAudio(conn=self.conn.vmm,
|
||||
+ model=smodel)
|
||||
except Exception, e:
|
||||
return self.err.val_err(_("Sound device parameter error"), str(e))
|
||||
|
||||
diff -r 99cf13a133f3 -r 7b09131ffffc src/virtManager/create.py
|
||||
--- a/src/virtManager/create.py Wed May 05 15:57:00 2010 -0400
|
||||
+++ b/src/virtManager/create.py Wed May 05 16:06:46 2010 -0400
|
||||
@@ -1123,7 +1123,7 @@
|
||||
guest.sound_devs = []
|
||||
try:
|
||||
if self.get_config_sound():
|
||||
- guest.sound_devs.append(virtinst.VirtualAudio())
|
||||
+ guest.sound_devs.append(virtinst.VirtualAudio(conn=guest.conn))
|
||||
except Exception, e:
|
||||
self.err.show_err(_("Error setting up sound device:") + str(e),
|
||||
"".join(traceback.format_exc()))
|
||||
diff -r 99cf13a133f3 -r 7b09131ffffc src/virtManager/uihelpers.py
|
||||
--- a/src/virtManager/uihelpers.py Wed May 05 15:57:00 2010 -0400
|
||||
+++ b/src/virtManager/uihelpers.py Wed May 05 16:06:46 2010 -0400
|
||||
@@ -431,7 +431,8 @@
|
||||
elif nettype == VirtualNetworkInterface.TYPE_USER:
|
||||
pass
|
||||
|
||||
- net = VirtualNetworkInterface(type = nettype,
|
||||
+ net = VirtualNetworkInterface(conn = conn.vmm,
|
||||
+ type = nettype,
|
||||
bridge = bridge,
|
||||
network = netname,
|
||||
macaddr = macaddr,
|
25
virt-manager-0.8.4-vnc-reconnect-traceback.patch
Normal file
25
virt-manager-0.8.4-vnc-reconnect-traceback.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1271108805 14400
|
||||
# Node ID c206b12a8c7aa6946bfdca39cc429dd7fd258f2a
|
||||
# Parent f09702cfdb03a8902c2dac88d26fec342759f35f
|
||||
console: Don't through traceback if we can't read error fd.
|
||||
|
||||
This is racy and best effort, so don't log errors if we fail.
|
||||
|
||||
diff -r f09702cfdb03 -r c206b12a8c7a src/virtManager/console.py
|
||||
--- a/src/virtManager/console.py Mon Apr 12 17:45:54 2010 -0400
|
||||
+++ b/src/virtManager/console.py Mon Apr 12 17:46:45 2010 -0400
|
||||
@@ -573,7 +573,11 @@
|
||||
errfd = self.vncTunnel[1]
|
||||
errout = ""
|
||||
while True:
|
||||
- new = errfd.recv(1024)
|
||||
+ try:
|
||||
+ new = errfd.recv(1024)
|
||||
+ except:
|
||||
+ break
|
||||
+
|
||||
if not new:
|
||||
break
|
||||
|
38
virt-manager-0.8.4-vnc-zsh.patch
Normal file
38
virt-manager-0.8.4-vnc-zsh.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1271108754 14400
|
||||
# Node ID f09702cfdb03a8902c2dac88d26fec342759f35f
|
||||
# Parent 82cef5edeb6e4b660cacc603d00df0d0b6f90d66
|
||||
console: Fix VNC over ssh when using zsh on remote machine
|
||||
|
||||
diff -r 82cef5edeb6e -r f09702cfdb03 src/virtManager/console.py
|
||||
--- a/src/virtManager/console.py Mon Apr 12 17:43:55 2010 -0400
|
||||
+++ b/src/virtManager/console.py Mon Apr 12 17:45:54 2010 -0400
|
||||
@@ -521,7 +521,7 @@
|
||||
"else"
|
||||
" CMD='nc %(nc_params)s';"
|
||||
"fi;"
|
||||
- "$CMD;" % {'nc_params': nc_params}
|
||||
+ "sh -c $CMD;" % {'nc_params': nc_params}
|
||||
]
|
||||
|
||||
argv += nc_cmd
|
||||
# HG changeset patch
|
||||
# User Cole Robinson <crobinso@redhat.com>
|
||||
# Date 1271109105 14400
|
||||
# Node ID 907ee61e5558dbf8f0b7194d4882a19e66ee6437
|
||||
# Parent c206b12a8c7aa6946bfdca39cc429dd7fd258f2a
|
||||
console: Actually fix SSH with zsh
|
||||
|
||||
diff -r c206b12a8c7a -r 907ee61e5558 src/virtManager/console.py
|
||||
--- a/src/virtManager/console.py Mon Apr 12 17:46:45 2010 -0400
|
||||
+++ b/src/virtManager/console.py Mon Apr 12 17:51:45 2010 -0400
|
||||
@@ -521,7 +521,7 @@
|
||||
"else"
|
||||
" CMD='nc %(nc_params)s';"
|
||||
"fi;"
|
||||
- "sh -c $CMD;" % {'nc_params': nc_params}
|
||||
+ "sh -c \"$CMD\";" % {'nc_params': nc_params}
|
||||
]
|
||||
|
||||
argv += nc_cmd
|
@@ -7,8 +7,8 @@
|
||||
%define _extra_release %{?dist:%{dist}}%{!?dist:%{?extra_release:%{extra_release}}}
|
||||
|
||||
Name: virt-manager
|
||||
Version: 0.8.3
|
||||
Release: 3%{_extra_release}
|
||||
Version: 0.8.4
|
||||
Release: 1%{_extra_release}
|
||||
Summary: Virtual Machine Manager
|
||||
|
||||
Group: Applications/Emulators
|
||||
@@ -20,21 +20,25 @@ BuildArch: noarch
|
||||
# Check QEMU permissions against the qemu user
|
||||
Patch1: %{name}-%{version}-perms-qemu-user.patch
|
||||
# Fix using a manual 'default' pool (bz 557020)
|
||||
Patch2: %{name}-%{version}-manual-default-pool.patch
|
||||
# Don't force grab focus when app is run (bz 548430)
|
||||
Patch3: %{name}-%{version}-stop-focus-grab.patch
|
||||
# Check packagekit for KVM and libvirtd (bz 513494)
|
||||
Patch4: %{name}-%{version}-check-packagekit.patch
|
||||
# Fake a reboot implementation if libvirt doesn't support it (bz 532216)
|
||||
Patch5: %{name}-%{version}-fake-reboot.patch
|
||||
# Mark some strings as translatable (bz 572645)
|
||||
Patch6: %{name}-%{version}-mark-translatable-strings.patch
|
||||
# Fix volume creation from 'New VM' wizard (bz 579039)
|
||||
Patch7: %{name}-%{version}-fix-vol-finish.patch
|
||||
# Fix firstrun app lock up when calling PackageKit
|
||||
Patch8: %{name}-%{version}-fix-pkit-deadlock.patch
|
||||
# Fix File->Add Connection (bz 580578)
|
||||
Patch9: %{name}-%{version}-fix-open-conn.patch
|
||||
Patch2: %{name}-%{version}-packagekit-packages.patch
|
||||
# Only close connection on specific remote errors
|
||||
Patch3: %{name}-%{version}-close-remote-error.patch
|
||||
# Fix weird border in manager UI (bz 583728)
|
||||
Patch4: %{name}-%{version}-fix-border.patch
|
||||
# Fix broken icons
|
||||
Patch5: %{name}-%{version}-fix-icon-install.patch
|
||||
# Cancel post-install reboot if VM is forced off
|
||||
Patch6: %{name}-%{version}-install-force-off.patch
|
||||
# Fix traceback if customizing a livecd install (bz 583712)
|
||||
Patch7: %{name}-%{version}-livecd-customize.patch
|
||||
# Add pool refresh button
|
||||
Patch8: %{name}-%{version}-pool-refresh-button.patch
|
||||
# Properly autodetect VNC keymap (bz 586201)
|
||||
Patch9: %{name}-%{version}-vnc-auto-keymap.patch
|
||||
# Fix traceback when reconnecting to remote VNC console (bz 588254)
|
||||
Patch10: %{name}-%{version}-vnc-reconnect-traceback.patch
|
||||
# Fix remote VNC connection with zsh as default shell
|
||||
Patch11: %{name}-%{version}-vnc-zsh.patch
|
||||
|
||||
# These two are just the oldest version tested
|
||||
Requires: pygtk2 >= 1.99.12-6
|
||||
@@ -54,7 +58,7 @@ Requires: gnome-python2-gnomekeyring >= 2.15.4
|
||||
# Minimum we've tested with
|
||||
Requires: libxml2-python >= 2.6.23
|
||||
# Required to install Xen & QEMU guests
|
||||
Requires: python-virtinst >= 0.500.2
|
||||
Requires: python-virtinst >= 0.500.3
|
||||
# Required for loading the glade UI
|
||||
Requires: pygtk2-libglade
|
||||
# Required for our graphics which are currently SVG format
|
||||
@@ -102,6 +106,8 @@ management API.
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
@@ -175,6 +181,14 @@ fi
|
||||
%{_datadir}/dbus-1/services/%{name}.service
|
||||
|
||||
%changelog
|
||||
* Thu May 27 2010 Cole Robinson <crobinso@redhat.com> - 0.8.4-1.fc13
|
||||
- Update to version 0.8.4
|
||||
- 'Import' install option, to create a VM around an existing OS image
|
||||
- Support multiple boot devices and boot order
|
||||
- Watchdog device support
|
||||
- Enable setting a human readable VM description.
|
||||
- Option to manually specifying a bridge name, if bridge isn't detected
|
||||
|
||||
* Wed Apr 14 2010 Cole Robinson <crobinso@redhat.com> - 0.8.3-3.fc13
|
||||
- Fix volume creation from 'New VM' wizard (bz 579039)
|
||||
- Fix firstrun app lock up when calling PackageKit
|
||||
|
Reference in New Issue
Block a user