Migration of virtual machines

From ISPWiki
Jump to: navigation, search
Hierarchy: VMmanager KVM -> VIRTUAL MACHINES
VMmanager Cloud -> VIRTUAL MACHINES

Migration is the process of importing a virtual machine between cluster nodes. In order to migrate a virtual machine, navigate to "Management" --> "Virtual machines". VMmanager migrates machines using libvirt. For successful completion of the operation the same QEMU-KVM and virsh versions must be installed on both the source and target cluster nodes.

VM migration

Target server

You can select a cluster node that the virtual machine will migrate to, or the node can be selected automatically. In case of the automatic selection, a node with the largest amount of RAM will be selected among all available nodes. A cluster node can be used for VM migration, if there are no connection, libvirt, or NFS issues. If the node with the largest amount of RAM, is the one that the virtual machine is migrate from, the migration process won't start.

Migration types

If you migrate a virtual machine with local storage, its RAM and disk will be copied. The format of the source and target servers must be the same (RAW or Qcow2).

If you migrate a virtual machine with network storage, only its RAM will be copied. The disk will be connected to the cluster node the machine is migrated to. Normally, in case of common or "Suspended" migration the virtual machine with network disk will be migrated during a few minutes.

  • Common migration (provided that the "Live migration" option is disabled) - usually this type is used for moving active virtual machines and machines with small local storages.
  • Live migration (the "Live migration" option is enabled) VMmanager supports live migration of running virtual machines. A virtual machine will be up and running during migration. QEMU periodically checks the current state of a virtual machine, and if the state changes during migration (data are changed), the process will continue, and modified data will be overwritten.
If the virtual machine is in use, and its data are constantly changed causing the migration to fail, the virtual machine will be turned-off, and the migration process will be completed.
Live migration can be used to migrate small amounts of data on virtual machines that are not actively used, otherwise some data may be lost.
  • Migration of suspended virtual machine. (this type of migration is performed when a virtual machine gets suspended before the migration process).
If you suspend a virtual machine before migration, it data will be copied (VM disk image will be copied). This is the safest way to move large virtual machines.

Migration status

When the migration process starts, in the virtual machine status you will see the icon:

Migration starus

Click on this button to cancel migration of the virtual machine.