9bd84112f9
virt-manager.spec - bnc#801987 - virt-manager is not able to create new VM in qemu Updated virtman-vminstall.diff - fate##314135: Support PVSCSI on XEN and VirtioSCSI on KVM - Implement pass through block device - fate##313076: HBA passthrough for kvm virtman-git-scsi.diff virtman-git-scsi-lun.diff OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=111
90 lines
3.8 KiB
Diff
90 lines
3.8 KiB
Diff
Index: virt-manager-0.9.4/src/virtManager/engine.py
|
|
===================================================================
|
|
--- virt-manager-0.9.4.orig/src/virtManager/engine.py
|
|
+++ virt-manager-0.9.4/src/virtManager/engine.py
|
|
@@ -24,6 +24,7 @@ import gtk
|
|
import logging
|
|
import threading
|
|
import os
|
|
+import traceback
|
|
|
|
import libvirt
|
|
import virtinst
|
|
@@ -42,7 +43,6 @@ from virtManager.manager import vmmManag
|
|
from virtManager.migrate import vmmMigrateDialog
|
|
from virtManager.details import vmmDetails
|
|
from virtManager.asyncjob import vmmAsyncJob
|
|
-from virtManager.create import vmmCreate
|
|
from virtManager.host import vmmHost
|
|
from virtManager.error import vmmErrorDialog
|
|
from virtManager.systray import vmmSystray
|
|
@@ -671,11 +671,47 @@ class vmmEngine(vmmGObject):
|
|
self.windowCreate = obj
|
|
return self.windowCreate
|
|
|
|
+ def _vmmcreate_closing(self,signal,key):
|
|
+ self.windowCreate = None
|
|
+
|
|
def _do_show_create(self, src, uri):
|
|
- try:
|
|
- self._get_create_dialog().show(src.topwin, uri)
|
|
- except Exception, e:
|
|
- src.err.show_err(_("Error launching manager: %s") % str(e))
|
|
+ if uri is None:
|
|
+ uri = default_uri()
|
|
+ conn = self._lookup_conn(uri)
|
|
+ do_remote = conn.is_remote()
|
|
+ if self.windowCreate == None or do_remote != self.remote_install:
|
|
+ try:
|
|
+ if do_remote:
|
|
+ from virtManager.create import vmmCreate
|
|
+ create = vmmCreate(self)
|
|
+ create.connect("action-show-vm", self._do_show_vm)
|
|
+ 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(src.topwin, uri)
|
|
+ else:
|
|
+ from vminstall.gtk.interface import VMCreate as vmmCreate
|
|
+ create = vmmCreate(virtman=True,key=0)
|
|
+ create.connect("action-show-vm", self._do_show_vm)
|
|
+ create.connect("vmmcreate-closing", self._vmmcreate_closing)
|
|
+ self.remote_install = False
|
|
+ self.windowCreate = create
|
|
+ self.windowCreate.show(src.topwin)
|
|
+ except Exception, e:
|
|
+ src.err.show_err(_("Error launching manager: %s") % str(e),
|
|
+ "".join(traceback.format_exc()))
|
|
+ else:
|
|
+ if do_remote:
|
|
+ self.windowCreate.show(src.topwin, 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 _do_show_migrate(self, src, uri, uuid):
|
|
try:
|
|
Index: virt-manager-0.9.4/src/virtManager/create.py
|
|
===================================================================
|
|
--- virt-manager-0.9.4.orig/src/virtManager/create.py
|
|
+++ virt-manager-0.9.4/src/virtManager/create.py
|
|
@@ -176,6 +176,7 @@ class vmmCreate(vmmGObjectUI):
|
|
|
|
def close(self, ignore1=None, ignore2=None):
|
|
logging.debug("Closing new vm wizard")
|
|
+ self.emit('vmmcreate-closing', 0)
|
|
self.topwin.hide()
|
|
self.remove_timers()
|
|
|
|
@@ -2152,3 +2153,4 @@ class vmmCreate(vmmGObjectUI):
|
|
vmmGObjectUI.type_register(vmmCreate)
|
|
vmmCreate.signal_new(vmmCreate, "action-show-vm", [str, str])
|
|
vmmCreate.signal_new(vmmCreate, "action-show-help", [str])
|
|
+vmmCreate.signal_new(vmmCreate, "vmmcreate-closing", [str])
|