Configuring Hyper-V
Unlike Windows Server 2008, which comes in versions that can be installed on x86 processors, you can install Windows Server 2008 R2 only on computers that have x64 processors. This means that you can install the Hyper-V role on the Standard, Enterprise, and Datacenter editions of Windows Server 2008 R2 without having to worry that you are running the 32-bit version of the OS rather than the 64-bit.
- Just because a computer has an x64 processor, doesn't mean that virtualization support is enabled in BIOS.
- The benefit of installing Hyper-V on a computer running the Server Core installation option is that it reduces the number of times you need to reboot the host machine to install security updates.
Hyper-V is not supported on the 32-bit version of Windows Server 2008.
You can install the Hyper-V role using the Server Manager console or by using the following PowerShell command when the Server Manager module is loaded:
Add-WindowsFeature Hyper-V
Allocating Virtual Processors
Hyper-V supports up to 64 logical processors on the host server, with each processor core representing a virtual processor. You configure a VM's processor settings when the Processor item is selected in the virtual machine properties dialog. Through this dialog, you can allocate the number of logical processors assigned to the VM, the percentage of processor resources reserved for the machine, the maximum percentage of allocated processor resources that the VM can consume, and the relative weight of the VM when there is contention for processor resources. If you leave VMs with the default settings, Hyper-V allocates processor resources equally across all running virtual machines, assuming that resource contention exists. You can allocate a maximum of four virtual processors to a single virtual machine. The default setting for a VM allocates only one logical processor.
- Use the Virtual Machine Reserve setting to ensure that a critical VM is not starved of processor resources.
Allocating Dynamic Memory
Until the release of Service Pack 1 for Windows Server 2008 R2, Hyper-V would allow you to allocate only a static amount of RAM to a VM. This meant that if you wanted to allocate more or less RAM to a virtual machine, you needed to shut down the VM and modify that VM's properties. When you allocate a static amount of RAM to a VM, powering on the VM allocates all that RAM to the VM. If the amount of allocated RAM is not available to the system, you won't be able to power on the VM, even if the VM doesn't actually need all the RAM to start up.
Rather than allocating a fixed amount of RAM to each VM, dynamic memory, a feature available only in Windows Server 2008 R2 with Service Pack 1 or later, allows you to allocate memory dynamically to virtual machines. When you do this, you set a minimum and maximum amount of memory for the VM, and the VM utilizes as much as it needs. Rather than guessing how much memory a specific VM needs when configuring it, dynamic memory allows the VM to request only the memory it needs, leaving the rest of it to the OS. As most VMs use less memory than systems administrators usually allocate to them, this often means that you can run more VMs simultaneously. The minimum amount of RAM that you specify is allocated when the VM is started up; however, the VM releases RAM back to the OS if it isn't required.
To utilize dynamic memory, it is necessary to ensure that you have installed the latest integration tools on the VM. If you don't install the integration tools that come with Service Pack 1 or later on Windows Server 2008 R2, the VM does not utilize dynamic memory. When you configure a VM to use dynamic memory, you can configure a memory buffer. This is the amount of RAM, expressed as a percentage of the current demand that Hyper-V allocates to the VM over its current utilization. This allows applications to quickly consume more memory before the VM has to request an extra allocation from the Hyper-V host. You can also configure a memory weight for the virtual machine, which determines how much memory is allocated to the VM beyond its minimum when there is contention for memory resources.
You configure dynamic memory settings when the Memory item is selected on the VM's properties.
Dynamic memory can be used by VMs running the following OSes:
- Windows Server 2008 R2 (Recommended 33 with SP1 or later)
- Windows Server 2008 with SP2 or later
- Windows 7 RTM (Recommended with SP 1 or later)
- Windows Vista with SP1 or later
- Windows Server 2003 R2 with SP2 or later
- Windows Server 2003 with SP2 or later