stepping-stone / vm-manager

The stoney cloud web interface.
http://www.stoney-cloud.org/
Other
0 stars 0 forks source link

Spice password gets lost during migration #5

Closed dev-zero closed 11 years ago

dev-zero commented 11 years ago

When getting the XML via libvirt_domain_get_xml_desc the spice password is missing since no flags are passed. Instead VIR_DOMAIN_XML_SECURE should be passed as the only flag making sure the XML returned still contains the spice password and therefore the Qemu process on the target machine still has a password set for spice.

dev-zero commented 11 years ago

The first patch looks ok, but there was a typo: self::$_VIR_DOMAIN_XML_SECURE instead of self::$VIR_DOMAIN_XML_SECURE.

While checking the code I noted there is a VIR_DOMAIN_XML_MIGRATABLE, we should use that one instead.

The php-bindings of the libvirt_domain_get_xml_desc have an additional parameter (compared to the libvirt C-equivalent) which needs to be set to NULL, so the complete code which works looks like: $xmllibvirt = libvirt_domain_get_xml_desc($domain, NULL, self::$VIR_DOMAIN_XML_MIGRATABLE);

dev-zero commented 11 years ago

Please also update the patch for the broker-daemon to use VIR_DOMAIN_XML_MIGRATABLE

dev-zero commented 11 years ago

Ok, there seems to be a bug in libvirt: https://bugzilla.redhat.com/show_bug.cgi?id=994364 which gets triggered as soon as the unsafe-migration flag is dropped, So, please use VIR_DOMAIN_XML_SECURE for now to work around it.