XenAPI: migrate ephemeral disks instead of re-creating

Registered by John Garbutt

When migrating, the xenapi driver currently drops the ephemeral disk, and re-creates it on the destination. This doesn't really fit the use cases properly, we should migrate both the root and ephemeral disks.

If machine is dead, use evacuate:
* volume root disk: reattach
* other disks: re-create, or download from glance

if machine is alive, use migrate:
* attempt to move disks to new host
* optionally turn off the VM to reduce stress on server

Where machine can still run a VM, as failure is not iminent, attempt live-migrate:
* only works with VM running (XenAPI limitation)
* does put a lot of stress on servers with mirroring the disk while copying the disk

Note: currently in the above middle migrate case, the ephemeral disk is deleted, rather than migrated. This blueprint aims to fix this, so the above use cases all make more sense.

Snapshots still do not backup the ephemeral disk, but this data should be kept during migrates, as this should just be a "maintenance" operation that is as transparent to the user as possible.

For consistency, this also means we should correctly resize ephemeral disk, rather than delete then re-create them on the destination.

Blueprint information

Russell Bryant
John Garbutt
John Garbutt
Series goal:
Accepted for icehouse
Milestone target:
milestone icon 2014.1
Started by
John Garbutt
Completed by
John Garbutt

Related branches



Gerrit topic: https://review.openstack.org/#q,topic:bp/xenapi-migrate-ephemeral-disks,n,z

Addressed by: https://review.openstack.org/49349
    xenapi: migrate multiple ephemeral disks

Addressed by: https://review.openstack.org/49346
    xenapi: make _migrate_disk_resizing_up use @step

Addressed by: https://review.openstack.org/49347
    xenapi: revert on _migrate_disk_resizing_up error

Addressed by: https://review.openstack.org/49348
    xenapi: simplify _migrate_disk_resizing_up


Work Items

Work items:
Enable migrate with ephemeral disks: DONE
Explicity disable resize of ephemeral disk: DONE

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.