vm_migrate
Migrate a VM to a different ESXi host and optionally move its storage using vMotion. Specify target host and datastore if needed.
Instructions
[WRITE] Migrate (vMotion) a VM to another host, optionally with storage vMotion.
If the target host has no access to the VM's current datastore, you MUST pass to_datastore — vCenter rejects cross-host vMotion without shared storage.
Args: vm_name: VM to migrate. to_host: Target ESXi host name. to_datastore: Target datastore (required for cross-storage hosts). target: vCenter/ESXi target name from config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| to_host | Yes | ||
| vm_name | Yes | ||
| to_datastore | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |