Skip to main content

Moving VM disks between pools

Moving disks copies all disks of a VM (virtual machine) together with snapshots to another storage pool and switches the VM to the copy. Center chooses the path by the VM status:

  • Cold move — for a powered-off VM: the status is Offline or Created. The VM cannot be started during the move.
  • Live move — for a running VM: the status is Started. The VM keeps running while the disks are copied and is paused briefly when Center switches it to the new disks. The VM node does not change.

In both cases, Center deletes the source disks only after the VM is recorded on the new pool.

Cold move​

  1. Center checks the request. The VM is Offline or Created, no other operation runs on it, the target pool exists and differs from the current one, and the node of the target pool is not in maintenance mode. If the VM was created from an image, the image must be on the target pool. The VM must have no clones: the move would delete their disks.
  2. Center marks the VM with the Migrating status and locks it.
  3. The node of the source pool takes a service snapshot of the VM and sends it over the network to the node of the target pool. The disks, snapshots and VM settings are sent.
  4. The node of the target pool receives the copy. If the transfer is interrupted, the node deletes the incomplete copy; the source disks are not touched.
  5. Center records the VM, its disks and snapshots on the new pool and sends the VM settings to the node of the target pool.
  6. Center deletes the source disks when the node has confirmed the settings. The VM is Offline again, now on the new pool.

On the last step, Center handles the disks as follows:

What happenedWhat Center does with the disks
The VM is recorded on the new pool, the node confirmed the settingsdeletes the source disks — the move succeeded
The VM could not be recorded on the new pooldeletes the copy in the target pool, the VM stays on the old one
The VM is recorded, but the node did not confirm the settingsdeletes nothing and marks the move as failed
Center closed the move by the time limit while it waited for the node confirmationdeletes nothing

In the last two cases, the source disks are intact; contact vStack support.

Center waits no more than 5 minutes for a cold move to finish. If the move has not finished, the VM gets the Migration failed status with the error Storage migration timeout. A late answer of the node no longer completes such a move and does not delete the source disks. In this case, do not start the VM and do not repeat the move — contact vStack support.

Live move​

  1. Center checks the request. In addition to the common checks: the VM has no more than five disks; the target pool is healthy (ONLINE), has an NVMe-oF address, and its node and the VM node are online; the target pool has enough space; the VM is not a clone, and if it was created from an image, the image is on the target pool.
  2. VM disks on the node of its pool. In this release, a VM that runs on the node of its pool and keeps a disk on a local volume gets the refusal The disks of this VM cannot be moved while it runs on the node of its storage pool. Move the VM to another node first, or stop it to move the disks. The workaround is to first move the VM to another node by live migration, or to make a cold move of the powered-off VM.
  3. The first pass copies everything: the VM disks and snapshots go to the target pool while the VM is running.
  4. Catch-up passes copy the data that the guest OS wrote during the previous pass. When a pass takes no more than 2 seconds, the copy is considered synchronized with the VM. If the copy is not synchronized after 5 catch-up passes, the move ends with the reason Disk copy cannot keep up with the VM's writes. Power off the VM to move its disks without live copy., and the VM stays on its previous disks.
  5. Pause and switch. Center pauses the VM, copies the last changes, switches the disks one by one to the copy in the target pool over NVMe-oF, and records the new placement. This is the point of no return. Then the VM continues working.
  6. The source disks are deleted by Center right after a successful move, and the remaining data is removed by a background cleanup.

While the move is in progress, the VM has the Migrating status. After a success, it is Started again on the same node, and the Pool field shows the new pool. If the VM node does not own the new pool, the VM works with its disks over the network — VM on another node.

Number of concurrent live moves​

Live moves of the disks of different VMs run in parallel while the node of the target pool has free transfer ports. If there is no port, Center still accepts the move: each copy stage waits for a port in the node queue for up to 3 minutes, and moves already in progress get a port before new ones. Center takes the ports for the last stage before the pause, so the VM does not stay paused while waiting for a port. If no port becomes free within this time, the move ends with the reason No free migration slot or port on the source or target node., and the VM stays on its previous disks.

If a live move was interrupted​

What happenedWhat happens to the VM and disks
A failure before the pause or a cancellation (Cancel migration)everything returns to how it was: the VM is on its previous disks, and the copy in the target pool is deleted
A failure in the middle of the disk switcha partial migration: some disks are already in the target pool. Continue migration copies and switches the rest. The deadline is 24 hours
The state could not be proventhe move stops. Force close closes it without deleting data on either pool; after that, the VM state requires analysis
Center restartedafter the start, Center unpauses the VM and rolls back, completes or leaves the move as a partial migration

You can cancel a move only before the disk switch starts. A force close, resuming the VM after it and deleting the leftovers of the move on the target pool are emergency actions: perform them with vStack support.

What you see​

  • The Migrate VM window, Storage tab: the list of pools with the Used and Provisioned share. A pool where the disks cannot go is inactive with the reason, for example VM image is not on pool <pool> or Disks of a VM clone cannot be moved to another pool.
  • The VM migration progress window: the stage and the percentage. For a live move — also the state of each disk (Copying, Copied) and the Cancel migration, Continue migration and Force close buttons when they apply.
  • During the move: the VM status is Migrating. You cannot change its settings, start it or stop it. The source and target pools cannot be suspended, resumed or stopped during this time.
  • After a success: the notification Migration completed successfully, and the Pool field shows the new pool. A powered-off VM is Offline, a running one is Started.
  • After a failure: the notification Migration failed or the error text. After a cold move, the VM has the Migration failed status.
  • In the pools: the free space of the target pool decreases as the copy goes on. Space in the source pool is freed after the source disks are deleted.

Limitations​

  • Only with the Live Migrate VM privilege (of the built-in roles — Cluster master) and VM migration enabled on the cluster — as for live migration.
  • All VM disks move to one pool together.
  • Clones. The disks of a VM clone cannot be moved to another pool. Center does not move a powered-off VM that has clones: delete the clones first.
  • Image. A VM created from an image moves only to a pool that has this image.
  • Space in the target pool — check it in advance: it must be enough for the VM disks together with snapshots.
  • Live move: no more than five disks, and the VM is not on the node of its pool — step 2 of the live move.
  • VMs with several disks. Live disk migration is designed for VMs with one disk. For a VM with several disks the migration may not complete: Center cancels it with code -1641, and the VM keeps running on the original pool. Move the disks of such VMs while they are powered off.
  • The VDC (virtual data center) space quota does not change: the disk sizes stay the same.

What not to do​

  • Do not select a pool without enough free space: a pool filled above 80% slows down all its VMs.
  • Do not start a live move of a VM with active disk writes if you can power it off: the copy may not catch up with the writes.
  • Do not start the VM and do not repeat the move right after a failed cold move — wait until the Pool field on the VM page stops changing.
  • Do not try to stop, suspend or transfer the source or target pool while the VM status is Migrating: Center rejects it with the error A VM in this pool is migrating.
  • Do not delete VM disks and datasets on the nodes manually after a failed move — vStack support does this.

See also​