Use this when moving VMs between Hyper-V hosts by script.
Migration
Hyper-V migration automation moves VMs between hosts with Move-VM, including storage with -IncludeStorage, and checks compatibility first with Compare-VM.
1. Migration automation: drain nodes, live migrate, return.
2. Use cluster cmdlets for clustered VMs.
3. Throttle.
4. Verify VMs after.
5. Resume-ClusterNode -Failback.
drain → migrate → maintenance → resume
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as name collisions, cluster ownership changes, path/capacity mismatch, checkpoints/locks, asynchronous completion, replication lag and host success without guest/application success, choosing the cases most relevant to source/destination host compatibility, VM identity, storage/network reachability, task progress and post-migration ownership/guest verification.
Step 2 Common mistakes Narrow the fault
- Migration networks and authentication (Kerberos/CredSSP) not configured.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Compare-VM checks compatibility.
- -IncludeStorage moves disks too.
- Live migration must be enabled.
Move-VM -Name <vm> -DestinationHost <h>— live migrationMove-ClusterVirtualMachineRole -Name <vm> -Node <n> -MigrationType Live— clusteredSuspend-ClusterNode -Name <n> -Drain— evacuate host
ReferenceWhy it matters1 section · depth on demand
What it is
Live migration moves running VMs between hosts with Move-VM.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Hyper-V migration moves VMs between hosts: Live Migration without downtime (within or across clusters), storage migration for disks, and Quick/shared-nothing migration between standalone hosts.
Move-VM -Name app01 -DestinationHost hv02
Move-VMStorage -VMName app01 -DestinationStoragePath 'C:\ClusterStorage\Volume2\app01'
Move-ClusterVirtualMachineRole -Name app01 -Node hv03 -MigrationType Live
Requirements: Live Migration enabled with an authentication method (Kerberos with constrained delegation, or CredSSP), compatible processors (processor compatibility mode across generations), matching virtual switch names, and a dedicated migration network.
Example
Move-VM web01 -DestinationHost hv02 -IncludeStorage -DestinationStoragePath D:\VMs\web01
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Hyper-V Automation > Migration. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/powershell/module/hyper-v/?view=windowsserver2025-ps · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For source/destination host compatibility, VM identity, storage/network reachability, task progress and post-migration ownership/guest verification, prefer typed fields and stable IDs over human presentation text.