Configure Hyper-V
he concept of virtualizing servers has, in the past several years, grown from a novel experiment to a convenient lab and testing tool to a legitimate deployment strategy for
production servers. Windows Server 2012 includes the Hyper-V role, which enables admin- istrators to create virtual machines (VMs), each of which runs in its own isolated environ- ment. VMs are self-contained units that administrators can easily move from one physical computer to another, greatly simplifying the process of deploying network applications and services.
This chapter covers some of the fundamental tasks that administrators perform to create and deploy Hyper-V servers and VMs.
Objectives in this chapter:
■ Objective 3.1: Create and configure virtual machine settings
■ Objective 3.2: Create and configure virtual machine storage
■ Objective 3.3: Create and configure virtual networks
Objective 3.1: Create and configure virtual machine
settings
Server virtualization in Windows Server 2012 is based on a module called a hypervi-
sor. Sometimes called a virtual machine monitor (VMM), the hypervisor is responsible for abstracting the computer’s physical hardware and creating multiple virtualized hardware environments, called VMs. Each VM has its own (virtual) hardware configuration and can run a separate copy of an operating system (OS). Therefore, with sufficient physical hard- ware and the correct licensing, a single computer running Windows Server 2012 with the Hyper-V role installed can support multiple VMs, which administrators can manage as if they were standalone computers.
This objective covers how to:
■ Configure dynamic memory
■ Configure smart paging
■ Configure Resource Metering
■ Configure guest integration services
Virtualization architectures
Virtualization products can use several different architectures to share a computer’s hard-
ware resources among VMs. The earlier type of virtualization products, including Microsoft Windows Virtual PC and Microsoft Virtual Server, requires a standard OS installed on a computer. This becomes the “host” OS. Then you install the virtualization product, which adds the hypervisor component. The hypervisor essentially runs alongside the host OS, as shown in Figure 3-1, and enables you to create as many VMs as the computer has hardware to support.
FIGURE 3-1 A hybrid VMM sharing hardware access with a host operating system.
This arrangement, in which the hypervisor runs on top of a host OS, is called Type II virtu- alization. By using the Type II hypervisor, you create a virtual hardware environment for each VM. You can specify how much memory to allocate to each VM, create virtual disk drives by using space on the computer’s physical drives, and provide access to peripheral devices. You then install a “guest” OS on each VM, just as if you were deploying a new computer. The host OS then shares access to the computer’s processor with the hypervisor, with each taking the clock cycles it needs and passing control of the processor back to the other.
Type II virtualization can provide adequate VM performance, particularly in classroom and laboratory environments, but it does not provide performance equivalent to separate physical computers. Therefore, it is not generally recommended for high-traffic servers in production environments.
The virtualization capability built into Windows Server 2012, called Hyper-V, uses a dif- ferent type of architecture. Hyper-V uses Type I virtualization, in which the hypervisor is an abstraction layer that interacts directly with the computer’s physical hardware—that is, with- out an intervening host OS. The term hypervisor is intended to represent the level beyond the term supervisor, in regard to responsibility for allocating a computer’s processor clock cycles.
The hypervisor creates individual environments called partitions, each of which has its own OS installed and accesses the computer’s hardware via the hypervisor. Unlike Type II virtualization, no host OS shares processor time with the hypervisor. Instead, the hypervisor designates the first partition it creates as the parent partition and all subsequent partitions as child partitions, as shown in Figure 3-2.
FIGURE 3-2 A Type I VMM, with the hypervisor providing all hardware access.
The parent partition accesses the system hardware through the hypervisor, just as the child partitions do. The only difference is that the parent runs the virtualization stack, which creates and manages the child partitions. The parent partition is also responsible for the subsystems that directly affect the performance of the computer’s physical hardware, such as Plug and Play, power management, and error handling. These subsystems also run in the OSs on the child partitions, but they address only virtual hardware, whereas the parent, or root, partition handles the actual hardware.
NOTE HYPER-V
It might not seem like the Hyper-V role in Windows Server 2012 provides Type I virtualiza- tion, because it requires the Windows Server OS to be installed and running. However, add- ing the Hyper-V role actually converts the installed instance of Windows Server 2012 into the parent partition and causes the system to load the hypervisor before the OS.
Hyper-V implementations
Windows Server 2012 includes the Hyper-V role only in the Standard and Datacenter edi-
tions. The Hyper-V role is required for the OS to function as a computer’s primary partition, enabling it to host other VMs. No special software is required for an OS to function as a guest OS in a VM. Therefore, although Windows Server 2012 Essentials does not include the Hyper-V role, it can function as a guest OS. Other guest OSs supported by Hyper-V include
the current Windows workstation OSs and many other non-Microsoft server and workstation products.
Hyper-V licensing
As far as Hyper-V is concerned, the primary difference between the Standard and Datacenter editions of Windows Server 2012 is the number of VMs they support. When you install a Windows Server 2012 instance on a VM, you must have a license for it, just like when you install it on a physical machine. Purchasing the Datacenter edition licenses you to create an unlimited number of VMs running Windows Server 2012 on that one physical machine. The Standard license provides only two virtual instances of Windows Server 2012.
NOTE LICENSING
The licensing restrictions of the Windows Server 2012 Standard and Datacenter editions do not govern how many VMs you can create. They only govern what OS you are permitted to install on the VMs. You can, for example, use a Standard edition license to create only two virtual instances of Windows Server 2012, but you can also create any number of VMs run- ning a free Linux distribution.
Hyper-V hardware limitations
The Windows Server 2012 version of Hyper-V contains massive improvements in the scal- ability of the system over previous versions. A Windows Server 2012 Hyper-V host system can have up to 320 logical processors, supporting up to 2,048 virtual CPUs and up to 4 terabytes (TB) of physical memory.
One server can host as many as 1,024 active VMs, and each VM can have up to 64 virtual
CPUs and up to 1 TB of memory.
Hyper-V can also support clusters with up to 64 nodes and 8,000 VMs.
NOTE WINDOWS POWERSHELL
Another major improvement in the Windows Server 2012 version of Hyper-V is the inclu- sion of a Hyper-V module for Windows PowerShell, which includes more than 160 new cmdlets dedicated to the creation and management of the Hyper-V service and its VMs.
Hyper-V Server
In addition to the Hyper-V implementation in Windows Server 2012, Microsoft provides a dedicated Hyper-V Server product, which is a subset of Windows Server 2012. Hyper-V Server includes the Hyper-V role, which it installs by default during the OS installation. With the exception of some limited File and Storage Services and Remote Desktop capabilities, the OS includes no other roles, as shown in Figure 3-3.
FIGURE 3-3 Roles available in Hyper-V Server.
The Hyper-V Server is also limited to the Server Core interface, although it includes a simple, script-based configuration interface, as shown in Figure 3-4. You can manage Hyper-V Server remotely by using Server Manager and Hyper-V Manager, just as you would any other Server Core installation.
FIGURE 3-4 The Server Core interface in Hyper-V Server.
Unlike Windows Server 2012, Hyper-V Server is a free product, available for download from Microsoft’s website. However, Hyper-V Server does not include any licenses for virtual instances. You must obtain and license all the OSs you install on the VMs you create.
Installing Hyper-V
Once you have the appropriate hardware and the required licenses, you can add the Hyper-V
role to Windows Server 2012 by using Server Manager, just as you would any other role.
Adding the Hyper-V role installs the hypervisor software, and, in the case of a full GUI installation, also installs the management tools. The primary tool for creating and managing VMs and their components on Hyper-V servers is the Hyper-V Manager console. Hyper-V Manager provides administrators with a list of all the VMs on Windows Server 2012 systems and enables administrators to configure the environments of both the servers and the indi- vidual VMs. There is also a set of Hyper-V cmdlets for Windows PowerShell that enables you to exercise complete control over VMs using that interface.
Microsoft recommends that you do not install other roles with Hyper-V. It is better to implement any other roles that you need the physical computer to perform within one of the VMs you create by using Hyper-V. In addition, you might want to consider installing Hyper-V on a computer by using the Server Core installation option. This will minimize the overhead expended on the partition. As with other roles, installing Hype
đang được dịch, vui lòng đợi..
