On Thu, Mar 10, 2016 at 11:59:29 +0300, Dmitry Andreev wrote:
Migration API allows to specify a destination domain XML. If no XML
was
specified the source one is used.
Offline domain has only inactive XML and it is replaced by specified
destination XML.
Live migration allows to persist domain on a destination host. In this
case both inactive and active XML should be replaced with specified XML.
The problem is that specified XML only replaces an active one.
https://bugzilla.redhat.com/show_bug.cgi?id=835300
This commit adds a migration cookie with specified destination XML at a
migration beginning phase and sets this XML to destination domain on
the next step.
This is not the right way to fix the issue. Currently, we send
persistent definition at the end of the Perform phase and Finish
processes it at the destination. If you change this, migration between
old and new libvirt (in any combination) will be broken. The patch
should really only change what XML is passed to the other host. And
perhaps we may need to introduce another parameter so that the
persistent XML can be specified separately. I can imagine a valid case
when one wants to keep the persistent XML in sync with the source host
even when passing a custom active XML to the migration API.
Jirka