Commit Graph

5 Commits

Author SHA1 Message Date
Jim Fehlig
c4f66bb8be libxl: remove domain when migration prepare fails
In libxlDomainMigrationPrepare(), a new virDomainObj is created
from the incoming domain def and added to the driver's domain
list, but never removed if there are subsequent failures during
the prepare phase.

targethost# virsh list --all

sourcehost# virsh migrate --live dom xen+ssh://targethost/system
   error: operation failed: Fail to create socket for incoming migration.

targethost# virsh list --all
error: Failed to list domains
error: name in virGetDomain must not be NULL

After adding code to remove the domain on prepare failure, noticed
that libvirtd crashed due to double free of the virDomainDef.  Similar
to the qemu driver, pass a pointer to virDomainDefPtr so it can be set
to NULL once a virDomainObj is created from it.
2014-07-08 17:14:50 -06:00
Jim Fehlig
92cd6b677e libxl: rename goto label
In libxlDomainMigrationPrepare(), the cleanup label handles error
conditions and should be renamed as such for clarity.
2014-07-08 17:14:50 -06:00
Jason Andryuk
c1bc06e2d7 libxl: Use cooperative resume for migration
Migration code specifies the problematic non-cooperative resume mode
which is a known issue with Xen's libxl [1].  Instead, use the better
supported cooperative mode.

Without this, guests BUG() in xen_irq_resume after failing to bind
still-bound event channels.

[1] http://bugs.xenproject.org/xen/bug/30
2014-06-20 11:34:26 -06:00
John Ferlan
5ca7c95549 libxl: Resolve Coverity warnings
Resolve two Coverity issues introduced by commit id '9b8d6e1e'

Signed-off-by: John Ferlan <jferlan@redhat.com>
2014-06-11 14:58:20 -04:00
Jim Fehlig
9b8d6e1eef libxl: add migration support
This patch adds initial migration support to the libxl driver,
using the VIR_DRV_FEATURE_MIGRATION_PARAMS family of migration
functions.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
2014-06-04 21:01:07 -06:00