From the list of Programs and Features functions, click Turn

Một phần của tài liệu mcsa_pearson.mcsa.70-697.and.70-698.cert.guide.configuring.windows.devices (Trang 609 - 639)

Step 4. Expand the Hyper-V folder, displaying the selections Hyper-V Management Tools and Hyper-V Platform.

Note

If Client Hyper-V is not supported due to any missing requirements, the Hyper-V Platform option will be disabled. Hover your pointer over the disabled option and Windows will display a tool tip to explain why you cannot install the Hyper-V Platform. In Figure 10-3, Hyper-V Platform is disabled because the processor does not have the required virtualization capabilities.

Figure 10-3. Hyper-V Cannot Be Installed Because the Processor Does Not Support the Necessary Virtualization Features

Step 1. Select all Hyper-V options to include Management Tools and the Hyper-V Platform.

Step 2. Click OK to install the Hyper-V features. Windows will take a few minutes to perform the installation and then request a reboot to complete the changes.

Step 3. Click Reboot Now to complete the installation.

After Windows has restarted, Hyper-V will be installed and ready to use.

Creating a Hyper-V Virtual Machine

There are many scenarios that make the use of virtual machines in a client environment a compelling solution for efficient use of resources and time.

Server virtualization provides many advantages for making the best use of costly hardware resources. Client Hyper-V offers some of the same

efficiencies, but that is less of a consideration than other use cases. The following are several advantages of using Client Hyper-V:

• Maintaining multiple test environments for developers and systems engineers.

• Running older versions of Windows for applications that will not run on current versions.

• Building a test lab infrastructure on a computer or laptop. Workstations or server VMs tested in the virtual lab can be migrated to a virtualized

production environment.

• Developers or QA professionals can test applications or changes on multiple operating systems, using a single Client Hyper-V computer.

• Export a VM from the production environment to a Client Hyper-V test machine. From there troubleshooting can be performed, fixes applied and tested, and the system restarted multiple times without impacting the current production systems.

• Use VM checkpoints while a machine is running to test invasive changes.

You can test changes and revert to the point-in-time before the checkpoint if things go wrong, or apply the checkpoint back to the running VM if the testing is successful.

• With a workstation with a fast processor and enough RAM, an entire

working environment can be deployed as VMs on Client Hyper-V, to include all networking configurations and virtual switches. It can be used for testing, software development, or even demonstration of a proof-of-concept.

Designing a virtual environment for some of these scenarios may require some planning. Or it can serve as a proof-of-concept environment as a

preliminary step to planning an environment. Because you are not deploying expensive hardware, all your changes can be easily reversed, changed, or simply deleted. A virtual environment provides the freedom to experiment with options without much risk. The changes you make and systems you design can be documented as you go, and planning can be performed when technical challenges are overcome. Deciding when to take a checkpoint of a VM or a set of VMs may be the most difficult planning decision to make during the testing. The only disruption any of your changes cause will be to a single workstation.

Note that one of the scenarios in the preceding list was based on a use case for running older applications that do not work in current versions of

Windows. This may be a rare scenario, but it does happen. Applications can become obsolete and unsupported but are still required for business needs that cannot easily be replaced. In Windows Vista and Windows 7, this type of issue was addressed with Windows XP Mode, which allowed users to run a virtualized version of Windows XP on top of their Windows Vista or

Windows 7 computer. In Windows 10, this trimmed-down virtualization feature has been replaced with Hyper-V.

Using the Hyper-V Manager

After installing Hyper-V and the Hyper-V management tools, the Hyper-V Manager is ready to run. You can start the Hyper-V Manager from the Start menu, or click the Search bar or Cortana and type hyper into the Search box.

The link for the Hyper-V Manager will appear in the list. Click it to start the management interface. When you click the host computer name, it will look similar to Figure 10-4.

Figure 10-4. The Hyper-V Manager Screen Before Any Virtual Machines Are Added

The Hyper-V Manager is a central location for managing your Hyper-V virtual hosts and the VMs running on those hosts. Similar to other Microsoft Management Console snap-ins, you can connect to other computers and servers running the Hyper-V Platform and perform the same tasks on those hosts and VMs.

The manager interface is composed of three sections. The left navigation pane shows the Hyper-V host machines and allows you to focus on a specific host and add new ones to the inventory.

The central pane displays the VMs for the current host, an area to display Checkpoints for a selected VM, and finally a Details list for displaying

configuration specifics of the VM you are working with. When a running VM is selected, the Details section displays a miniature image of the virtual

console and tabs for checking the current Memory and Networking usage.

The right pane is the Actions section, where you can perform activities, such as creating new virtual machines, manage the host configuration settings, manage VHDs and SAN storage locations, and other functions. Each of these actions are also available from the right-click context menu of each hostname

in the Navigation pane.

Creating Virtual Machines

You can create a new VM in Hyper-V Manager by following a simple wizard-like interface. The following steps create a basic virtual machine ready to run:

Step 1. In Hyper-V Manager’s Actions pane, click New and select Virtual Machine from the pop-up menu. The New Virtual Machine Wizard screen is displayed.

Step 2. Read the information on the Before You Begin page and then click the Next button.

Step 3. When the Specify Name and Location screen is displayed (see Figure 10-5), enter a descriptive name for the new VM in the box provided.

Optionally, you can change the folder location for the VM. This location only refers to the configuration files for the VM itself, not the virtual disk that the VM guest will use for storage. Click the Next button to proceed.

Figure 10-5. Creating a New Virtual Machine

Step 4. On the Specify Generation page shown in Figure 10-6, you can select whether to create a Generation 1 or Generation 2 virtual machine. Generation 1 is selected by default, and this format will be the most compatible version of VM to use, in case you want to run the machine on a Windows 8.1 or

Windows Server 2012 Hyper-V host. Note that if you are creating a 32-bit guest, you must use Generation 1. Select Generation 1, and then click the Next button.

Figure 10-6. Creating a Generation 1 or Generation 2 Virtual Machine

Step 5. On the Assign Memory screen shown in Figure 10-7, decide how much memory the VM will use. The minimum is 32 MB and the maximum depend on the amount of RAM available on the physical host. The default is 1024 MB of RAM. When you have assigned the memory you want the VM to use, click the Next button.

Figure 10-7. Assigning Memory for a New Virtual Machine

Step 6. On the Configure Networking screen, you assign the VM to use a specific Virtual Switch. If none has been configured on the Hyper-V host, the only available selection will be Not Connected. Click the Next button to proceed.

Step 7. The Connect Virtual Hard Disk page allows you to configure the virtual hard disk that will be used by the VM. You can create a new dynamic VHDX disk from the Connect Virtual Hard Disk screen, or you can use an existing one. The previous section covered creating a VHDX using DiskPart,

and in Figure 10-8 this disk is assigned to the new VM. Then click Next.

Figure 10-8. Assigning an Existing VHD to a New Virtual Machine

Step 8. The Completing the New Virtual Machine Wizard page shown in Figure 10-9 displays a description of your selections. When you click the Finish button, the wizard will create the new VM.

Figure 10-9. Ready to Create a New Virtual Machine with 1024 MB RAM and No Networking

The VM created with this method is a pretty basic machine. Unless you use a VHD with an existing Windows image, there will be no operating system. If the VM is not connected to a virtual switch, it has no networking. There are many ways to make the VM useful, which we cover in the following

sections; however, first we should look at the many VM configuration options that were not available from the wizard.

Configuring Virtual Machines

When you first create a VM, it is added to the Hyper-V Manager turned off.

Some settings can be changed only while the VM is powered off. To

configure the settings for a powered-off VM, select it from the list, and then click the Settings action for the machine. The Settings page shown in Figure 10-10 is displayed.

Figure 10-10. Configuring Virtual Machine Settings

The virtual machine settings include many of the same items you would consider when purchasing a physical computer, but in a virtual machine they either make using of existing hardware on the host machine or are simply carved out of thin air using software emulation. For instance, if you want to increase the amount of memory or disk space, the resources used by the VM would consume some memory or disk space on the host or storage attached to the host. On the other hand, you can also simulate items such as SCSI

controllers, network adapters, COM ports, and other hardware inside the hypervisor, even if these items do not exist on the host computer.

The VM settings include the following configurable items, which are grouped as VM Hardware settings and Management settings:

Add Hardware: Add new hardware to the virtual machine. The items available include the following:

SCSI Controller: One controller is created for the virtual machine by default, but you can add additional controllers here. This allows you to

simulate complex RAID configurations using VHDs that could all reside on a single disk drive.

Network Adapter: Add a virtual network interface card to the VM. To enable a connection for the network adapter, a virtual switch must be available in the Hyper-V host environment.

RemoteFX 3D Video Adapter: Add a graphics adapter for rich 3D graphical experience for the guest. This requires a DirectX 10-compatible graphics adapter on the host.

Legacy Network Adapter: The legacy adapter is available for performing network-based installation of the guest operating system, or when integration services are not available on the guest. Guest VM integration services are covered later in this section. They are not available on Generation 2 guests.

Fibre Channel Adapter: This adapter is used for connecting the guest to an existing physical Fibre Channel storage. It acts as a pass-through adapter so that a VM can access physical storage over Fibre Channel.

BIOS or Firmware: Some basic BIOS settings are available; most

important is the capability to select the startup order for boot devices. This is convenient for installation of operating systems on the VM. Generation 2 guests will have Firmware, Generation 1 will have BIOS.

Memory: The amount of memory available to a VM will affect

performance more than any other setting. The latest version of Hyper-V (included with Windows 10) includes support for Dynamic Memory. You should understand how these settings are used. Dynamic Memory is

examined in detail in Table 10-3.

Processor: Specify the number of virtual processors assigned to the VM.

From this page you can also reserve or limit a percentage of resources the VM should use. Refer to Table 10-4 for details on the Processor

configuration settings and how they are used.

IDE Controller: By default, the New Virtual Machine Wizard will add two IDE Controllers (0 and 1) to a Generation 1 VM, and assign the first VHD to IDE Controller 0. Generation 2 VMs will not have IDE controllers, so the first hard drive will be assigned to a SCSI controller.

New Hard Drive: When you add a new hard drive to the VM’s IDE

Controller, it can be either VHDs or attached to a physical hard disk available on the host computer. If you want to add a physical hard disk, it must be offline in the host before you can add it. That drive will be unavailable to the host operating system.

New DVD Drive: If you want to add a DVD drive to the VM, it must be added to the IDE Controller. The guest SCSI controller does not support DVD drives. Similar to adding an IDE hard disk, the DVD drive can be either a physical drive from the host or a DVD image file in ISO format (a .ISO file).

SCSI Controller: This is a virtual SCSI controller that the VM operating system will treat as an actual SCSI controller. You can add VHDs and physical disks to the VM’s SCSI controller. Physical disks that you add to this simulated controller do not need to be attached to a physical SCSI device

—they can be IDE disks or even USB disk drives.

Network Adapter: You can modify a number of settings for the VM’s network adapter, including changing the virtual switch it is using. This is analogous to moving the network cable from one switch to another on a physical computer. The section “Creating and Configuring Virtual Switches”

covers more details about the network adapter configuration.

COM 1 and COM 2 (Generation 1 only): You can attach the virtual COM ports to named pipes on the local host or a remote computer to simulate serial communications on the VM.

Diskette Drive (Generation 1 only): Allows you to attach a simulated floppy disk drive to the VM. You cannot use a physical device for the VM; it must be a virtual floppy disk (.vfd) file.

Name: Set the descriptive name for this VM used by Hyper-V. This section also allows you to add descriptions and notes for the VM, which is

convenient for keeping track of how you are using the VM.

Integration Services: Configure which Hypervisor services will be available for the VM.

Checkpoints File Location: Specify where on the host Hyper-V should store checkpoint images for the VM, and whether you want to use Production checkpoints or Standard checkpoints.

Smart Paging File Location: Smart Paging allows the hypervisor to deal with excessive demands of memory from Virtual Machines, typically during start-up. In this setting you can specify the folder Hyper-V should use to store the Smart Paging files for this VM.

Automatic Start Action: Tell Hyper-V whether to automatically start this VM when the hypervisor is started. If you enable automatic start, you can also specify a number of seconds to delay the startup.

Automatic Stop Action: Configure how Hyper-V will manage the VM state when the host is shut down. By default, Hyper-V will save the current state of the VM.

Caution

If you select Turn Off the Virtual Machine for the VM’s Automatic Stop Action, be aware that this is like immediately pulling the power on a physical machine. If the operating system is loaded and running when this happens, it can cause file system corruption, loss of data, and, potentially, disk errors that prevent the operating system from loading the next time the VM is started.

When configuring your Hyper-V virtual environment, you should be aware of the memory and processor settings available for the VMs. This will help manage the physical resources, and balance the requirements for the Virtual Machines between each other and the resources needed by the host operating system itself.

Table 10-3. Virtual Machine Dynamic Memory

Option Description

Startup RAM

Startup RAM tells the hypervisor how much memory to assign the VM when it first loads. If Dynamic Memory is not enabled, this setting will specify the total amount of memory the VM will use at all times.

Enable Dynamic Memory

When Dynamic Memory is enabled, Hyper-V will adjust the amount of RAM assigned to the VM based on the demand from the guest operating system.

Minimum RAM

The minimum amount of memory to assign to the VM. If there is not enough physical memory on the host to satisfy this

requirement, the VM will not load.

Maximum RAM

The maximum amount of memory that can be assigned to the VM by the hypervisor. The actual amount assigned will not exceed the amount of physical memory available on the host, regardless of this setting. In Windows 10 Hyper-V, a VM can be assigned as much as 1 TB of RAM, but the amount is also limited by the amount of physical memory in the host and the amount of RAM the guest operating system is capable of addressing.

Memory buffer

Hyper-V will use this setting to provide an amount of memory above the demands of the VM’s operating system. Performance counters are used to determine the memory the VM is requesting for use. The buffer percentage will be used to add some amount to that demand when allocating memory. For instance if the

operating system is requesting 1000 MB for its use, and the buffer is 20%, the hypervisor will assign 1200 MB of RAM to the VM.

The weighting set here, from Low to High, is used when there are

Memory weight

multiple VMs running under the hypervisor requesting memory.

Adjust this setting so that VMs that have a higher priority for performance are provided a higher weight. VMs with a lower rating will perform slower when there is a high demand for memory resources on the hypervisor as a whole.

The processor options that can be specified or used for a VM depend heavily on the physical processor characteristics available on the host machine. You should understand the basics of how these settings are used by Hyper-V.

Table 10-4. Virtual Machine Processor Configuration Options

Option Description

Number of virtual processors

Set the number of processors the guest OS will see when it starts. You can assign as many processors as the number of cores in the host computer.

Resource control

Resource control is important when there are a number of VMs running at the same time on a single host. Note that these settings are specific to the number of virtual processors

assigned. Reserve a percentage of the resources available to the VM to ensure that the VM always has that amount of processor available to use. Set a limit to ensure the VM never uses more resources on the processor(s) than that percentage amount. Finally, you can assign a Relative weight for this VM.

The weight is an arbitrary number, and is relevant only when compared to the weight of other VMs running on the host.

Generally, Hyper-V will maximize performance by using all

Một phần của tài liệu mcsa_pearson.mcsa.70-697.and.70-698.cert.guide.configuring.windows.devices (Trang 609 - 639)

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

(1.305 trang)