Move a running VM to another node
Move a running virtual machine (VM) to another node when you need to reduce the load on a node or free it before maintenance. The VM keeps running: Center moves its RAM and CPU state to the new node, and the disks stay in the same pool.
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 VM is running: its status is Started. To start the VM, see Start, stop and restart a VM.
-
The cluster has another node that is online and not in maintenance mode, and that node has enough free RAM for the VM. The migration window shows which nodes will accept the VM.
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.
The Migrate item is inactive if the VM status does not fit any migration type. For a powered-off VM, the window offers only moving the disks — Move VM disks to another pool.
2. Select a node and start the move
- Check that the Compute tab is selected in the Migration type block. For a running VM, the window selects it automatically.
- Select the target node in the Target node table. The table lists all cluster nodes except the current one, with their load in the RAM and CPU columns. When DRS is enabled on the cluster, the columns are named RAM (DRS) and CPU (DRS) — DRS. A node that will not accept the VM is inactive; the reason is in the tooltip on its name. The window automatically selects the first node that will accept the VM.
- If the selected node has a different CPU model, a warning appears under the table: the guest OS clock may drift after migration. To move the VM to this node, select Migrate to this node anyway.
- In the Placement block, compare the Current and Target cards: Node changes, Pool stays the same.
- If needed, expand Advanced:
- Timeout, s — from 60 to 3600, 300 by default: how long the nodes wait for the memory transfer in the last attempt.
- Switchover pause, ms — from 10 to 10000, 2000 by default: the longest VM pause at the end of the move. Center starts with a short pause and makes it longer only if the move did not converge — VM live migration.
- 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. Closing the window does not stop the move. To open the window again, select Actions → Migrate on the VM page: while the VM is being moved, the percentage is shown next to Actions, and other actions with the VM are unavailable.
While Center moves the VM, the VM has the Migrating or Sending status.
When the move finishes, the web interface shows the notification Migration completed successfully. On the VM page, in the General properties block, the Node field shows the new node, and the VM status is Started. If the VM pool belongs to another node, Remotely is shown next to the Node field: the VM works with its disks over the network.
If the move did not converge even with the longest pause, the VM stays Started on the previous node, and the web interface shows an error. You can repeat the move right away — for example, with a larger Switchover pause, ms, or when the guest OS writes less to its memory.
If the move failed for another reason, the VM has the Migration failed or Send failed status. Check the Node field — it shows the node where the VM runs. If the error text is Live migration timeout, do not repeat the move and do not stop the VM; contact vStack support. What happens on a failure — VM live migration.
Rejection before the move starts
Center rejects the move before it starts, and the VM stays on its current node. Common reasons:
- Not enough memory on node <node>: … GB free, … GB required — select another node or free memory on this one.
- No free migration slot or port on the source or target node. — all receiving slots of the target node are busy, or the source node already runs the maximum allowed number of migrations. Wait for the other moves to finish.
- Node <node> cannot accept this VM: incompatible CPU (…) — the node has a CPU from another vendor; the VM cannot be moved to it.
- Node <node> is in maintenance mode — select another node or take this one out of maintenance: Node maintenance mode.
- Node <node> violates rule <rule> — a mandatory VM placement rule forbids the node: DRS.
- Another migration is already in progress for this VM — this VM is already being moved, or another operation is in progress on it.
If the move has started but the target node cannot be reached over the storage network, the move ends with the error Storage network address of node <node> is unreachable: the VM memory goes over the storage network only, and Center does not switch to the public network.
Next
- Move VM disks to another pool
- Node maintenance mode
- DRS — moving VMs by recommendations.
- View a node: hardware, disks, performance
- Virtual machines — how VMs work.
API methods: vm-migrate, vm-migrate-candidates, vm-migrate-status — in the API reference.