Migrate
Host-to-host VM disk migration primitives for swamp.
The @mccormick/migrate/disk model is the hypervisor-neutral middle of a VM lift-and-shift. stream copies a powered-off source block device to a destination block device over an encrypted, compressed pipe (dd | zstd | ssh "zstd -dc | dd conv=sparse"), either direct (source→dest) or relayed through the swamp host, with auto probing which is reachable and verifying the written byte count. edit_guest_disk is the agent-absent network fallback: it mounts the guest's LVM root over qemu-nbd (or locally) on a tool host, rewrites netplan to match by the target MAC, disables cloud-init networking, and tears it all down in a trap. verify polls a cutover IP for TCP/ICMP reachability.
Paired with @mccormick/truenas/vm (provisioning) and a Proxmox inspect step, these primitives compose into the migrate-vm workflow. SSH is spawned directly (never sh -c locally) and every interpolated path is POSIX-quoted.
The workflow-scoped @mccormick/migrate/summary report joins a run's resources (the Proxmox spec, TrueNAS zvol/VM/device, transfer, network-prep, and verify) into a markdown summary: source→target, firmware mapping, bytes verified, MAC preserved, reachability, and a rollback hint.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| sshUser | string | Default SSH user for src/dst/tool hosts (overridable per call) |
| sshPort? | number | Default SSH port (omit for 22) |
| migrationKeyPath? | string | Private key path *on the source host* for direct-mode inner ssh; when |
| connectTimeoutSec | number | |
| taskTimeoutSec | number | Max seconds for a stream/edit (disk copies are long) |
Resources
VM migration run summary: joins the Proxmox vm_spec, TrueNAS zvol/VM/
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned