File services and storage 361

Một phần của tài liệu Tài liệu cài đặt và cấu hình Windows Server 2012 (Trang 313 - 378)

Hyper-V virtualization

Virtualization is rapidly becoming the essential foundation for today’s datacenter environments . Both private and public cloud computing are based on virtualization technologies, as is the emerging virtual desktop infrastructure (VDI) paradigm that can provide benefits beyond those provided by traditional desktop computing for certain scenarios . Being able to implement and manage a virtualization infrastructure, therefore, is becoming a key job role for datacenter administrators .

The Hyper-V server role of Microsoft Windows Server provides an out-of-the-box platform for virtualizing both server workloads and virtual desktops . The numerous enhancements and improvements made to Hyper-V in Windows Server 2012 now make it easier than ever to deploy, configure, manage, and maintain an organization’s virtualized computing infrastructure . This chapter demonstrates how to deploy and manage virtual- ization hosts and virtual machines using both the GUI administration tools and Windows PowerShell cmdlets included in Windows Server 2012 .

Lessons in this chapter:

■ Lesson 1: Deploying and configuring Hyper-V hosts 292

■ Lesson 2: Deploying and configuring virtual machines 316

■ Lesson 3: Managing virtual machines 339

Before you begin

To complete the practice exercises in this chapter

■ You need to know how to perform a clean install of Windows Server 2012 and perform initial configuration tasks like configuring the server’s TCP/IP settings for Internet connectivity .

■ You should have some familiarity using Hyper-V Manager to manage hosts running Windows Server 2008 R2 or Windows Server 2008 .

■ You also should have at least rudimentary knowledge of using Windows PowerShell on earlier versions of Windows Server .

Lesson 1: Deploying and configuring Hyper-V hosts

The first step in implementing a virtualization infrastructure is deploying and configuring the servers that will host your virtualized workloads . For the Windows Server platform, this means being able to plan, install, and configure Hyper-V hosts . This lesson helps you under- stand the issues and considerations involved in planning host deployment . The lesson also demonstrates how to configure storage and networking for Hyper-V hosts.

After this lesson, you will be able to

■ Describe the various considerations involved in planning the deployment of Windows Server 2012 Hyper-V hosts .

■ Describe some of the scalability, availability, mobility, security, management, and disaster-recovery improvements in the new version of Hyper-V .

■ Describe the different types of virtual switches you can create on Hyper-V hosts .

■ Describe the different types of storage devices that can be used by hosts .

■ Install the Hyper-V role using either Server Manager or Windows PowerShell on any installation option of Windows Server 2012 .

■ Configure virtual machine storage for hosts.

■ Create and configure virtual switches on hosts.

■ Perform additional host-configuration tasks.

Estimated lesson time: 30 minutes

Planning Hyper-V deployment

Successful deployment requires careful planning ahead of time to ensure problems don’t arise during or after the deployment process . The following issues should be considered when planning the deployment of Hyper-V hosts within your datacenter:

■ Hardware

■ Editions

■ Networking

■ Storage

■ Management

■ Security

■ Scalability

■ Availability

■ Mobility

■ Disaster recovery

In addition, each of these issues should be considered from both the host and virtual machine perspective before you begin to deploy Hyper-V hosts within your datacenter . While the sections that follow focus mainly on considerations relating to planning host machines, some mention of planning for virtual machines is also included where appropriate, especially when it directly relates to host-planning issues .

Hardware

A key hardware requirement for a Hyper-V host is that the underlying host system sup- port hardware-assisted virtualization such as Intel Virtualization Technology (Intel VT) or AMD Virtualization (AMD-V) technologies . In addition, hardware-enforced Data Execution Prevention (DEP) must be available and enabled on the host system. Specifically, this means that the Intel XD bit (the execute disable bit) or AMD NX bit (the no execute bit) must be enabled .

Although you can install the Hyper-V role on a Windows Server 2012 server that meets the minimum system requirements of a single-core, 1 .4-GHz CPU and 512 MBs of RAM, you probably won’t be able to run any virtual machines on that host machine . This is mainly because each virtual machine you run on a host requires a minimum amount of RAM that depends on the guest operating system installed in the virtual machine . In other words, the number of virtual machines and types of virtualized workloads you can run on Hyper-V hosts directly relate to the available hardware resources of the host .

To plan your host hardware, you therefore should start with the maximum supported processor and memory capabilities of Windows Server 2012, which are as follows:

■ Up to 64 physical processors (sockets) per host

■ Up to 320 logical processors (cores) per host

■ Up to 4 TBs of physical memory per host

Next, you should consider the maximum supported processor and memory capabilities for virtual machines running on Windows Server 2012 Hyper-V hosts . These are as follows:

■ Up to 64 virtual processors per virtual machine (up to a total of 2048 virtual processors per host)

■ Up to 1 TB of physical memory per virtual machine

■ Up to 1024 active virtual machines running on the host

Finally, you must decide how many virtual machines you want to run on each host . In deciding this, you must consider the following:

■ How many cores you can afford when you purchase your host systems

■ How much physical memory you can afford for your host systems

■ How much processing power and physical memory your virtualized workloads will need for them to meet the performance requirements of your service level agreement (SLA) .

REAL WORLD PLANNING THE HOST PROCESSOR AND MEMORY

As an example, let’s say you wanted to run two file servers and a Microsoft SQL Server database server on a single Hyper-V host in your datacenter. You’ve determined that the file servers will each require 2 virtual processors and 4 GBs of RAM to perform as intended, while the database server will require 4 virtual processors and 12 GBs of RAM for optimal performance. The total processor and memory requirements of your virtual machines will therefore be

(2 x 2) + 4 = 8 virtual processors (2 x 4) + 12 = 20 GBs RAM

By including the minimum processor and memory requirements of the underlying host operating system plus room for growth, you might decide that a rack-mounted sys- tem with dual Intel Xeon E5-2430 processors and 24 GBs of RAM can meet your needs.

The Xeon E5-2430 is a 6-core processor, so two of them gives you 12 cores, which easily meets the requirements of 8 dedicated virtual processors needed by the virtual machines.

And the 24 GBs of RAM provides several GBs of RAM overhead on the host in case extra memory needs to be assigned to the database server workload.

Editions

Your decision concerning how many virtualized workloads to run on a host might also influence your decision about which edition of Windows Server 2012 to purchase. There are no technical differences between the capabilities of the Standard and Datacenter editions of Windows Server 2012 . Both editions support up to 64 physical processors and 4 TBs of physical memory . Both editions also support installing the same set of roles and features . The only differences between these editions are the virtualization rights included in their licensing and the price of the editions .

The virtualization rights included with each edition are as follows:

■ The Standard edition includes two instances of Windows Server .

■ The Datacenter edition includes unlimited instances of Windows Server .

As a result, you should choose the Standard edition if you need to deploy Windows Server 2012 as a workload on bare metal in a nonvirtualized environment, and choose the Datacenter edition if you need to deploy Windows Server 2012 Hyper-V hosts for a virtualized datacenter or private-cloud scenario .

The licensing model for Windows Server 2012 has also been simplified to make it easier for you to plan the budget for your IT department. Specifically, the Windows Server 2012 Datacenter edition is now licensed in increments of two physical processors . This means, for example, that if you want to deploy the Datacenter edition onto a system that has eight processors, you need to purchase only four licenses of the product .

MORE INFO COMPARING EDITIONS

For more information on how Windows Server 2012 editions compare and for current pricing information, see http://www.microsoft.com/en-us/server-cloud/ windows-server/

2012-editions.aspx.

Networking

Hyper-V networking requires careful planning to ensure reliable and secure network connectivity and management of both hosts and virtual machines . At a minimum, your host machines should have at least two physical network adapters configured as follows:

■ One network adapter to allow virtualized workloads to communicate with other systems on your production network

■ One network adapter dedicated for the management of your Hyper-V hosts and connected to a dedicated network used by your systems management platform . More physical network adapters might be needed if you have additional services or special requirements . For example, you might need additional network adapters for the following:

■ Providing connectivity between hosts and Internet SCSI (iSCSI) storage

■ Deploying a failover cluster

■ Using cluster shared volume (CSV) shared storage

■ Performing live migrations of running virtual machines

■ Increasing available bandwidth using Windows NIC Teaming

In addition to deciding how many network adapters your hosts will need, you must also consider what types of virtual switches will be needed for your environment . A Hyper-V virtual switch is a layer 2 network switch that works like a physical Ethernet switch but is implemented in software on the host . Hyper-V allows you to create three different kinds of virtual switches:

Private This type of virtual switch allows virtual machines running on the host to communicate only with each other and not with the operating system of the host . A private virtual switch is not bound to any physical network adapter on the host, which means that the virtual machines on the host cannot communicate with any other system on any physical network connected to the host .

Internal This type of virtual switch allows virtual machines running on the host to communicate with each other and with the operating system of the host . An internal virtual switch is not bound to any physical network adapter on the host, which means that the virtual machines on the host cannot communicate with any other system on any physical network connected to the host .

External Unlike the other two types of virtual switches listed, this type is bound to a physical network adapter on the host . The result is that an external virtual switch allows virtual machines running on the host to communicate with each other, with

the operating system of the host, and with other systems on the physical network connected to the host through that adapter . In addition, the external virtual switch can be bound to the physical network adapter by means of miniports in one of three ways:

■ By using a single miniport representing a single physical network adapter

■ By using a single miniport representing multiple physical network adapters

■ By using multiple miniports representing a single physical network adapter REAL WORLD PLANNING HOST NETWORKING

As an example, let’s say you want to deploy Hyper-V to run a number of mission-critical server workloads for your organization. You decide that your hosts should be clustered and use CSV for performing live migration. You also decide that a single 1-gigabit Ethernet (GbE) network adapter will have insufficient bandwidth to allow clients to access the work- loads. So you decide to use Windows NIC Teaming, a new feature of Windows Server 2012, to allow two network adapters to provide 2 gigabits per second (Gbps) of network con- nectivity between your host cluster and the 10-GbE backbone of your production network.

Finally, you plan on using your Fibre Channel storage area network (SAN) to provide stor- age for your host machines. How many physical network adapters will each host machine need?

One NIC to provide dedicated connectivity to your management network

Two NICs teamed together to provide connectivity between the virtualized work- loads and your production network

One NIC dedicated to the private network needed for failover clustering

One NIC dedicated for use by CSV shared storage

One NIC dedicated to live migration traffic

That’s six network adapters in total that are needed for each host. Note that no network adapter will be required for SAN connectivity because you’re using Fibre Channel not iSCSI.

REAL WORLD VIRTUAL SWITCHES

In most cases, you’ll want to create one or more external virtual switches to enable clients on your production subnet or subnets to access server workloads running in virtual machines on your hosts. If you’re doing test or development work, however, a private or internal virtual switch might be a good choice.

The Hyper-V virtual switch has been enhanced in Windows Server 2012 with extensibility features that allow independent software vendors (ISVs) to add functionality for filtering, forwarding, and monitoring network traffic through virtual switches. These virtual-switch extensions can be implemented using two kinds of drivers:

NDIS filter drivers These extensions can be used to perform network packet inspection, network packet filtering, and network forwarding. They are based on the Network Driver Interface Specification (NDIS) 6.0 specification, which is new in Windows Server 2012 .

WFP callout drivers These extensions are based the Windows Filtering Platform (WFP) and can be used to provide virtual firewall functionality, connection monitoring, and filtering traffic that is protected using Internet Protocol security (IPsec).

If your virtualized infrastructure requires any of the preceding functionalities to be implemented at the virtual-switch level on Windows Server 2012 Hyper-V hosts, you can search for an ISV that provides a software solution that meets your needs .

Storage

Different organizations have different requirements and different budgets for their IT operations, and Windows Server 2012 provides a wide range of physical storage options for Hyper-V hosts . Choosing the storage solution that meets your needs and cost parameters is an important part of the host-deployment planning process .

The following types of physical storage can be used by Hyper-V hosts for storing virtual machine configuration files and disks:

Direct Attached Storage (DAS) With DAS solutions, the storage is directly attached to the management operating system . Hyper-V supports the following DAS technologies:

■ Serial Advanced Technology Attachment (SATA)

■ external SATA (eSATA)

■ Small Computer System Interface (SCSI)

■ Serial Attached SCSI (SAS)

■ Parallel Advanced Technology Attachment (PATA)

■ Universal Serial Bus (USB)

■ FireWire

Storage area network (SAN) With SAN solutions, the storage is provided by a set of interconnected devices that are connected to a common communication and data- transfer infrastructure, commonly known as the storage fabric . Hyper-V supports the following types of storage fabrics:

■ Fibre Channel

■ Internet SCSI (iSCSI)

Scale-Out File Servers New features of the Server Message Block (SMB) 3 .0 protocol now allow file servers running Windows Server 2012 to provide continuously available and scalable storage for CSVs. This allows you to use a file share on a Windows Server 2012 file server to provide storage for Hyper-V host clusters.

NOTE NAS AND HYPER-V

Network-attached storage (NAS) is not supported for Hyper-V hosts.

Deciding whether to use SAN or DAS as your host storage solution depends on a number of different factors . For example, some of the advantages of the SAN approach include

■ SAN allows multiple servers access to a pool of storage . This means SAN provides flexibility by allowing any server to access any storage unit in the SAN array.

■ Because SAN is a centralized storage solution, it is easier to manage than DAS . This might be an important consideration if you will be deploying many Hyper-V hosts .

■ SAN has a more scalable architecture than the DAS approach . The disadvantages of the SAN approach, however, include the following:

■ SANs are usually more costly than DAS solutions, and depending on your business priorities this factor might weigh heavily in your decision .

■ DAS solutions typically have lower latency than SANs. So if application I/O or service latency is a priority, DAS might be the route to take .

Management

Once you deploy your Hyper-V hosts, you need to be able to manage them efficiently.

Choosing the right management solution, therefore, is a key aspect of the host-deployment process .

Hyper-V includes two in-box tools for configuring and managing host machines:

Hyper-V Manager This Microsoft Management Console (MMC) snap-in has been enhanced with new functionality in Windows Server 2012, but it basically provides the same level of host-management capability as in previous versions of Windows Server . You can use this tool to manage any number of host machines, but as the number of managed hosts increases the amount of work to manage them scales accordingly .

Windows PowerShell Hyper-V module Windows Server 2012 includes over a hundred new Windows PowerShell cmdlets that can be used to manage both Hyper-V hosts and virtual machines running on these hosts. Because of its flexibility and sup- port for automation, Windows PowerShell is the preferred in-box tool for managing Hyper-V hosts and virtual machines in large environments such as datacenters and cloud-computing environments .

NOTE MANAGING HYPER-V ON DIFFERENT WINDOWS SERVER VERSIONS

You can use the Hyper-V Manager snap-in to manage Windows Server 2012 Hyper-V hosts from either a Server With A GUI or Server Minimal Server Interface installation of Windows Server 2012 that has the Hyper-V management tools installed, or from a Windows 8 administrator workstation that has the Remote Server Administration Tools (RSAT) for Windows 8 installed. However, you cannot manage Hyper-V hosts running earlier versions of Windows Server using these tools. Such hosts must be managed using an earlier version of Hyper-V Manager. This means that you might need multiple sets of management tools to manage a mixed environment that has Hyper-V hosts running different Windows Server versions. The alternative is to use System Center 2012 Virtual Machine Manager SP1, which allows you to manage all versions of Hyper-V hosts.

You can use Windows PowerShell to manage hosts and virtual machines using one- off commands issued from the Windows PowerShell console, by using Windows PowerShell scripts, and by using the following two new capabilities included in Windows PowerShell 3 .0:

Windows PowerShell workflows These allow you to create sequences of multicomputer management activities that are long-running, repeatable, frequent, parallelizable, interruptible, stoppable, and restartable . Windows PowerShell work- flows can be suspended and resumed after a network outage, machine restart, or power loss. Windows PowerShell workflows are also portable and can be exported and imported as XAML files.

Windows PowerShell scheduled jobs Windows PowerShell 3 .0 now allows you to schedule Windows PowerShell background jobs and manage them in Windows PowerShell and in Task Scheduler . Windows PowerShell scheduled jobs run asyn- chronously in the background . You can create, edit, manage, disable, and re-enable them; create scheduled job triggers; and set scheduled job options by using Windows PowerShell cmdlets .

In addition to using the preceding in-box tools for managing Hyper-V hosts and virtual machines that are included in Windows Server 2012, organizations that need to deploy and manage large numbers of hosts or virtual machines can benefit from the following products from Microsoft’s System Center platform:

System Center Virtual Machine Manager Allows you to configure and deploy virtual machines and centrally manage your physical and virtual infrastructure from one console

System Center Configuration Manager Allows you to assess, deploy, and update servers, client computers, and devices across physical, virtual, distributed, and mobile environments

Một phần của tài liệu Tài liệu cài đặt và cấu hình Windows Server 2012 (Trang 313 - 378)

Tải bản đầy đủ (PDF)

(640 trang)