You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CloudStack administrator can move a running Instance from one host to
669
-
another without interrupting service to Users or going into maintenance
670
-
mode. This is called manual live migration, and can be done under the
671
-
following conditions:
669
+
another without interrupting service to Users and without putting the source
670
+
host into maintenance mode. This is called manual live migration.
672
671
673
-
- The root administrator is logged in. Domain admins and Users can not
674
-
perform manual live migration of Instances.
672
+
Prerequisites
673
+
~~~~~~~~~~~~~
675
674
676
-
- The Instance is running. Stopped Instances can not be live migrated.
675
+
- You are logged in as root administrator. Domain admins and Users can not
676
+
live migrate Instances.
677
677
678
-
- The destination host must have enough available capacity. If not, the
679
-
Instance will remain in the "migrating" state until memory becomes
680
-
available.
678
+
- The Instance is Running. To move the volumes of a stopped Instance, see
679
+
`Moving Instance's Volumes Between Storage Pools (Offline Volume Migration)`_
680
+
below.
681
681
682
-
- (KVM) The Instance must not be using local disk storage. (On XenServer and
683
-
VMware, Instance live migration with local disk is enabled by CloudStack
684
-
support for XenMotion and vMotion.)
682
+
- The destination host runs the same hypervisor as the source host, is Up and
683
+
Enabled, and has enough available capacity for the Instance. If no host
684
+
satisfies these conditions, the migration is refused and the Instance keeps
685
+
running where it is.
685
686
686
-
- (KVM) The destination host must be in the same cluster as the
687
-
original host. (On XenServer and VMware, Instance live migration from one
688
-
cluster to another is enabled by CloudStack support for XenMotion and
689
-
vMotion.)
687
+
- The destination host can access the storage that the Instance's volumes will
688
+
be placed on after the migration.
690
689
691
-
To manually live migrate an Instance
690
+
What Moves During a Live Migration
691
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
692
+
693
+
Depending on where the volumes are stored, either one or two things are
694
+
transferred:
695
+
696
+
- **The Instance only.** Every volume already resides on storage that the
697
+
destination host can access, so only the CPU and memory state is
698
+
transferred. Nothing is copied on the storage side.
699
+
700
+
- **The Instance and some of its volumes (live storage migration).** A volume
701
+
resides on storage that the destination host can not access (for example
702
+
local storage, or cluster-wide storage belonging to another cluster) so
703
+
that volume is moved as part of the migration.
704
+
705
+
CloudStack evaluates this per volume and leaves untouched every volume that
706
+
does not have to move. An Instance with its root volume on cluster-wide NFS and
707
+
a data volume on zone-wide storage can therefore be migrated to another cluster
708
+
by moving only the root volume.
709
+
710
+
KVM Live Migration Compatibility
711
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
712
+
713
+
.. note::
714
+
Since CloudStack 4.15.0, KVM Instances can be live migrated **between hosts
715
+
of different clusters** of the same pod, including Instances that use local
716
+
storage. It is no longer required for the source and the destination host to
717
+
belong to the same cluster.
718
+
719
+
During a KVM live storage migration, the disk contents are streamed directly
720
+
from the source host to the destination host over the QEMU/libvirt migration
721
+
channel. Secondary storage is **not** used as an intermediate step, unlike in
722
+
the offline volume migration described in the next section.
723
+
724
+
The table below lists which primary storage types support having a volume moved
725
+
during a KVM live migration.
726
+
727
+
.. list-table::
728
+
:header-rows: 1
729
+
:widths: 25 20 55
730
+
731
+
* - Primary storage type
732
+
- Live migration with storage
733
+
- Notes
734
+
* - NFS
735
+
- Supported
736
+
- Since 4.13.0.
737
+
* - Local storage
738
+
- Supported
739
+
- Since 4.12.0.
740
+
* - SharedMountPoint
741
+
- Supported
742
+
- Since 4.16.0.
743
+
* - CLVM and CLVM_NG
744
+
- Supported
745
+
- Since 4.23.0. The volume is always copied in full, as incremental
746
+
copies are not possible on block devices.
747
+
* - Ceph/RBD
748
+
- Not supported
749
+
- The volume has to remain on its current storage pool.
750
+
* - Managed storage
751
+
- Not supported
752
+
- For example PowerFlex/ScaleIO and SolidFire. The volume has to remain
753
+
on its current storage pool.
754
+
755
+
The restriction on Ceph/RBD and managed storage only applies to volumes that
756
+
would have to move. As those storage types are normally configured zone-wide,
757
+
the destination host can usually access them, and the Instance itself still
758
+
migrates freely between clusters.
759
+
760
+
PowerFlex/ScaleIO volumes are an exception: they can not be moved as part of an
761
+
Instance migration, but they can be live migrated on their own, from one
762
+
PowerFlex/ScaleIO storage pool to another, while the Instance keeps running.
763
+
See `Migrating an Instance Volume to a New Storage Pool <storage.html#migrating-an-instance-volume-to-a-new-storage-pool>`_.
764
+
765
+
.. note::
766
+
When the destination pool is NFS, local storage or SharedMountPoint and the
767
+
root volume was deployed from a template, CloudStack copies the template
768
+
from secondary storage to the destination pool if it is not there yet, so
769
+
that the migrated volume keeps its backing file and only the differences are
770
+
transferred. Volumes
771
+
migrated to or from CLVM and CLVM_NG pools are always copied in full
772
+
instead.
773
+
774
+
Migrating an Instance
775
+
~~~~~~~~~~~~~~~~~~~~~
692
776
693
777
#. Log in to the CloudStack UI as root administrator.
694
778
695
779
#. In the left navigation, click Instances.
696
780
697
781
#. Choose the Instance that you want to migrate.
698
782
699
-
#. Click the Migrate Instance button. |Migrateinstance.png|
783
+
#. Click the Migrate Instance to another host button. |Migrateinstance.png|
700
784
701
-
#. From the list of suitable hosts, choose the one to which you want to
702
-
move the Instance.
785
+
#. From the list of suitable hosts, choose the one to which you want to move
786
+
the Instance. Hosts that require the Instance's storage to be migrated as
787
+
well are flagged in the list.
703
788
704
-
.. note::
705
-
If the Instance's storage has to be migrated along with the Instance, this will
706
-
be noted in the host list. CloudStack will take care of the storage
707
-
migration for you.
789
+
#. Optionally, enable "Migrate with storage" to control where the volumes are
790
+
placed. You can either send all volumes to a single storage pool or pick a
791
+
destination pool per volume. If you leave this option disabled, CloudStack
792
+
automatically selects, for each volume that has to move, a suitable pool
793
+
that is accessible from the destination host.
708
794
709
795
#. Click OK.
710
796
711
-
.. note::
712
-
(KVM) If the Instance's storage has to be migrated along with the Instance, from a mounted NFS storage pool to a cluster-wide mounted NFS storage pool, then the 'migrateVirtualMachineWithVolume' API has to be used. There is no UI integration for this feature.
797
+
The UI calls the ``migrateVirtualMachine`` API when only the Instance has to
798
+
move and ``migrateVirtualMachineWithVolume`` when volumes have to move as well.
799
+
Both operations can also be run directly, for example with CloudMonkey:
800
+
801
+
::
713
802
714
-
(CloudMonkey) > migrate virtualmachinewithvolume virtualmachineid=<virtual machine uuid> hostid=<destination host uuid> migrateto[i].volume=<virtual machine volume number i uuid> migrateto[i].pool=<destination storage pool uuid for volume number i>
0 commit comments