Here's another patch I've been neglecting to forward. :( Requests to kvm to save its state is sent from a different thread, but on the same connection as any other communication with the relevant libvirtd instance. This has a good chance of causing responses to come back out of order, and that makes libvirt cry. :(
This patch creates a separate connection for the save operation. I'm almost sure it's not correct, but it seems to do the job. :) -- Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/
Index: virt-manager-0.5.3/src/virtManager/engine.py
===================================================================
--- virt-manager-0.5.3.orig/src/virtManager/engine.py 2008-03-12 14:46:12.316814503 +0100
+++ virt-manager-0.5.3/src/virtManager/engine.py 2008-03-13 00:11:46.836312746 +0100
@@ -318,8 +318,10 @@
self.connections[uri]["windowCreate"] = create
self.connections[uri]["windowCreate"].show()
- def add_connection(self, uri, readOnly=None):
+ def add_connection(self, uri, readOnly=None, privateConnection=False):
conn = vmmConnection(self.get_config(), uri, readOnly)
+ if privateConnection:
+ return conn
self.connections[uri] = {
"connection": conn,
"windowHost": None,
@@ -350,14 +352,20 @@
return handle_id
- def get_connection(self, uri, readOnly=None):
- if not(self.connections.has_key(uri)):
- self.add_connection(uri, readOnly)
+ def get_connection(self, uri, readOnly=None, privateConnection=False):
+ if not privateConnection:
+ if not(self.connections.has_key(uri)):
+ self.add_connection(uri, readOnly)
+ else:
+ return self.add_connection(uri, readOnly, True)
return self.connections[uri]["connection"]
def save_domain(self, src, uri, uuid):
- con = self.get_connection(uri, False)
+ con = self.get_connection(uri, False, True)
+ con.open()
+ # Needed to let the connection know about all the vms
+ con.tick()
if con.is_remote():
warn = gtk.MessageDialog(src.window.get_widget("vmm-details"),
gtk.DIALOG_DESTROY_WITH_PARENT,
signature.asc
Description: Digital signature
_______________________________________________ et-mgmt-tools mailing list [email protected] https://www.redhat.com/mailman/listinfo/et-mgmt-tools
