Share via


Use best practice configurations to prepare the Hyper-V environment (SharePoint Server 2010)

 

This article provides guidance for configuring a virtual machine (VM) that uses Windows Server 2008 Hyper-V technology and that is used in a Microsoft SharePoint Server 2010 farm. This includes farm servers on the Web server tier, application server tier, and database server tier. Before you configure a virtual machine for a SharePoint farm, we recommend that you read the Hyper-V Getting Started Guide (https://go.microsoft.com/fwlink/p/?LinkId=187754). Because every configuration decision you make for a virtual machine or its infrastructure has an impact on performance or functionality (SharePoint Server 2010 and Hyper-V)—understanding each configuration option is important.

In a Hyper-V environment, you have the option of specifying the configuration of virtual networking and the configuration for each virtual machine. Additionally, you can configure how the VM interacts with the virtualization host, as well as VM stop and restart behavior if the running state of the virtual machine is interrupted.

In this article:

  • Networking

  • Network adapters

  • Virtual machine configuration

  • Integration services

  • Using snapshots

Networking

You can configure Hyper-V networking before you create any virtual machines or after you create one or more VMs. You can also create more than one virtual network for a Hyper-V host.

Using Virtual Network Manager (accessed from Hyper-V Manager), you have three different types of virtual networks to choose from. The following table provides a summary of the network types and their characteristics.

Type Description

External

Use this type when you want to allow VMs to communicate with externally located servers and the management operating system (sometimes referred to as the parent partition). This type also allows VMs on the same physical server to communicate with each other.

Internal

Use this type when you want to allow communication between VMs on the same physical server and VMs and the management operating system. An internal virtual network is a virtual network that is not bound to a physical network adapter. It is commonly used to build a test environment where you need to connect to the VMs from the management operating system.

Private

Use this type when you want to allow communication only between VMs on the same physical server. A private virtual network is a virtual network without a virtual network adapter in the management operating system. Private virtual networks are commonly used when you want to isolate VMs from network traffic in the management operating system and in the external networks.

Use SharePoint Server farm requirements to determine which of the three networking configurations that you want to use on a virtualization host. For example, in the Quick start: Deploy single server in an isolated Hyper-V environment (SharePoint Server 2010) article, we used an Internal network to isolate the test environment from a production environment.

After determining the type of network that you want to use, you can specify the range of media access control (MAC) addresses that are automatically assigned to virtual adapters. The R2 release of Microsoft Hyper-V Server 2008 enables you to provide static MAC addresses to an adapter in order to avoid collisions on a network.

From a networking performance perspective, the ability to create virtual local area networks (VLANs) can provide performance gains. Virtual machines on the same VLAN can communicate through the virtual switch, which means that network traffic is faster because it does not have to use the physical network adapter. Another benefit of a VLAN configuration is the fact that is software-based, computers can easily be moved and still maintain their network configurations.

The following links provide more information about virtual networking concepts and how to configure virtual networks.

Network adapters

Two types of network adapters can be attached to a virtual machine: a network adapter and a legacy adapter. A network adapter provides better performance than the legacy network adapter. The legacy adapter emulates an Intel 21140-based PCI Fast Ethernet Adapter, which results in a lower data transfer than the network adapter. A legacy network adapter also supports network-based installations because it includes the ability to boot to the Pre-Boot Execution Environment (PXE).

Unless you need to use a legacy adapter until you can install the virtual machine driver, or need to do a network boot, we recommend that you configure the VM with a network adapter.

Note

You can use the legacy adapter initially to do a network boot, and when that is no longer required, add a network adapter and delete the legacy adapter.

As is the case with physical servers, you can install multiple adapters on a virtual machine.

Virtual machine configuration

Hyper-V provides numerous options for configuring a virtual machine. These options can be changed after you have started the virtual machine and installed Microsoft SharePoint Server. You will have to shut the virtual machine down in order to the change the configuration. Based on the capacity management and high availability planning that you did for Create a detailed design and system specifications for a virtual farm (SharePoint Server 2010), configure the following for each virtual machine:

  • The boot sequence (legacy network adapter, CD, IDE, or floppy disk)

  • The amount of memory

  • The number of virtual processors, up to a limit of four

  • The type and number of controllers

  • The type and number of disks

  • The type and number of network adapters

In addition to the preceding configurations, you also have the option to configure COM ports and to configure a virtual floppy disk.

From a SharePoint Server perspective, the primary configuration considerations are memory, processor, and the type and number of controllers and hard disks.

Memory

After factoring in a 2 GB RAM reserve for the virtualization host, you can configure a virtual machine to have any amount of the remaining memory. You will, of course have to take into account the amount of memory that you provide to other virtual machines running on the same virtualization host.

Note

The 2 GB of RAM reserved for the virtualization host is used as a guide and not a required or enforced amount of memory. Typically the actual amount of RAM committed to the physical server is less.

The actual memory overhead on Hyper-V is fairly small. This is well-illustrated if you download the Hyper-V RAM Calculator.xls (https://go.microsoft.com/fwlink/p/?LinkId=187756) and use it to calculate RAM use on a host of a given size with a several virtual machines.

Processor

You can configure multiple virtual processors for a virtual machine, up to a limit of four processors. You cannot configure more processors per VM that there are logical (cores) processors on the virtualization host. For example, given a dual core physical server, you are limited to configuring two virtual processors for a VM. Although Hyper-V supports up to eight virtual processors per core, a configuration that uses this ratio (1 logical: 8 virtual) is referred to as being oversubscribed. For any virtual machine used in a SharePoint farm, we recommend a ratio of 1:1. Oversubscribing the CPU on the virtualization host will work, but performance will degrade depending on the amount of oversubscription.

Controller and hard disk

You can select either integrated device electronics (IDE) or SCSI devices on virtual machines, as follows:

  • IDE devices: Hyper-V uses emulated devices with IDE controllers. You can have up to two IDE controllers with two disks on each controller. 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. Although a virtual machine must use an IDE device as the startup disk to start the guest operating system, you have many options to choose from when selecting the physical device that will provide the storage for the IDE device.

  • SCSI devices: Each virtual machine supports up to 256 SCSI disks (four SCSI controllers with each controller supporting up to 64 disks). SCSI controllers use a type of device developed specifically for use with virtual machines and use the virtual machine bus to communicate. The virtual machine bus must be available when the guest operating system is started. Therefore, virtual hard disks attached to SCSI controllers cannot be used as startup disks.

    Note

    Although the I/O performance of physical SCSI and IDE devices can differ significantly, this is not true for the virtualized SCSI and IDE devices in Hyper-V. IDE and SCSI devices both offer equally fast I/O performance when integration services are installed in the guest operating system. Support for hot swappable hard drives, which is supported by the Hyper-V implementation of SCSI, is a better reason for selecting SCSI drives than performance gains.

The version of Hyper-V released with Windows Server 2008 R2 provides dramatic improvements in virtual hard disk performance. For more information, see Virtual Hard Disk Performance: Windows Server 2008 / Windows Server 2008 R2 / Windows 7 (https://go.microsoft.com/fwlink/p/?LinkId=186519). For a summary of virtual machine drive options, see the "How to choose your Hyper-V and VHD Storage Container Format" section of this white paper. Also, heed the authors' advice: When choosing the right VHD for your environment, consider both the access performance and storage needs. When using Windows Server 2008 R2, the choice has less to do with the access speed and more to do with the amount of memory used due to advanced caching.

Important

There is not a generic storage solution for every virtual environment. Selecting the optimal virtual machine drive option for your SharePoint Server servers requires research and extensive testing to implement the best storage solution for your virtual environment.

Integration services

Hyper-V includes a software package for supported guest operating systems that improves integration between the physical computer and the virtual machine. This package is referred to as integration services. You should verify that the management operating system (which runs the Hyper-V role) and virtual machines are running the same version of integration services. For more information, see Version Compatibility for Integration Services (https://go.microsoft.com/fwlink/p/?LinkId=188011).

For each virtual machine you can configure the following integration items between the VM and the virtualization host:

  • Operating system shutdown

  • Time synchronization

  • Data exchange

  • Heartbeat

  • Backup (volume snapshot)

Important

Disable the time synchronization for each SharePoint Server virtual machine. SharePoint Server 2010 implements timer jobs extensively and the latency during time synchronization will cause unpredictable results in the SharePoint Server environment.

Automatic stop and start

For each virtual machine you can configure automatic stop and start behavior if a physical machine shuts down. The options for stop are:

  • Save the virtual machine state. The current state of the virtual machine is saved and when the VM is started, Hyper-V attempts to restore the VM to the state it was in.

  • Turn off the virtual machine. This is the equivalent of pulling the power plug on a server.

  • Shut down the guest (virtual machine) operating system. This is the equivalent of shutting down the machine using the Windows Shut down option.

For a SharePoint Server virtual machine, do not configure the virtual machine to save state. Virtual machines that come up from saved state will be out of synchronization with the other servers in the farm. We recommend that you configure the virtual machine to use a shutdown because it provides the cleanest method to minimize virtual machine corruption. When a shutdown occurs any timer jobs that are running are allowed to finish and there will not be any synchronization issues when the VM restarts.

The opposite of an automatic stop is an automatic start. Hyper-V provides the following startup options when the physical server restarts:

  • Do nothing. You will have to start the VM manually regardless of its state when the physical server shut down.

  • Automatically start if the machine was running when the service stopped.

  • Always start this virtual machine automatically. Hyper-V will start the machine regardless of its state when the physical server shut down.

We recommend that you either of the first two options. Either option is valid, but the decision is ultimately up to the IT team that is managing and maintaining the virtual environment.

In addition to the preceding start options, you can configure a startup time delay for a virtual machine. We recommend that you do so in order to reduce resource contention on a virtualization host. However, if your start option is to do nothing, this is not an issue.

Using snapshots

Snapshots provide a very useful tool for capturing the current state of a running, paused, or stopped virtual machine. The snapshot feature enables you to quickly and easily revert to a previous virtual machine configuration. This capability is particularly well-suited to a development or test environment.

As a best practice, we recommend that you do not use the snapshot feature on virtual machines in a production environment for the following reasons:

  • Clock synchronization: When you take a snapshot of a running virtual machine, there is latency between the time the snapshot is started and the time the snapshot is finished. This latency affects SharePoint Server timer jobs and, as a result, time synchronization between farm servers.

    Important

    If you choose to take a snapshot of a virtual machine, shut down the machine to allow running jobs to finish before taking the snapshot. We recommend that you closely monitor the virtual machine and other farm servers after the virtual machine is restarted to ensure that there are no time synchronization issues.

  • Performance: When you create a snapshot for a virtual machine you have, in effect, created a differencing disk. There is a continuous exchange of configuration data between the virtual machine and the snapshot, which affects performance.

See Also

Other Resources

Resource Center: Virtualization for SharePoint Server 2010