Migrate Container Instances
migrate_instancesMigrate a container's or virtual machine's instances between servers on Cycle, or revert a recent migration. Pass exactly one of container or virtual_machine. Cycle backs every VM with a container, so a VM migrates through that container's single instance (select it with all_instances:true or name it in targets); the response reports both the VM and its backing container.
Cycle migrates instances across any infrastructure it manages — between servers, data centers, cloud providers, and on-prem hardware. Not every server is a valid target: containers carry tag restrictions and other constraints, so this tool only accepts destinations Cycle reports as compatible for the container. A migration is reversible: the original instance is retained until Cycle's purge window elapses (roughly 3 hours for stateful instances), during which action:"revert" restores it on its source server. Only retained source instances are revertable; running destination copies are skipped. Load balancer instances cannot be migrated.
Workflow:
Call with preview:true and your selection. It makes NO changes and returns the selected instances — each with its current server (id and name) and whether it is stateful — plus, for migrate, the compatible destination servers. The plan comes from read-only lookups; Cycle does not validate it.
If the destination is unclear, present the compatible servers and let the user choose. With NO compatible servers migration is impossible — tell the user why (tag or infrastructure constraints).
Confirm the specific move with the user, then call again without preview. Never migrate or revert without explicit confirmation.
Select instances with exactly one of: targets (specific instances, each optionally with its own destination so they can spread across servers), source_server ("move this container off nuc-bear"), or all_instances. A top-level destination_server is the default for selected instances without their own and is required with source_server or all_instances.
copy_volumes applies to stateful instances and defaults to true so data is never silently dropped. A VM's local volumes — including its boot disk — are what it moves, so copy_volumes:false lands the VM on empty local storage and is almost never wanted. External (SAN) volumes are attached, not copied, and are unaffected either way.
Asynchronous: submits one job per instance and returns without waiting (wait_seconds gives a short bounded wait for quick moves). Track the job_ids with get_jobs, then call again with preview:true to confirm each instance reports its destination server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | migrate moves instances to a destination server; revert restores recently migrated instances on their source server, within Cycle's purge window. | migrate |
| context | No | Why are you calling this tool? Briefly describe the user's goal. | |
| preview | No | Resolve and return the plan without making changes. Always run this first. | |
| targets | No | Specific instances to act on. | |
| container | No | Container whose instances to migrate. Exactly one of container or virtual_machine. | |
| environment | Yes | Environment the container or VM lives in. Required; it scopes the lookup. | |
| copy_volumes | No | Whether stateful instances copy their volume contents to the destination (default true). Ignored for non-stateful instances and for revert. | |
| wait_seconds | No | Bounded wait for the submitted jobs (default 0: return immediately and track with get_jobs). Stateful migrations often run far longer than any wait. | |
| all_instances | No | Select every instance of the container. | |
| source_server | No | Select every instance of the container currently on this server (hostname, nickname, or ID). Mutually exclusive with targets. | |
| conversation_id | No | Conversation tracking id. Omit on your first tool call; every result then includes a conversation_id line — pass that exact value on all later calls in this conversation. | |
| virtual_machine | No | VM to migrate. Exactly one of container or virtual_machine. | |
| destination_server | No | Default destination for selected instances without their own; required with source_server or all_instances. Hostname, nickname, or 24-char ID of one of the container's compatible servers. Ignored for revert. |