Chances are you found this blog post by searching for some combination of the words in the bag “set processor affinity Hyper-V”.
As Ben explains in his blog post: Processor Affinity and why you don’t need it on Hyper-V, there is no way to set VM processor affinity in Hyper-V. Instead, you use the “virtual machine reserve” to 100. Turn off the VM, get an account with local admin perms, then:
To configure memory or processors for a virtual machine
Open Hyper-V Manager. Click Start, point to Administrative Tools, and then click Hyper-V Manager.
In the results pane, under Virtual Machines, select the virtual machine that you want to configure.
In the Action pane, under the virtual machine name, click Settings. Then, in the navigation pane, click the appropriate hardware setting as described in the following steps.
To configure the memory, click Memory. On the Memory page, specify the new amount of memory.
To configure the processor, click Processor. If multiple processors are supported by the guest operating system, specify the number of processors to assign to the virtual machine. Then click OK.
To set processor affinity, click Processor, and configure the Virtual machine reserve (percentage) to “100”:
This ensures that Hyper-V will dedicate the whole processor (or multiple whole processors – depending on how many virtual processors the virtual machine has) whenever the VM is running.
FYI the rest of the *important* stuff on this page relates to:
While you are on this page, if your VMs are highly-available (and why wouldn’t you want that?), then you need to review the settings in the Processor Compatibility section:
- The Migrate to a physical computer with a different processor version setting ensures that the virtual machine uses only the features of the processor that are available on all versions of a virtualization-capable processor by the same processor manufacturer. It does not provide compatibility between different processor manufacturers.
- The setting is useful for high availability and backup and recovery scenarios because it makes it easier to move a highly available virtual machine to another node in a cluster or restore the virtual machine to different hardware.
If the physical computer has multiple processors and uses non-uniform memory architecture (NUMA), we recommend that you do not assign more processors or memory to a virtual machine than are available on a single NUMA node. For example, do not assign 4 processors to a virtual machine if each NUMA node has only two processors. For more information about the processor architecture of the physical computer, see the documentation that came with the computer.
Now, if your VM requires a specific CPU feature, then you have already determined that all the virtualization servers (hosts) in the cluster support the same feature, right? If not, then it is possible that the VM will not live or quick migrate. If the OS/and/or application you are running on a VM require a specific CPU feature, and that feature is not supported on the new host, then Hyper-V won’t migrate the VM.