Q. How can I stop a specific VM in my Hyper-V cluster from live migrating to another node?
A. Under normal circumstances the goal is for any VM in a Hyper-V cluster to be able to run on any node in the cluster. This gives maximum flexibility in terms of load-balancing, availability of VMs during patching, and other maintenance operations, and keeping workloads running in unplanned failures. Therefore, your configuration should not restrict VMs from being able to run on any of the nodes in the cluster. However in some circumstances, (typically because of licensing of specific applications that are tied to specific physical processors) it may be necessary to ensure that certain VMs can only run on a specific host in the cluster, even if this means the VM is unavailable during maintenance/failures.
You cannot disable Live Migration for a VM however a solution is to modify the possible owners for the VM and remove all hosts except for the host it should be run on. This is done as follows:
- Open Failover Cluster Manager
- Under Roles select the VM
- In the bottom pane expand the Virtual Machine resource in the Resources tab
- Right click on the VM configuration and select Properties
- In the Properties dialog select the Advanced Properties tab
- Deselect all nodes except the current node then click OK
Note that if you do this you need to have a process in-place to manually failover the VM in the event of a problem.