When you create a virtual machine, you configure the memory and processor to provide the appropriate computing resources for the workload you plan to run on the virtual machine. This workload consists of the guest operating system and all applications and services that will run at the same time on the virtual machine.
If you need to adjust the computing resources of a virtual machine, you can reconfigure the resources to meet the changing needs. You can also specify resource controls to automate how resources are allocated to virtual machines.
Configure memory or processors for a virtual machine
A virtual machine needs enough memory allocated to it to run the workload. However, each virtual machine consumes memory only when it is running or paused. For more information about determining memory allocation, see “Performance Tuning for Virtualization Servers”
in the Performance Tuning Guidelines for Windows Server 2008 (
The number of virtual processors you should configure depends on the guest operating system. For more information about determining the appropriate memory and processors for the guest operating system that will run on the virtual machine, see About Virtual Machines and Guest Operating Systems (
Hyper-V provides processor compatibility settings to make it easier to use an older operating system and to make it easier to perform a live migration of a virtual machine to another physical computer with a different processor version. The following considerations apply to the migration scenario:
- 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.
Note | |
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. |
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.
Configure resource allocation for a virtual machine
Resource controls provide you with several ways to control the way that Hyper-V allocates resources to virtual machines. The following is a brief description of each control. For more information about the controls, see “Weights and Reserves” in the Performance Tuning Guidelines for Windows Server 2008 (
-
Virtual machine reserve. Of the processor resources available to a virtual machine, specifies the percentage that is reserved for the virtual machine. This setting guarantees that the percentage you specify will be available to the virtual machine. This setting can also affect how many virtual machines you can run at one time.
-
Virtual machine limit. Of the processor resources available to a virtual machine, specifies the maximum percentage that can be used by the virtual machine. This setting applies regardless of whether other virtual machines are running.
-
Relative weight. Specifies how Hyper-V allocates resources to this virtual machine when more than one virtual machine is running and the virtual machines compete for resources.
To configure resource allocation 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.
In the navigation pane, click Processor.
Under Resource control, specify the amount for each control you want to use. Then click OK.
Additional considerations
-
By default, membership in the local Administrators group, or equivalent, is the minimum required to complete this procedure. However, an administrator can use Authorization Manager to modify the authorization policy so that a user or group of users can complete this procedure. For more information, see Using Authorization Manager for Hyper-V Security (
https://go.microsoft.com/fwlink/?LinkId=142886 ).
-
The virtual machine must be turned off before you can modify the memory or processor settings.