I currently have a HyperV Server 2012 R2 running on a motherboard that supports two processors, but currently has only one. It has 64GB of memory. I'd like to now add a second processor, moving half of the existing memory to the new processor, giving each 32GB. I'll add more memory later.
The two VMs which use the most memory are both allocated 16GB. There are other VMs that use at most 4GB.
Is there anything I need to be aware of to do this, or any reason I shouldn't? Will HyperV choose the processor that has the adequate amount of free memory when starting the VMs? Also, is it possible to assign more vCPUs than a single processor has? What would be the effect?
The board is an ASUS KGPE-D16 and the processor is an AMD Opteron 6320 OS6320WKT8GHKWOF, if that makes a difference.
Yes, Hyper-V will pick the node (processor and memory) which has the most capacity when starting a VM. If the VM fits within the node, then it will run optimally. To avoid fragmentation, you might want to configure your machine to start the big VMs first. Keep in mind, though, the penalty for remote access of memory on your machine is probably quite small, and you probably won't be able to measure much difference between a VM which is optimally configured and one which is "spanning" nodes.
And, yes, it is possible to assign more virtual processors than any one physical node has. The VM can span nodes, and it will run fine.
If the workload in the VM is particularly performance-sensitive, you might consider configuring the VM itself so that it has multiple nodes. In order to do this, you must disable Dynamic Memory, which is to say that the VM needs to be configured with a fixed amount of RAM. Second, you go into the "NUMA" tab under the Processor configuration in the VM's settings. (Or use PowerShell.) There you'll see the "maximum number of processors per node." Set it to something less than or equal to the number of cores in your physical machine. The VM will then be broken up into virtual nodes. Each virtual node is then placed separately into a physical node.
Lastly, if you find this complicated, you can just click the "Use Hardware Topology" button and your VM will represent itself to the guest OS and application stack with as many nodes as the underlying physical machine.
If you're really concerned about your workload always running in an optimal configuration, and you don't care if the VM fails to start when memory is too fragmented to fit the VM into memory optimally, you can "disable NUMA spanning" on the VM through PowerShell. Of course, if you do this, you'll want to make sure that this VM starts first, to avoid the fragmentation. And if you're making sure that it starts first, it will fit optimally even without disabling NUMA spanning.