Hyper-V
Hyper-V virtualization represents the foundation of Microsoft’s vision for the cloud operating system. Storage and networking are the walls that help support your virtualization infrastructure. Then, on top of everything, comes management and automation. Together, these different functionalities enable a wide range of cloud solutions that can meet the needs of any business.
But the bottom line is that virtualization is at the core of everything in most IT shops nowadays. For example, when IT wants to deploy a new workload (for example a Microsoft SQL Server machine) the common way of doing this (and it’s really a best practice) is to virtualize the workload first instead of deploying the workload on a physical server. As a second example, when IT wants to deploy a new desktop image, the common practice is to create the image in a Hyper-V virtual environment before deploying it onto physical desktop computers.
Windows Server 2012 R2 builds upon the improvements added earlier in Hyper-V on Windows Server 2012 and adds new features and functionality that can deliver greater gains in performance, availability, and agility. This chapter examines what’s new in this latest version of Hyper-V but first we’ll briefly review what was previously introduced in Hyper-V on Windows Server 2012.
Hyper-V virtualization represents the foundation of Microsoft’s vision for the cloud operating system. Storage and networking are the walls that help support your virtualization infrastructure. Then, on top of everything, comes management and automation. Together, these different functionalities enable a wide range of cloud solutions that can meet the needs of any business.
But the bottom line is that virtualization is at the core of everything in most IT shops nowadays. For example, when IT wants to deploy a new workload (for example a Microsoft SQL Server machine) the common way of doing this (and it’s really a best practice) is to virtualize the workload first instead of deploying the workload on a physical server. As a second example, when IT wants to deploy a new desktop image, the common practice is to create the image in a Hyper-V virtual environment before deploying it onto physical desktop computers.
Windows Server 2012 R2 builds upon the improvements added earlier in Hyper-V on Windows Server 2012 and adds new features and functionality that can deliver greater gains in performance, availability, and agility. This chapter examines what’s new in this latest version of Hyper-V but first we’ll briefly review what was previously introduced in Hyper-V on Windows Server 2012.
Previous enhancements to Hyper-V
A lot of powerful new features and capabilities were added to Hyper-V in the previous version of Windows Server, and space doesn’t allow us to go into detail concerning each of them. As a quick summary however, the following enhancements could be characterized as some of the more significant improvements in the platform:
- Increased scalability and resiliency Hyper-V hosts running Windows Server 2012 supported up to 320 logical processors and 4 terabytes (TB) of memory, and virtual machines running on these hosts could be configured with 64 virtual processors and 1 TB of memory.
- New live migration options Beginning with Windows Server 2012 you could perform a live migration in a nonclustered environment, and could perform multiple live migrations simultaneously utilizing higher networks bandwidths.
- Storage migration Hyper-V in Windows Server 2012 allowed you to move the virtual hard disks used by a virtual machine to different physical storage while the virtual machine remained running.
- Virtual machines on file shares Hyper-V in Windows Server 2012 supported using Server Message Block 3.0 (SMB 3.0) file shares as storage for virtual machines. This meant you could store your virtual machine files on a cost-efficient Scale-Out File Server running Windows Server 2012 instead of buying an expensive storage area network (SAN) for this purpose.
- Extensible virtual switch Hyper-V on Windows Server 2012 included a new extensible virtual switch that provided an open framework to allow third parties to add new functionality such as packet monitoring, forwarding, and filtering into the virtual switch.
- Windows PowerShell module Hyper-V in Windows Server 2012 included a Windows PowerShell module for Hyper-V that provided more than 160 cmdlets for automating Hyper-V management tasks.
- VHDX format Hyper-V in Windows Server 2012 included a new virtual hard disk format called VHDX that supported up to 64 TB of storage. The VHDX format also provided built-in protection from corruption stemming from power failures and resisted performance degradation when using some large-sector physical disks.
- Reclaiming snapshot storage With Hyper-V in Windows Server 2012, when a virtual machine snapshot was deleted, the storage space that the snapshot consumed before being deleted was made available while the virtual machine was running. This meant that you no longer needed to shut down, turn off, or put the virtual machine into a saved state to recover the storage space. And even more importantly for production environments, differencing disks are now merged with the parent while the virtual machine is running.
- Improved virtual machine import The virtual machine import process in Hyper-V in Windows Server 2012 improved to help resolve configuration problems that might otherwise prevent a virtual machine from being imported. In addition, you could import a virtual machine by copying its files manually instead of having to export the virtual machine first.
- Dynamic Memory improvements Dynamic Memory was improved in Hyper-V in Windows Server 2012 to include support for configuring minimum memory. In addition, Smart Paging, a new memory management mechanism, was introduced to provide a reliable restart experience for virtual machines configured with less minimum memory than startup memory.
- Single-root I/O virtualization (SR-IOV) Hyper-V in Windows Server 2012 allowed you to assign network adapters that supported SR-IOV directly to virtual machines running on the host. SR-IOV maximized network throughput while minimizing network latency and CPU overhead needed for processing network traffic.
- Virtual Fibre Channel Hyper-V in Windows Server 2012 allowed you to connect directly to Fibre Channel storage from within the guest operating system that runs in a virtual machine. This allowed you to virtualize workloads and applications that require direct access to Fibre Channel–based storage. It also made guest clustering (clustering directly within the guest operating system) possible when using Fibre Channel–based storage.
- Hyper-V Replica Hyper-V in Windows Server 2012 allowed you to replicate virtual machines between storage systems, clusters, and data centers in two sites to provide business continuity and disaster recovery.
Now that we’ve reviewed the Hyper-V improvements introduced previously in Windows Server 2012, let’s move on and examine some of the new capabilities added to Hyper-V in Windows Server 2012 R2.
Generation 2 virtual machines
One of the key ways that Windows Server 2012 R2 advances the Hyper-V virtualization platform is in its support for a new generation of virtual machines. Microsoft refers to these as “Generation 2” virtual machines, and they have the key following characteristics:
- UEFI-based Beginning with Windows 8 and Windows Server 2012, Microsoft Windows now supports the Secure Boot feature of the Unified Extensible Firmware Interface (UEFI). This means that UEFI is now part of the Windows 8 and Windows Server 2012 boot architecture, and it replaces the Basic Input/Output System (BIOS) firmware interface used by previous versions of Windows for initiating the boot process. Generation 2 virtual machines comply with the UEFI Secure Boot standard and enable virtual machines to use Secure Boot.
- Legacy free In previous versions of Hyper-V, virtual machines used a standard set of emulated hardware devices to ensure compatibility running all versions of Windows. These emulated devices include an AMI BIOS, Intel 440BX chipset
- motherboard, S3 Trio graphics display adapter, Intel/DEC 21140 network adapter, and
- so on. With Generation 2 virtual machines, many of these emulated devices have now been removed and replaced with synthetic drivers and software-based devices as summarized in Table 2-1.
- SCSI boot Virtual machines in previous versions of Hyper-V needed to boot from integrated development environment (IDE) disks (virtual disks attached to the virtual machine using the IDE controller). Beginning with Windows Server 2012 R2, however,Generation 2 virtual machines can now boot directly from SCSI disks (virtual disks attached to the virtual machine using the SCSI controller). In fact, Generation 2 virtual machines don’t even have an IDE controller!
- Faster deployment Network-based installation of a guest operating system onto a Generation 2 virtual machine is significantly faster than for the previous generation of Hyper-V virtual machines for two reasons. First, the Legacy Network Adapter device is no longer required (or even supported) by Generation 2 virtual machines. And second, the SCSI controller performs much better than the legacy IDE controller in the previous generation of virtual machines. The result is that installing a supported guest operating system in a Generation 2 virtual machine takes only about half the time as installing the same guest operating system in a previous generation virtual machine.
TABLE 2-1 Hardware Device Changes in Generation 2 Virtual Machines
LEGACY DEVICES REMOVED REPLACEMENT DEVICES ENHANCEMENTS
IDE controller
|
Virtual SCSI controller
|
Boot from VHDX (64 TB max size,
online resize)
|
IDE CD-ROM
|
Virtual SCSI CD-ROM
|
Hot add/remove
|
Legacy BIOS
|
UEFI firmware
|
Secure Boot
|
Legacy NIC
|
Synthetic NIC
|
Network boot with IPv4 & IPv6
|
Floppy & DMA Controller
|
No floppy support
| |
UART (COM Ports)
|
Optional UART for debugging
|
Faster and more reliable
|
i8042 keyboard controller
|
Software-based input
|
No emulation – reduced resources
|
PS/2 keyboard
|
Software-based keyboard
|
No emulation – reduced resources
|
PS/2 mouse
|
Software-based mouse
|
No emulation – reduced resources
|
S3 video
|
Software-based video
|
No emulation – reduced resources
|
PCI Bus
|
VMBus
| |
Programmable Interrupt Controller
(PIC)
|
No longer required
| |
Programmable Interrupt Timer (PIT)
|
No longer required
| |
Super I/O device
|
No longer required
|
Because of all these hardware changes, Generation 2 virtual machines only support the following versions of Windows as guest operating systems:
- 64-bit versions of Windows 8 and Windows Server 2012
- 64-bit versions of Windows 8.1 and Windows Server 2012 R2
As Figure 2-1 shows, when you create a new virtual machine in Windows Server 2012 R2 using Hyper-V Manager, you now have the option of choosing whether to create a
first-generation virtual machine or a Generation 2 virtual machine. You can also specify which type of virtual machine to be created by using the new -Generation parameter of the New-VM Windows PowerShell cmdlet in Windows Server 2012 R2.
FIGURE 2-1 A Generation 2 virtual machine can be created using the New Virtual Machine wizard.
Once the Generation 2 virtual machine has Windows Server 2012 R2 installed as the guest operating system, opening Device Manager shows the various synthetic and software-based devices attached to the VMBus. Note that unlike first-generation virtual machines, there is no PCI-to-ISA bridge running in ISA mode, no PS/2 keyboard, no PS/2 mouse, no COM ports, and so on.
Figure 2-2 compares Device Manager for Generation 1 virtual machines (left) with Device Manager for Generation 2 virtual machines (right).
Automatic VM activation
Starting way back with Windows Server 2003 R2 with Service Pack 2, the Datacenter edition of Windows Server has provided unlimited virtualization rights for servers to allow organizations to deploy as many virtual machines as they need in their environments. But until now this benefit has come with the cost of the administrative overhead of deploying a key management infrastructure for licensing and activating these virtual machines.
Beginning with Windows Server 2012 R2, when a new virtual machine with Windows Server 2012 R2 installed as the guest operating system boots up for the first time on a Hyper-V host running a Datacenter edition of Windows Server, the new virtual machine checks to see whether the host machine has been activated, and if it is activated then the virtual machine automatically activates itself as well. This new automatic activation capability removes a major customer pain point by greatly reducing the time and effort needed by large enterprises and hosters for managing licensing and activation of large numbers of virtual machines in their environment.
Regardless of whether your Hyper-V hosts are OEM machines or are running a volume- licensed version of Windows Server activated using Key Management Service (KMS) or Multiple Activation Key (MAK), if the host machine is running Datacenter edition and is activated, then all virtual machines running Windows Server 2012 R2 as a guest operating system are automatically activated. And this is also completely secure with respect to your existing key management infrastructure since no keys are used to activate the virtual machines. So if you should copy or move one of your virtual machines to someone else’s environment, for example, as part of demonstration purposes, your keys won’t be exposed. Of course, the other environment must also be using hosts running an activated copy of a Datacenter edition of Windows Server.
Remote access over VMBus
Virtual Machine Connection (VM Connect) is a tool that you use to connect to a virtual machine running on a Hyper-V host. VM Connect is installed on the host when you add the Hyper-V role to your server. Specifically, if the server is running Windows Server 2012, then the VM Connect is installed with the Hyper-V role provided that either the server with a GUI installation option has been selected or the Minimal Server Interface option has been configured. (VM Connect is not available on Windows Server Core installations of Windows Server.)
The purpose of VM Connect is to enable Hyper-V administrators to directly interact with the guest operating system in a virtual machine from the local console of the host. While management of most virtual machines is typically performed remotely using either Remote Desktop Connection (RDC) or Windows PowerShell, there are times when you might need to work with a virtual machine directly on the host, for example when the virtual network adapter of a virtual machine stops functioning. In such cases, you can use Hyper-V Manager on the
host and to connect to the virtual machine and open its desktop within the VM Connect
window to configure or troubleshoot the virtual machine and its guest operating system even if the virtual machine has no connectivity with your network.
The way that VM Connect works in Windows Server 2012 and earlier is to present you with a bitmap image of the desktop of a virtual machine’s guest operating system, which is generated by an emulated video card in the virtual machine. This bitmap image is updated in real time so you can see configuration changes as they happen. VM Connect also provides you with emulated keyboard and mouse devices in the virtual machine so you can directly control the desktop of the guest operating system. Because VM Connect in Windows Server 2012 and earlier uses bitmap images, certain limitations exist in how you can use VM Connect to interact with the guest operating system. For example, you can copy and paste text between the host machine’s desktop and the desktop of the guest operating system, but you can’t copy/paste images or files between them.
Beginning with Windows Server 2012 R2, however, VM Connect no longer connects you to the guest operating system using an emulated video card, keyboard, and mouse in the virtual machine. Instead, VM Connect uses Remote Desktop Services (RDS) in the guest operating system of the virtual machine to provide the full RDS experience when you use it to connect to the virtual machine (see Figure 2-3). The result is an enhanced experience that enables you to:
The purpose of VM Connect is to enable Hyper-V administrators to directly interact with the guest operating system in a virtual machine from the local console of the host. While management of most virtual machines is typically performed remotely using either Remote Desktop Connection (RDC) or Windows PowerShell, there are times when you might need to work with a virtual machine directly on the host, for example when the virtual network adapter of a virtual machine stops functioning. In such cases, you can use Hyper-V Manager on the
host and to connect to the virtual machine and open its desktop within the VM Connect
window to configure or troubleshoot the virtual machine and its guest operating system even if the virtual machine has no connectivity with your network.
The way that VM Connect works in Windows Server 2012 and earlier is to present you with a bitmap image of the desktop of a virtual machine’s guest operating system, which is generated by an emulated video card in the virtual machine. This bitmap image is updated in real time so you can see configuration changes as they happen. VM Connect also provides you with emulated keyboard and mouse devices in the virtual machine so you can directly control the desktop of the guest operating system. Because VM Connect in Windows Server 2012 and earlier uses bitmap images, certain limitations exist in how you can use VM Connect to interact with the guest operating system. For example, you can copy and paste text between the host machine’s desktop and the desktop of the guest operating system, but you can’t copy/paste images or files between them.
Beginning with Windows Server 2012 R2, however, VM Connect no longer connects you to the guest operating system using an emulated video card, keyboard, and mouse in the virtual machine. Instead, VM Connect uses Remote Desktop Services (RDS) in the guest operating system of the virtual machine to provide the full RDS experience when you use it to connect to the virtual machine (see Figure 2-3). The result is an enhanced experience that enables you to:
- Copy/paste files between the desktop of the host and the desktop of the guest operating system.
- Redirect audio on the virtual machine to the host.
- Enable the guest operating system to use smart cards attached to the host.
- Enable the guest operating system to access any USB device attached to the host. All of this is possible even if the virtual machine is not connected to the network. And youcan do it with hosts you are managing remotely using Hyper-V Manager or Windows PowerShell. You don’t have to be logged on interactively to the host to experience all this new VM Connect functionality.
FIGURE 2-3 VM Connect now connects to the virtual machine using RDS in the guest operating system.
Cross-version live migration
Windows Server 2012 R2 also includes several significant improvements to live migration that can benefit organizations deploying private cloud solutions built with Windows Server and System Center. Live migration was introduced in Windows Server 2008 R2 to provide a
high-availability solution for virtual machines running on Hyper-V hosts. Live migration uses the Failover Clustering feature to allow running virtual machines to be moved between cluster nodes without perceived downtime or loss of network connection. Live migration provides the benefit of increased agility by allowing you to move running virtual machines to the best host for improving performance, achieving better scaling, or ensuring optimal workload consolidation. Live migration also helps increase productivity and reduce cost by allowing you to service your host machines without interruption or downtime for your virtualized workloads.
The ability to perform cross-version live migration between Hyper-V hosts running Windows Server 2012 and Windows Server 2012 R2 is new in Windows Server 2012 R2. Cross-version live migration can be performed using any of the live migration options supported by Windows
high-availability solution for virtual machines running on Hyper-V hosts. Live migration uses the Failover Clustering feature to allow running virtual machines to be moved between cluster nodes without perceived downtime or loss of network connection. Live migration provides the benefit of increased agility by allowing you to move running virtual machines to the best host for improving performance, achieving better scaling, or ensuring optimal workload consolidation. Live migration also helps increase productivity and reduce cost by allowing you to service your host machines without interruption or downtime for your virtualized workloads.
The ability to perform cross-version live migration between Hyper-V hosts running Windows Server 2012 and Windows Server 2012 R2 is new in Windows Server 2012 R2. Cross-version live migration can be performed using any of the live migration options supported by Windows
Server 2012 including:
Live migration on a failover cluster
Live migration between failover clusters
Live migration using a Scale-Out File Server that supports SMB 3.0
Shared nothing live migration where no shared storage is used for the virtual machines
For organizations that have already begun deploying a private cloud solution based on Windows Server 2012, cross-version live migration means that you will be able to upgrade your private cloud solution from Windows Server 2012 to Windows Server 2012 R2 with zero downtime for the workloads running on your virtual machines. If you can tolerate a brief downtime window for your workloads, you can even choose to perform an in-place upgrade of your existing Hyper-V hosts from Windows Server 2012 to Windows Server 2012 R2.
And unlike previous versions of Windows Server, you don’t have to perform a lot of preparatory actions before performing an in-place upgrade of your Hyper-V hosts. For example, you previously had to do things like turn off the virtual machines running on the host, and you also had to delete any snapshots and saved states of the virtual machines. When performing an in-place upgrade of a Hyper-V host from Windows Server 2012 to Windows Server 2012 R2, however, none of these preparatory steps are required and all of the virtual machine’s snapshots and saved states are preserved.
Faster live migration
Live migration is also significantly faster in Windows Server 2012 R2 Hyper-V for two reasons. First, a new ability to compress live migration traffic can be used to reduce the amount of data that needs to be sent over the network during a live migration. This live migration compression capability is enabled by default for Hyper-V in Windows Server 2012 R2 and can often halve the time it takes to perform a live migration in a Windows Server 2012 R2 Hyper-V environment, depending on the processing resources available on the host machines for performing the compression operation.
SMB Direct, which is short for SMB over Remote Direct Memory Access (SMB over RDMA), is a feature of SMB 3.0 that supports the use of RDMA-capable network adapters. By using SMB Direct for example, a Hyper-V host is able to access data on a remote SMB 3.0 file server (called a Scale-Out File Server) as quickly and easily as if the data was on local storage on the Hyper-V host. SMB Direct is available only on the Windows Server platform and was introduced in Windows Server 2012. SMB Direct requires that the SMB client and SMB server both support SMB 3.0.
SMB Multichannel is another feature of SMB 3.0 that enables the aggregation of network bandwidth and provides network fault tolerance whenever multiple paths are available between an SMB 3.0 client and an SMB 3.0 server. SMB Multichannel thus enables server applications to take full advantage of all available network bandwidth and be resilient to a network failure. SMB Multichannel is also the feature that is responsible for detecting the RDMA capabilities of network adapters to enable the use of SMB Direct. Once SMB Multichannel has determined that a network adapter is RDMA-capable, it creates multiple RDMA connections (two per interface) for that session. SMB Multichannel is also available only on the Windows Server platform and was introduced in Windows Server 2012, and it requires that the SMB client and SMB server both support SMB 3.0.
When a live migration is performed with virtual machines running on Hyper-V hosts that have RDMA-capable network adapters, SMB Direct and SMB Multichannel enable multiple network interfaces to be used for performing the live migration. This not only results in significantly faster live migrations but also results in less use of processing resources on the hosts as well. This is different from live migration compression, which utilizes available processor resources on the host to reduce the network load involved in transferring the compressed virtual machine memory across the network.
When would you use live migration compression? A typical scenario would be when the primary constraining factor limiting the speed of live migration is your network bandwidth but your Hyper-V hosts are not under heavy load as regards processing cycles. When would you use live migration using SMB Direct and SMB Multichannel? A scenario here would be when the primary constraining factor is high processor utilization on your host machines while you have lots of bandwidth available on your network. In general, if the network you are using for performing your live migration is 10 GbE or slower, you probably want to use the compression approach. If your network is faster than 10 GbE, then you should probably be using RDMA- capable network adapters so you can take advantage of the SMB Direct and SMB Multichannel capabilities of Windows Server 2012 and later.
Second, live migration can be faster in Windows Server 2012 R2 Hyper-V because of the ability to use network adapters that have Remote Direct Memory Access (RDMA) together with the SMB Direct and SMB Multichannel features of SMB 3.0. RDMA is a networking technology that enables high-throughput, low-latency communication that minimizes CPU usage on the computers using this technology. RDMA is an industry standard protocol defined in RFC 5040 that works by moving data directly between the memory of the computers involved, bypassing the operating systems on these machines. Examples of types of RDMA-capable network adapter hardware include Infiniband (IB), Internet Wide Area RDMA Protocol (iWARP), and
RDMA over Converged Ethernet (RoCE).SMB Direct, which is short for SMB over Remote Direct Memory Access (SMB over RDMA), is a feature of SMB 3.0 that supports the use of RDMA-capable network adapters. By using SMB Direct for example, a Hyper-V host is able to access data on a remote SMB 3.0 file server (called a Scale-Out File Server) as quickly and easily as if the data was on local storage on the Hyper-V host. SMB Direct is available only on the Windows Server platform and was introduced in Windows Server 2012. SMB Direct requires that the SMB client and SMB server both support SMB 3.0.
SMB Multichannel is another feature of SMB 3.0 that enables the aggregation of network bandwidth and provides network fault tolerance whenever multiple paths are available between an SMB 3.0 client and an SMB 3.0 server. SMB Multichannel thus enables server applications to take full advantage of all available network bandwidth and be resilient to a network failure. SMB Multichannel is also the feature that is responsible for detecting the RDMA capabilities of network adapters to enable the use of SMB Direct. Once SMB Multichannel has determined that a network adapter is RDMA-capable, it creates multiple RDMA connections (two per interface) for that session. SMB Multichannel is also available only on the Windows Server platform and was introduced in Windows Server 2012, and it requires that the SMB client and SMB server both support SMB 3.0.
When a live migration is performed with virtual machines running on Hyper-V hosts that have RDMA-capable network adapters, SMB Direct and SMB Multichannel enable multiple network interfaces to be used for performing the live migration. This not only results in significantly faster live migrations but also results in less use of processing resources on the hosts as well. This is different from live migration compression, which utilizes available processor resources on the host to reduce the network load involved in transferring the compressed virtual machine memory across the network.
When would you use live migration compression? A typical scenario would be when the primary constraining factor limiting the speed of live migration is your network bandwidth but your Hyper-V hosts are not under heavy load as regards processing cycles. When would you use live migration using SMB Direct and SMB Multichannel? A scenario here would be when the primary constraining factor is high processor utilization on your host machines while you have lots of bandwidth available on your network. In general, if the network you are using for performing your live migration is 10 GbE or slower, you probably want to use the compression approach. If your network is faster than 10 GbE, then you should probably be using RDMA- capable network adapters so you can take advantage of the SMB Direct and SMB Multichannel capabilities of Windows Server 2012 and later.
Online VHDX resize
Another new capability of Hyper-V in Windows Server 2012 R2 is the ability to increase or decrease the size of a virtual hard disk attached to a virtual machine while that virtual machine is still running on the host. This means that if the workload running on a virtual machine should require more space, you can expand the virtual hard disk without interrupting any applications accessing the workload. And if you want to reallocate storage space from one virtual machine to another, you can shrink the virtual hard disk attached to the first virtual machine (provided that there is sufficient unpartitioned space on the disk) to free up space for expanding the disk on the second machine.
Online resizing of virtual hard disks requires that these disks be using the newer VHDX virtual hard disk format first introduced in Windows Server 2012. VHDX was designed to address the growing technological demands of today’s enterprises and provides greater storage capacity, built-in data protection, and support for large-sector hard disk drives. In addition, online resizing requires that the virtual disk be attached to the virtual machine’s SCSI bus.
For example, the following steps use Hyper-V Manager to expand the size of a running virtual machine:
1. In Hyper-V Manager, right-click the virtual machine and select Settings.
2. In the Settings dialog for the virtual machine, click the Hard Drive node under SCSI Controller for the virtual hard disk you want to expand, then click the Edit button to launch the Edit Virtual Hard Disk Wizard.
3. Select the Expand option on the Choose Action page, click Next, type the new size you want the virtual hard disk to have (see Figure 2-4), and then click Next followed by Finish.
Once you’ve expanded a virtual hard disk, the option to shrink it will be displayed next time you use the Edit Virtual Hard Disk Wizard.
Online resizing of virtual hard disks requires that these disks be using the newer VHDX virtual hard disk format first introduced in Windows Server 2012. VHDX was designed to address the growing technological demands of today’s enterprises and provides greater storage capacity, built-in data protection, and support for large-sector hard disk drives. In addition, online resizing requires that the virtual disk be attached to the virtual machine’s SCSI bus.
For example, the following steps use Hyper-V Manager to expand the size of a running virtual machine:
1. In Hyper-V Manager, right-click the virtual machine and select Settings.
2. In the Settings dialog for the virtual machine, click the Hard Drive node under SCSI Controller for the virtual hard disk you want to expand, then click the Edit button to launch the Edit Virtual Hard Disk Wizard.
3. Select the Expand option on the Choose Action page, click Next, type the new size you want the virtual hard disk to have (see Figure 2-4), and then click Next followed by Finish.
Once you’ve expanded a virtual hard disk, the option to shrink it will be displayed next time you use the Edit Virtual Hard Disk Wizard.
FIGURE 2-4 Virtual hard disks of running virtual machines can now be resized on Windows Server 2012 R2.
Live export
Not only can you now resize virtual hard disks attached to virtual machines while the virtual machines are running, you can also export a running virtual machine. You couldn’t do this with virtual machines on Windows Server 2012 or earlier versions of Windows Server. However, with Windows Server 2012 R2 you can use Hyper-V Manager to export a complete copy of a running virtual machine or to export any snapshot of a running virtual machine. And you can use Virtual Machine Manager 2012 R2 to clone a running virtual machine, which basically
involves exporting and then importing a virtual machine to create a new virtual machine that is
based on the existing virtual machine. And you can even export snapshots while a virtual machine is running.
One scenario where live export can be helpful is when a running virtual machine in your environment begins to exhibit some instability but is still performing its expected workload. Previously, you had to choose between the lesser of two evils:
involves exporting and then importing a virtual machine to create a new virtual machine that is
based on the existing virtual machine. And you can even export snapshots while a virtual machine is running.
One scenario where live export can be helpful is when a running virtual machine in your environment begins to exhibit some instability but is still performing its expected workload. Previously, you had to choose between the lesser of two evils:
- Stop the virtual machine or take it offline and try to troubleshoot the problem. Unfortunately while the virtual machine is stopped or offline, its workload will no longer be available to users, and this can result in loss of either business or productivity.
- Let the virtual machine continue to run and hope it doesn't fail. This approach allows the virtual machine’s workload to continue to be available, but instability often ends up with the application or guest operating system crashing, which means a probable interruption in workload will occur. Once again, this is likely to result in loss of either business or productivity.
With live export, however, you can now clone a copy of your unstable virtual machine without shutting the virtual machine down (see Figure 2-5). You can then let your production virtual machine continue to run while you perform troubleshooting steps on the cloned workload to try and see if you can resolve the issue causing the instability. Once you determine how to fix the problem by working with the cloned virtual machine, you might be able to
repair your production virtual machine without needing to reboot the guest operating system
or restart its running applications, depending on the issue causing the instability.
repair your production virtual machine without needing to reboot the guest operating system
or restart its running applications, depending on the issue causing the instability.
FIGURE 2-5 Running virtual machines can now be exported or cloned on Windows Server 2012 R2.
More robust Linux support
Hyper-V has supported installing and running various Linux distros or “flavors” in virtual machines for some time now. Linux guest support in Hyper-V is especially desired by hosting providers who often like to provide their customers with a wide range of platform options for running their web applications and services. Linux (and UNIX) support in Hyper-V is also important in the enterprise space where heterogeneous IT solutions are generally the norm.
Because of the needs of these customer segments, Microsoft envisions Hyper-V
virtualization as “cross-platform from the metal up” and supports a wide range of Linux distros, as shown in Table 2-2, by providing Linux Integration Services (LIS) for specific versions of popular distros. Microsoft also includes robust Linux/UNIX capabilities across the entire System Center family of products and also in Windows Azure offerings as well. Linux/UNIX support is an integral part of all of these platforms and is not merely an extension of Windows-centric functionality.
TABLE 2-2 Current Availability of Linux Integration Services for Hyper-V in Windows Server 2012 R2
DISTRO VERSION LIS AVAILABILITY
Red Hat Enterprise Linux
|
5.7, 5.8, 6.0-6.3
|
Download LIS from Microsoft
|
Red Hat Enterprise Linux
|
5.9, 6.4
|
LIS built-in and certified by Red Hat
|
SUSE Linux Enterprise Server
|
11 SP2
|
LIS built-in
|
CentOS
|
5.7, 5.8, 6.0-6.3
|
Download LIS from Microsoft
|
CentOS
|
5.9, 6.4
|
LIS built-in
|
Ubuntu Server
|
12.04, 12.10, 13.04
|
LIS built-in
|
Debian
|
7.0
|
LIS built-in
|
As part of Microsoft’s continuing commitment to making Hyper-V the best all-around virtual platform for hosting providers, Linux support for Hyper-V in Windows Server 2012 R2 has now been enhanced in the following ways:
- Improved video A virtualized video driver is now included for Linux virtual machines to provide an enhanced video experience with better mouse support.
- Dynamic Memory Dynamic Memory is now fully supported for Linux virtual machines, including both hot-add and remove functionality. This means you can now run Windows and Linux virtual machines side-by-side on the same host machine while using Dynamic Memory to ensure fair allocation of memory resources to each virtual machine on the host.
- Online VHDX resize Virtual hard disks attached to Linux virtual machines can be resized while the virtual machine is running.
- Online backup You can now back up running Linux virtual machines to Windows Azure using the Windows Azure Online Backup capabilities of the in-box Windows Server Backup utility, System Center Data Protection Manager, or any third-party backup solution that supports backing up Hyper-V virtual machines.
Hyper-V Replica enhancements
In the short time that Windows Server 2012 has been released, Hyper-V Replica has proven to be one of its most popular features. Hyper-V Replica provides asynchronous replication of virtual machines between two Hyper-V hosts. It’s easy to configure and doesn’t need either shared storage or any particular storage hardware. Any server workload that you can virtualize on Hyper-V can be replicated using this capability, and replication is encrypted during transmission and works over any IP-based network.
You can use Hyper-V Replica with standalone Hyper-V hosts, failover clusters of hosts, or a mixture of these environments. The host machines can either be physically colocated or widely separated geographically. And they don’t need to be in the same domain or even domain-joined at all.
Hyper-V Replica is an ideal technology for organizations that want to add support for disaster recovery to their Hyper-V environment to ensure business continuity. For example,
you could use it to provide disaster recovery support for the branch offices by replicating their virtual machines to hosts at the head office. Another possible scenario would be to have a hosting provider set up a Replica server at their data center to receive replication data from a number of Hyper-V hosts running virtualized workloads on the premises of customers.
In Hyper-V Replica in Windows Server 2012 R2, greater control over the frequency at which data is replicated between hosts is a new feature. In Windows Server 2012, the replication frequency was fixed at every five minutes. Some customers provided feedback that this was not frequent enough for their environment, while others requested the option of performing replication less frequently. So now, as Figure 2-6 shows, there are two new replication frequencies you can choose from besides the default one of five minutes when you enable replication for a server:
- 30 seconds Choosing this option means that the host in the replica site will never be more than a minute behind the host in the primary site. This option was provided in Windows Server 2012 R2 so that Hyper-V Replica could be used as an alternative to more expensive SAN solutions that have a similar low latency. Organizations that simply need to replicate data as quickly as possible, for example between two data centers in the same metropolitan area, might choose this option.
- 15 minutes This option was provided especially for organizations that wanted to replicate data over networks that had very high latency or low reliability, for example over a satellite link. To ensure that replication would tolerate network outages and succeed in such scenarios, a long replication window like this can now be chosen when you enable replication on a host in Windows Server 2012 R2, and choosing this option means that the host in the replica site will never be more than an hour behind the host in the primary site.
FIGURE 2-6 Hyper-V Replica in Windows Server 2012 R2 now supports three possible replication frequencies.
A second new capability for Hyper-V Replica in Windows Server 2012 R2 is the introduction of extended replication. This allows a chain of replication to be configured between hosts so that, for example, HOSTA automatically replicates to HOSTB, which automatically replicates to HOSTC. As Figure 2-7 shows, you configure extended replication when you enable replication on a host.
FIGURE 2-7 Hyper-V Replica in Windows Server 2012 R2 now supports extended replication.
One possible use for this new feature would be enterprises that want to do replication both on-premises and to a local hoster. With extended replication, enterprises can do a first-hop replication on-premises and then a second hop offsite, like this:
- On-premises host A
- On-premises host B
- Hosting provider
Another usage scenario might be for hosting providers that provide Hyper-V Replica services to their customers and also want to replicate customer virtual machines to the hoster’s backup data center. Extended replication in this scenario would thus be:
- Customer site
- Primary data center
- Secondary data center
These enhancements to Hyper-V Replica in Windows Server 2012 R2 don’t just represent new features added to the platform in response to customer requests; they also represent the next steps in Microsoft’s vision of offering cloud-scale disaster recoverability solutions based on the Windows Server platform, System Center, and Windows Azure. As Figure 2-8 shows, another key part of this vision is Windows Azure Hyper-V Recovery Manager, a Windows Azure service that provides orchestration of the replication of private clouds managed using System Center Virtual Machine Manager 2012 R2.
FIGURE 2-8 Hyper-V Replica and Hyper-V Recovery Manager (HRM) are part of Microsoft’s vision for cloud-scale disaster recoverability.
For example, by using Hyper-V Recovery Manager together with VMM 2012 R2, you can replicate your organization’s primary data center to your disaster recovery site as shown in Figure 2-9. Using Hyper-V Recovery Manager, you can enhance your organization’s disaster recovery preparedness by performing failovers of selected virtual machine workloads in your environment to replicate them to your backup site. And the best thing about it is that you can do this at a fraction of the cost of using traditional SAN replication.
FIGURE 2-9 Hyper-V Recovery Manager lets you replicate your organization’s primary data center to your disaster recovery site using Windows Azure.
There’s more!
Hyper-V in Windows Server 2012 R2 also includes support for Quality of Service (QoS) management for virtual hard disks, which allows you to monitor and restrict the Input/Output Operations Per Second (IOPS) for a virtual hard disk attached to a virtual machine. We’ll talk about that in Chapter 3, “Storage,” since it fits well into the theme of that chapter.
Hyper-V in Windows Server 2012 R2 also now allows guest clustering using shared VHDX files. This new capability is going to be a game changer, especially for hosters who want to maintain separation between their own storage infrastructure and that of their tenants. Since this is related to the topic of clustering, we’ll defer discussion of this one until we get to Chapter 4, “Failover Clustering” later in this book.
There are still other enhancements to Hyper-V in Windows Server 2012 R2, but since this is only a “First Look” book we’ll leave these until we get more chances to play with the product so we can revise and expand this book when Windows Server 2012 R2 is released to manufacturing and becomes generally available to customers.
No comments:
Post a Comment