Know Your Limits: Capacity planning for Hyper-V Virtual Machines
Capacity planning for your Hyper-V Virtual Machines is one of the more critical activities you will undertake in your virtualized server environment. How many CPUs, how much RAM, and how much disk space will largely vary by the server role.
In this regard you should treat your Virtual Machine with the same requirements of a physical machine (ex. if the recommendation for a SQL server is 4 GB of RAM or more, allocate 4 GB RAM or more to your Virtual Machine).
If you are running Server 2008 R2 SP1, you can use Dynamic Memory to view if your Assigned Memory is Low, at Warning, or OK by checking the Memory Status. This gives you a reference point to determine if you need to allocate more or reduce your memory. For more about Dynamic Memory use the Hyper-V Dynamic Memory Configuration Guide.
HOWEVER, everything has its limits, including Virtual Machines! Bearing in mind that your Virtual Machines get their CPUs, RAM, and Disk Space from the Host Machine… reference this table from TechNet which lays out the maximums for a Virtual Machine (Source: TechNet: Requirements and Limits for Virtual Machines and Hyper-V in Windows Server 2008 R2).
|Virtual processors||4||The number of virtual processors supported by a guest operating system might be lower. For more information, see About Virtual Machines and Guest Operating Systems.|
|Memory||64 GB||Review the requirements for the specific operating system to determine the minimum and recommended amounts.|
|Virtual IDE disks||4||The startup disk (sometimes referred to as the boot disk) must be attached to one of the IDE devices. The startup disk can be either a virtual hard disk or a physical disk attached directly to a virtual machine.|
|Virtual SCSI controllers||4||Use of virtual SCSI devices requires integration services to be installed in the guest operating system. For a list of the guest operating systems for which integration services are available, see About Virtual Machines and Guest Operating Systems|
|Virtual SCSI disks||256||Each SCSI controller supports up to 64 disks, which means that each virtual machine can be configured with as many as 256 virtual SCSI disks. (4 controllers x 64 disks per controller)|
|Virtual hard disk capacity||2040 GB||Each virtual hard disk is stored as a .vhd file on physical media.|
|Size of physical disks attached directly to a virtual machine||Varies||Maximum size is determined by the guest operating system.|
|Snapshots||50||The actual number may be lower, depending on the available storage. Each snapshot is stored as an .avhd file that consumes physical storage.|
|Virtual network adapters||12||
|Virtual floppy devices||1 virtual floppy drive||None.|
|Serial (COM) ports||2||None.|
By using this table, you can now determine your decision points. If your requirements are for more than 4 processors, you may need to have a physical machine instead of a Virtual Machine… but make that determination carefully by asking questions such as “Does my application really require 4 processors?” and by using the Performance Monitor to view the actual workload. There is a tedency to over-allocate resources in this regard, so make sure to drive the decision based on actuals and realistic growth increases, not “gut feelings”.