2011/5/27 Daniel P. Berrange <berrange(a)redhat.com>:
Switch virsh migrate over to use virDomainMigrate2 and
virDomainMigrateToURI2. This is still compatible with
older libvirts, because these methods dynamically choose
whether to perform v1, v2 or v3 migration based on declared
RPC support from the libvirtd instances
Add a --xml arg which allows the user to pass in a custom
XML document. This XML document must be ABI compatible
with the current *live* XML document for the running guest
on the source host. ABI compatibility will be enforced by
any driver supporting this function
* tools/virsh.c: Add '--xml' arg to migrate command
---
tools/virsh.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index b43c167..fd32309 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -3850,6 +3858,12 @@ doMigrate (void *opaque)
if (vshCommandOptBool (cmd, "copy-storage-inc"))
flags |= VIR_MIGRATE_NON_SHARED_INC;
+
+ if (xmlfile &&
+ virFileReadAll(xmlfile, 8192, &xml) < 0)
+ goto out;
+
+
Additional empty lines, could be removed here.
ACK.
Matthias