Move VM disks to another pool
Move the disks of a virtual machine (VM) to another storage pool when the current pool is full or has to be freed. Center moves the disks of a powered-off VM as a whole while the VM is off. Center copies the disks of a running VM without stopping it, and at the end briefly pauses the guest OS and switches the VM to the new disks. The node where the VM runs does not change.
Before you begin
-
You need the Live Migrate VM privilege in the vDC of this VM. Of the built-in roles, only Cluster master has it; it can be granted to a custom role.
-
VM migration is enabled on the cluster — the
feature.vm-migrationcluster parameter. The Center installation enables it. If the VM menu has no Migrate item, the parameter is disabled — contact vStack support: you cannot change it in the web interface. -
The cluster has another pool, and it has enough space for the VM disks together with snapshots — View pool state and capacity.
-
The VM is not a clone of another VM. If the VM was created from an image, the image must be on the target pool. The migration window shows the pools where the disks cannot go as inactive, with the reason.
For a powered-off VM:
- The VM status is Offline or Created. Stop a suspended VM (status Suspended) first — Start, stop and restart a VM.
- The VM has no clones. If it has clones, delete them or move the disks while the VM is running.
For a running VM:
- The VM status is Started, and there are no more than five disks. Live migration is designed for VMs with one disk: for a VM with several disks it may not complete, so move their disks while the VM is powered off — VM disk migration.
- If the VM runs on the node of its pool (on the VM page, Remotely is not shown next to the Node field) and at least one of its disks is on a local volume, in this release its disks are not moved without stopping the VM. First move the VM to another node — Move a running VM to another node — or power it off. A VM on the node of its pool whose disks are already attached over NVMe-oF is moved.
- The target pool is healthy, and its node is online.
Details — Moving VM disks between pools.
1. Open the migration window
- In the left menu, select Virtual Data Centers → the VDC → Virtual Machines → the VM. The VM page opens.
- Select Actions → Migrate. The Migrate VM window opens.
2. Select a pool and start the move
- Select the Storage tab in the Migration type block. For a powered-off VM, the window selects it automatically.
- Select the target pool in the Target pool table. The table lists all cluster pools except the current one, with the share of used and provisioned space in the Used and Provisioned columns. A pool where the disks cannot go is inactive; the reason is in the tooltip on its name, for example VM image is not on pool <pool>. The window automatically selects the first suitable pool. If there are no suitable pools, the window shows No suitable pools instead of the list.
- In the Placement block, compare the Current and Target cards: Pool changes, Node stays the same.
- Click Migrate. The window closes, and the VM migration progress window opens.
Check the result
The VM migration progress window shows the stage and the percentage of the move, and for a running VM — the state of each disk too. Closing the window does not stop the move. To open the window again, select Actions → Migrate on the VM page.
While Center moves the disks, the VM has the Migrating status: you cannot change its settings, start it or stop it.
When the move finishes, the web interface shows the notification Migration completed successfully. On the VM page, in the General properties block, the Pool field shows the new pool.
- A powered-off VM is Offline again. Start it: Start, stop and restart a VM.
- A running VM is Started again on the same node. Center deletes the source disks automatically.
Stopped disk move of a running VM
- Before the disks are switched, you can cancel the move with the Cancel migration button in the VM migration progress window. The VM stays on its previous disks, and the copy in the target pool is deleted.
- The copy cannot keep up with the VM writes. 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. The VM keeps running on its previous disks. Power off the VM and move the disks again, or repeat the move when the guest OS writes less to its disks.
- No free transfer port. If no port on the node of the target pool becomes free within 3 minutes, the move ends with the reason No free migration slot or port on the source or target node. Repeat the move later.
- Some of the disks have been moved. The window shows Action required and a deadline. Click Continue migration before that deadline: Center copies and switches only the remaining disks.
- The move has stopped and does not resume automatically. The window shows Stopped. Contact vStack support. The Force close button closes the move without deleting data on either pool; after that, the VM state requires analysis, and a new move of its disks is not possible until the analysis is complete.
How the move works and what happens on a failure — Moving VM disks between pools.
Failed disk move of a powered-off VM
The VM has the Migration failed status, and the web interface shows the notification Migration failed or the error text. Check the Pool field. If the error text is Storage migration timeout, or the Pool field already shows the new pool, do not start the VM and do not repeat the move — contact vStack support. Otherwise, the disks stayed in the previous pool: you can start the VM or repeat the move.
Common errors when starting the move
- VM state is not allowed for migration — the VM is neither powered off nor running, for example it is suspended. Stop it and try again.
- Another migration is already in progress for this VM — this VM is already being moved, or another operation is in progress on it.
- The VM has clones; a cold migration would destroy their disks. Remove the clones first — the powered-off VM has clones. Delete the clones or move the disks while the VM is running.
- 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 VM runs on the node of its pool.
- Node <node> is in maintenance mode — the node of the target pool is in maintenance mode: Node maintenance mode.
Next
- Move a running VM to another node
- Moving VM disks between pools — how the move works.
- Cluster storage (SDS) — how a pool works.
- View pool state and capacity
API methods: vm-migrate, vm-migrate-status, vm-migrate-cancel, vm-migrate-continue — in the API reference. The vm-migration method is deprecated: use vm-migrate with migration_type 2 instead.