For a Hyper-V VM stuck in an unmapped or transitional state because a vmwp.exe process is still holding the configuration file, use this recovery path:
- Identify the stuck VM worker process on the affected host.
Get-Process | Where-Object {$_.Name -like "*vmwp*"} - End the specific stuck VM process.
This forcibly stops the VM worker process that is holding the lock.taskkill /PID <PID> /F - Restart the Hyper-V Virtual Machine Management Service.
- If the VM is still stuck after the service restart, restart the host computer.
- If the VM remains inaccessible in the cluster, validate cluster health because cluster configuration issues can cause live migration failures, unexpected restarts, and failover problems.
Test-Cluster - Review the VM folder on the storage hosting the VM and confirm the expected files exist:
.vmcx,.vmrs,.vhdx, and any.avhdxfiles.- If the
.vmcxfile is missing or corrupted, rebuild the VM by using the existing.vhdx, or restore the VM from backup. - If disk or network assignments are wrong after migration, correct the VM settings so the proper disk and network adapter are assigned.
- If the
Important: forcibly ending the VM process can cause loss of unsaved or transient data. A host restart is the documented fallback if the lock is not cleared after terminating the worker process and restarting the management service.