- bnc#641977 - virt-manager can't create kvm virtual Machines on a
remote host. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=43
This commit is contained in:
parent
9118de92dc
commit
b334b4647f
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 7 16:31:05 MST 2011 - carnold@novell.com
|
||||
|
||||
- bnc#641977 - virt-manager can't create kvm virtual Machines on a
|
||||
remote host.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 20 14:01:21 MST 2010 - carnold@novell.com
|
||||
|
||||
|
@ -2,7 +2,7 @@ Index: virt-manager-0.8.5/src/virtManager/engine.py
|
||||
===================================================================
|
||||
--- virt-manager-0.8.5.orig/src/virtManager/engine.py
|
||||
+++ virt-manager-0.8.5/src/virtManager/engine.py
|
||||
@@ -704,7 +704,7 @@ class vmmEngine(gobject.GObject):
|
||||
@@ -719,7 +719,7 @@ class vmmEngine(gobject.GObject):
|
||||
self.emit("connection-added", conn)
|
||||
self.config.add_connection(conn.get_uri())
|
||||
if autoconnect:
|
||||
|
@ -2,7 +2,7 @@ Index: virt-manager-0.8.5/src/virtManager/engine.py
|
||||
===================================================================
|
||||
--- virt-manager-0.8.5.orig/src/virtManager/engine.py
|
||||
+++ virt-manager-0.8.5/src/virtManager/engine.py
|
||||
@@ -71,6 +71,7 @@ def default_uri():
|
||||
@@ -69,6 +69,7 @@ def default_uri():
|
||||
os.path.exists("/usr/bin/qemu") or
|
||||
os.path.exists("/usr/bin/qemu-kvm") or
|
||||
os.path.exists("/usr/bin/kvm") or
|
||||
|
@ -10,7 +10,7 @@ Index: virt-manager-0.8.5/src/virtManager/engine.py
|
||||
from virtManager.host import vmmHost
|
||||
from virtManager.error import vmmErrorDialog
|
||||
from virtManager.systray import vmmSystray
|
||||
@@ -665,13 +664,35 @@ class vmmEngine(gobject.GObject):
|
||||
@@ -665,13 +664,44 @@ class vmmEngine(gobject.GObject):
|
||||
return False
|
||||
return True
|
||||
|
||||
@ -18,35 +18,67 @@ Index: virt-manager-0.8.5/src/virtManager/engine.py
|
||||
+ self.windowCreate = None
|
||||
+
|
||||
def show_create(self, uri):
|
||||
if self.windowCreate == None:
|
||||
- if self.windowCreate == None:
|
||||
- create = vmmCreate(self.get_config(), self)
|
||||
- create.connect("action-show-console", self._do_show_console)
|
||||
- create.connect("action-show-help", self._do_show_help)
|
||||
+ conn = self._lookup_connection(uri)
|
||||
- self.windowCreate = create
|
||||
- self.windowCreate.show(uri)
|
||||
+ conn = self._lookup_connection(uri)
|
||||
+ do_remote = conn.is_remote()
|
||||
+ if self.windowCreate == None or do_remote != self.remote_install:
|
||||
+ try:
|
||||
+ if conn.is_remote():
|
||||
+ if do_remote:
|
||||
+ from virtManager.create import vmmCreate
|
||||
+ create = vmmCreate(self.get_config(),self)
|
||||
+ create.connect("action-show-console", self._do_show_console)
|
||||
+ create.connect("action-show-help", self._do_show_help)
|
||||
+ create.connect("vmmcreate-closing", self._vmmcreate_closing)
|
||||
+ self.remote_install = True
|
||||
+ self.windowCreate = create
|
||||
+ self.windowCreate.show(uri)
|
||||
+ else:
|
||||
+ from vminstall.gtk.interface import VMCreate as vmmCreate
|
||||
+ create = vmmCreate(virtman=True,key=0)
|
||||
+ create.connect("action-show-console", self._do_show_console)
|
||||
+ create.connect("vmmcreate-closing", self._vmmcreate_closing)
|
||||
+ self.remote_install = False
|
||||
+ self.windowCreate = create
|
||||
+ self.windowCreate.show()
|
||||
+ except Exception, e:
|
||||
+ self.err.show_err("%s" % str(e),"".join(traceback.format_exc()))
|
||||
self.windowCreate = create
|
||||
- self.windowCreate.show(uri)
|
||||
+ self.windowCreate.show()
|
||||
+ else:
|
||||
+ message_box = gtk.MessageDialog(None,
|
||||
+ gtk.DIALOG_MODAL,
|
||||
+ gtk.MESSAGE_WARNING,
|
||||
+ gtk.BUTTONS_OK,
|
||||
+ _("A new installation is already in progress.\n\nUse the YaST \"Create Virtual Machines\" utility for concurrent installations."))
|
||||
+ message_box.run()
|
||||
+ message_box.destroy()
|
||||
+ if do_remote:
|
||||
+ self.windowCreate.show(uri)
|
||||
+ else:
|
||||
+ message_box = gtk.MessageDialog(None,
|
||||
+ gtk.DIALOG_MODAL,
|
||||
+ gtk.MESSAGE_WARNING,
|
||||
+ gtk.BUTTONS_OK,
|
||||
+ _("A new installation is already in progress.\n\nUse the YaST \"Create Virtual Machines\" utility for concurrent installations."))
|
||||
+ message_box.run()
|
||||
+ message_box.destroy()
|
||||
|
||||
def add_connection(self, uri, readOnly=None, autoconnect=False):
|
||||
conn = vmmConnection(self.get_config(), uri, readOnly, self)
|
||||
Index: virt-manager-0.8.5/src/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-0.8.5.orig/src/virtManager/create.py
|
||||
+++ virt-manager-0.8.5/src/virtManager/create.py
|
||||
@@ -65,6 +65,8 @@ class vmmCreate(gobject.GObject):
|
||||
gobject.TYPE_NONE, (str,str)),
|
||||
"action-show-help": (gobject.SIGNAL_RUN_FIRST,
|
||||
gobject.TYPE_NONE, [str]),
|
||||
+ "vmmcreate-closing": (gobject.SIGNAL_RUN_FIRST,
|
||||
+ gobject.TYPE_NONE, (int,)),
|
||||
}
|
||||
|
||||
def __init__(self, config, engine):
|
||||
@@ -154,6 +156,7 @@ class vmmCreate(gobject.GObject):
|
||||
self.topwin.present()
|
||||
|
||||
def close(self, ignore1=None, ignore2=None):
|
||||
+ self.emit('vmmcreate-closing', 0)
|
||||
self.topwin.hide()
|
||||
self.remove_timers()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user