Handling Hyper-V

White Paper
Handling Hyper-V
In this series of articles, learn how to manage Hyper-V,
from ensuring high availability to
upgrading to Windows Server 2012 R2
www.unitrends.com
WP-2020-ENG-A
White Paper
How to Make Hyper-V Virtual
Machines Highly Available
Here’s how to use the Failover Cluster Manager to make virtual machines
fault tolerant or to create new virtual machines.
By Brien Posey
www.unitrends.com
3
One of the biggest disadvantages to running Hyper-V on standalone virtualization
host servers is that the physical server can become a single point of failure. If a
Hyper-V host server were to fail, then all of the virtual machines that are running on
that server will also fail. Since a single host server typically runs numerous virtual
machines, the failure of a single host server can lead to a major outage.
The solution to this problem is to make your virtual machines fault tolerant by
clustering your Hyper-V host servers. I have written a separate column describing
how you can set up failover clustering, so I am not going to be repeating that
process here. Instead, I am going to focus on some aspects of failover clustering
that are unique to Hyper-V.
Host Server Requirements
If you have ever live
migrated a virtual machine
then you know that in
order for the live migration
process to succeed there
have to be similarities
between the host servers.
If you have ever live migrated a virtual machine then you know that in order for the
live migration process to succeed there have to be similarities between the host
servers. For example, the source and destination host must have similar processor
architectures. Similarly, the destination host must have a virtual switch that has
the same name as the virtual switch that the virtual machine is already using.
Otherwise, the live migration process will ask you to connect the virtual machine to
one of the virtual switches that exists on the destination host.
These same sort of limitations also come into play when you are clustering Hyper-V
servers. If you read my column on setting up failover clustering then you know that
the Failover Clustering Feature requires you to run a series of validation tests when
setting up a failover cluster. If Hyper-V is installed on the failover clustering nodes
then the validation tests will check to make sure that the nodes are configured in
such a way that virtual machines can fail over from one node to another.
Perhaps the most common cause of validation test failures is a virtual switch
mismatch. If a Hyper-V host contains a virtual switch then every other host in the
cluster must have a virtual switch with the same name. Otherwise the validation
tests will fail. Similarly, if you create a virtual SAN on a Hyper-V host then every other
host in the cluster must be configured with an identical virtual SAN. Otherwise the
validation tests will fail.
Making Hyper-V Virtual Machines Fault Tolerant
One of the common misconceptions about failover clustering is that the act of
setting up a failover cluster for your Hyper-V hosts automatically makes your virtual
machines fault tolerant. However, the Failover Clustering feature requires you to
manually specify the virtual machines that you wish to make fault tolerant. Fault
tolerant virtual machines are treated as clustered roles.
Fault tolerant virtual
machines are treated as
clustered roles.
To make a virtual machine fault tolerant, open the Failover Cluster Manager (by
choosing the Failover Cluster Manager command from the Server Manager’s Tools
menu) and then expand your cluster and select the Roles container. Click on the
Configure Role command, found in the Actions pane, as shown in Figure 1.
200 Wheeler Road, Burlington, MA 01803
How to Make Hyper-V Virtual Machines
PART # WP-2021-ENG-A
www.unitrends.com
4
Figure 1. Click on the Configure Role link.
At this point, Windows will launch the High Availability Wizard. Click Next to bypass
the Wizard’s Welcome screen and you will be taken to the role selection screen.
Select the Virtual Machine role, as shown in Figure 2.
The virtual machine will
be listed in the Roles
container.
Figure 2. Select the Virtual Machine role.
Click Next and then select the Click Next and then select the virtual machines
that you want to make fault tolerant, as shown in Figure 3. Click Next and you will
be asked to confirm your selection. Click Next again and you will be taken to a
summary screen confirming that the virtual machine has been made fault tolerant,
as shown in Figure 4. Click Finish and the virtual machine will be listed in the Roles
container, as shown in Figure 5, page 5.
As you can see, it is relatively easy to make a virtual machine fault tolerant.
However, you can also create brand new virtual machines directly through the
Failover Cluster Manager. If you look at the figure above, you will notice that there
is a Virtual Machines option in the Actions pane. Clicking this option allows you to
create a brand new virtual machine without having to use the Hyper-V Manager.
200 Wheeler Road, Burlington, MA 01803
How to Make Hyper-V Virtual Machines
PART # WP-2021-ENG-A
www.unitrends.com
5
Figure 3. Select the virtual machines that you wish to make fault tolerant.
It is relatively easy to make
a virtual machine fault
tolerant.
Figure 4. You should see a confirmation that the virtual machine has been added to the cluster.
Figure 5. The virtual machine should be listed in the Roles container.
200 Wheeler Road, Burlington, MA 01803
How to Make Hyper-V Virtual Machines
PART # WP-2021-ENG-A
www.unitrends.com
6
About the Author
Brien Posey is a seven time Microsoft MVP with over two decades of IT experience.
As a freelance writer, Posey has written many thousands of articles and written or
contributed to several dozen books on a wide variety of IT topics. Prior to going
freelance, Posey was a CIO for a national chain of hospitals and healthcare facilities.
He has also served as a network administrator for some of the country’s largest
insurance companies and for the Department of Defense at Fort Knox. When He
isn’t busy writing, Brien Posey enjoys exotic travel, scuba diving, and racing his
Cigarette boat. You can visit his personal Web site at: www.brienposey.com.
200 Wheeler Road, Burlington, MA 01803
How to Make Hyper-V Virtual Machines
PART # WP-2021-ENG-A
www.unitrends.com
White Paper
How To Upgrade Hyper-V to
Windows Server 2012 R2
This three-step process will get your virtual machines running
on Microsoft’s latest Windows Server version.
By Brien Posey
www.unitrends.com
8
Although Windows Server 2012 Hyper-V introduced an overwhelming number
of new features, Windows Server 2012 R2 Hyper-V introduces even more. With
Windows Server 2012 R2, Microsoft did a good job of filling in some of the remaining
gaps in functionality that were still present after the Windows Server 2012 release.
As such, it may be in your best interest to upgrade your Hyper-V servers to Windows
Server 2012 R2.
Upgrading a Hyper-V server from Windows Server 2012 to Windows Server 2012 R2
is a three-step process. In this article, I want to discuss the three steps involved.
Step 1: Live Migration
It may be in your best
interest to upgrade your
Hyper-V servers to Windows
Server 2012 R2.
The first move in this process is obviously to plan for the upgrade. Once the
planning is done however, and you are actually ready to begin the upgrade process,
the first step should be to find a new home for the virtual machines that currently
reside on the host that you are upgrading.
You can obviously live migrate the virtual machines to another host server that is
running Windows Server 2012 Hyper-V. However, a more attractive option might be
to set up a temporary host server that is running Windows Server 2012 R2 and then
live migrate the virtual machines to it instead.
There are two reasons why this approach might be a good option. First, Microsoft
allows you to make a seamless transition between Windows Server 2012 Hyper-V
and Windows Server 2012 R2 Hyper-V. You can move the virtual machines to the
new platform simply by live migrating them. You don’t have to deal with the hassles
of the import/export process as you did in the past.
The second reason why this method might be attractive is because the temporary
host can provide extra capacity so that your production host servers do not have to
bear the burden of hosting extra VMs while you are upgrading Hyper-V.
Step 2: Addressing the VMs
After the virtual machines finish live migrating, there is a bit of work that will
probably need to be done. In all likelihood, the virtual machines will be running an
outdated version of the Hyper-V Integration Services since the virtual machines
were previously running on an older version of Hyper-V.
In case you are not familiar with the Integration Services, they are simply a collection
of drivers that allow the virtual machines to fully interact with the server hardware.
The Hyper-V Integration Services are very similar to the VMware Tools.
To upgrade the Integration Services, log into the virtual machine and then choose
the Insert Integration Services Setup Disk from the virtual machine’s Action menu,
as shown in Figure 1. Hyper-V should now perform a quick check to see if the
Integration Services need to be updated. If so, you will see a message similar to the
one shown in Figure 2, and you can follow the prompts to update the Integration
Services. The virtual machine will need to be rebooted once the Integration Services
have been updated.
Just because you are updating the hypervisor and the Integration Services does not
mean that you have to perform an OS upgrade on the individual virtual machines.
It is worth noting however, that if you are deploying Windows Server 2012 R2
Datacenter Edition as the host OS, then the license allows you to run Windows
200 Wheeler Road, Burlington, MA 01803
How To Upgrade Hyper-V to Windows Server 2012 R2
PART # WP-2023-ENG-A
www.unitrends.com
9
Microsoft allows you to
make a seamless transition
between Windows Server
2012 Hyper-V and Windows
Server 2012 R2 Hyper-V.
Server 2012 R2 on as many virtual machines as you like, so long as the virtual
machines are running on the host server.
Step 3: The Server Upgrade
The last step in the process is to upgrade the server operating system on the
Hyper-V host. This is actually a really simple process. Once all of the virtual machines
have been moved off of the host server, you can perform an in place upgrade. All
you have to do is to insert your Windows Server 2012 R2 installation media, run
Setup and follow the prompts.
After the upgrade process completes, you should reboot your server. After taking
some time to make sure that everything is functioning properly, you can live migrate
the virtual machines back to the host.
Once all of the virtual
machines have been moved
off of the host server, you
can perform an in place
upgrade.
Figure 1. Choose the Insert Integration Services Setup Disk command from the Action menu.
Figure 2. You will see a message like this one if the Integration Services need to be updated.
200 Wheeler Road, Burlington, MA 01803
How To Upgrade Hyper-V to Windows Server 2012 R2
PART # WP-2023-ENG-A
www.unitrends.com
10
About the Author
Brien Posey is a seven time Microsoft MVP with over two decades of IT experience.
As a freelance writer, Posey has written many thousands of articles and written or
contributed to several dozen books on a wide variety of IT topics. Prior to going
freelance, Posey was a CIO for a national chain of hospitals and healthcare facilities.
He has also served as a network administrator for some of the country’s largest
insurance companies and for the Department of Defense at Fort Knox. When He
isn’t busy writing, Brien Posey enjoys exotic travel, scuba diving, and racing his
Cigarette boat. You can visit his personal Web site at: www.brienposey.com.
200 Wheeler Road, Burlington, MA 01803
How To Upgrade Hyper-V to Windows Server 2012 R2
PART # WP-2023-ENG-A
www.unitrends.com
White Paper
How To Work with
Hyper-V Checkpoints
Here’s a quick breakdown on how to roll back to an earlier Windows
Server 2012 R2 Hyper-V checkpoint.
By Brien Posey
www.unitrends.com
12
Checkpoints are a feature
of Windows Server 2012 R2
Hyper-V that allow you to
roll a virtual machine back
to a previous state.
Occasionally you may need to perform administrative actions that are potentially
dangerous (such as a registry modification or an Active Directory schema extension).
In these types of situations, you can give yourself a bit of a safety net by using
Hyper-V checkpoints. Checkpoints are a feature of Windows Server 2012 R2 Hyper-V
that allow you to roll a virtual machine back to a previous state.
Creating a checkpoint is a very simple process. Before you perform the potentially
dangerous administrative action, right click on the virtual machine and choose the
Checkpoint command from the shortcut menu, as shown in Figure 1, page 7.
Figure 1. Right click on the virtual machine and choose the Checkpoint command from the shortcut
menu.
When Hyper-V finishes creating the checkpoint the checkpoint will appear in the list
of checkpoints beneath the virtual machine, as shown in Figure 2.
Figure 2. The checkpoint has been created.
200 Wheeler Road, Burlington, MA 01803
How To Work with Hyper-V Checkpoints
PART # WP-2022-ENG-A
www.unitrends.com
13
Once the checkpoint
has been created, you
can perform whatever
administrative action you
needed to do.
Figure 3. Right click on the Checkpoint and choose the Delete Checkpoint command from the shortcut
menu.
Once the checkpoint has been created, you can perform whatever administrative
action you needed to do. If the administrative action is successful, you should
delete the checkpoint upon completion. Checkpoints degrade read performance for
the virtual machine, so you don’t want to leave unnecessary checkpoints in place.
You can get rid of an unwanted checkpoint by right clicking on the checkpoint and
choosing the Delete Checkpoint command from the shortcut menu, as shown in
Figure 3. If you have an entire series of checkpoints that you need to remove, you
can save time by using the Delete Checkpoint Subtree command instead.
If on the other hand, something goes horribly wrong and you need to revert the
virtual machine to a previous state then you can right click on the checkpoint and
choose the Apply command from the shortcut menu. When you do, Windows
will offer you the opportunity to create another checkpoint before applying the
checkpoint. That way you can “undo” the application of the checkpoint if necessary. I
recommend shutting down the virtual machine prior to applying a checkpoint.
As you can see, it is very easy to create and use Hyper-V checkpoints. Even
so, checkpoints are not appropriate for every situation and it is important to
understand the implications of using a checkpoint before doing so.
The first thing that you need to understand is that a checkpoint is different from
a backup. When you create a checkpoint, what you are really doing is creating a
differencing disk and flagging the virtual machine’s original virtual hard disk as
read only. This means that you are not creating a copy of the virtual hard disk,
and checkpoints therefore do not protect you against hard disk failures or storage
corruption.
Another thing that you need to understand is that checkpoints are sometimes
affected by other servers on your network. Suppose for a moment that you created
200 Wheeler Road, Burlington, MA 01803
How To Work with Hyper-V Checkpoints
PART # WP-2022-ENG-A
www.unitrends.com
14
Checkpoints are sometimes
affected by other servers
on your network.
a checkpoint of a virtualized domain controller before applying a schema extension.
Now, imagine that the schema extension was done incorrectly and you need to
revert the Active Directory to its previous state.
You could apply the checkpoint, but doing so will only give you the desired results if
the checkpoint resides on the only domain controller in the entire domain. If there
are other domain controllers in the domain then the Active Directory Replication
Service will become an issue. After you apply the checkpoint, the other domain
controllers will see the recently reverted domain controller as being outdated. The
Active Directory Replication Service will seek to bring that domain controller up
to date by replicating all of the Active Directory modifications that have occurred
since the time that the checkpoint was created. This includes the unwanted schema
extensions. That being the case, you are better off using a traditional backup
for your domain controllers (rather than relying on checkpoints) and using an
authoritative restoration if necessary.
Similarly, you must not use checkpoints for virtual machines that are running
applications that maintain state data in memory (such as Exchange Server).
Checkpoints do not capture memory contents and applying a checkpoint of such a
virtual machine will typically result in data loss or application corruption. If you need
to create checkpoints of these types of virtual machines, the only way to do so safely
is to create the checkpoint while the virtual machine is shut down.
As you can see, checkpoints can be a handy feature, but they can also cause
problems unless you fully understand the implications of using them.
About the Author
Brien Posey is a seven time Microsoft MVP with over two decades of IT experience.
As a freelance writer, Posey has written many thousands of articles and written or
contributed to several dozen books on a wide variety of IT topics. Prior to going
freelance, Posey was a CIO for a national chain of hospitals and healthcare facilities.
He has also served as a network administrator for some of the country’s largest
insurance companies and for the Department of Defense at Fort Knox. When He
isn’t busy writing, Brien Posey enjoys exotic travel, scuba diving, and racing his
Cigarette boat. You can visit his personal Web site at: www.brienposey.com.
200 Wheeler Road, Burlington, MA 01803
How To Work with Hyper-V Checkpoints
PART # WP-2022-ENG-A
www.unitrends.com
White Paper
Hyper-V Private vs. Internal
Virtual Switches:
Which to Choose?
Here’s how to choose the right switch type for your environment.
By Rick Vanover
www.unitrends.com
16
If you have ever had to create a virtual switch for Hyper-V that is not an external
switch, you may have had to stop and think about it. Do you want to go Private or do
you want to go Internal? Let’s summarize the differences here so you know the pros
and cons of each type, and if you ever need to do anything more; that you don’t lock
yourself in too much. This section of the new virtual switch wizard can cause some
guesswork, as well as some misconfigurations, shown below:
By way of definition,
the Hyper-V Private
switch allows VMs to
communicate to each other
ONLY when they are on the
same host.
Figure 1. Internal or Private, that is the question!
By way of definition, the Hyper-V Private switch allows VMs to communicate to
each other ONLY when they are on the same host. The Private virtual switch cannot
communicate to any network outside of the host either. If you select a Private
virtual switch, it still allows you to give it a name; I wish it would just call it “Private
Virtual Switch for (Computername)” — or maybe “Private Virtual Switch 1 for
(Computername)”. If I add a name to the switch, I run the risk of getting confused
later on, so that request is somewhat self-serving. My own forgetfulness aside, it is
important to note the Private virtual switch can communicate to other VMs on one
host only. They can’t connect to any outside network unless the VM(s) in question
are connected to additional virtual switches (such as one Private and one external).
A host can have multiple Private switches and the same Private switch name can
exist on multiple hosts, not to confuse you or anything.
The Hyper-V Internal switch is a bit different in that the VMs on the switch can
communicate to each other, but additionally can communicate to the Hyper-V host
200 Wheeler Road, Burlington, MA 01803
Hyper-V Private vs. Internal Virtual Switches: Which to Choose?
PART # WP-2024-ENG-A
www.unitrends.com
17
itself. This can commonly be used as a file exchange mechanism. The internal switch
for the most part functions the same as the Private switch, with the added ability to
communicate directly to the Hyper-V host.
It is important to note that both the Internal and Private switch types are not bound
to a physical network interface. As such, there is “authoritative” network addressing
scheme that is set by the host. In the case of the Private virtual switch, the host has
no real concern what happens on the virtual switch. This means that the networking
(IP addressing) needs to be set by the VMs on the Private network.
The Internal network is slightly different however. Because there is communication
with the Hyper-V host, a network interface is added to the host. I added an Internal
network called “TEST-InternalPrivate- Network” to a Windows Server 2012 Hyper-V
host. Once that that step was completed, you can see a new interface is added to
the host below:
It is important to note
that both the Internal and
Private switch types are
not bound to aphysical
network interface.
Figure 2. Each internal virtual switch would create it’s own host interface; and networking
If you need isolated VM
connectivity, the Internal
switch type has slightly
more flexibility.
Note that with the Internal virtual switch, that interface has its own IP and DNS
configuration.
So back to the question, which one should I use? Well, if you need isolated VM
connectivity, the Internal switch type has slightly more flexibility. But you run the
risk of networking going awry. I’m a purist in the sense that I want host networking
rock solid. I’m slightly worried of having an Internal Private switch and then the
associated host networking go awry (Or event DNS/default gateway) then all
management traffic may not function as expected. See the concern here?
If you need a recommendation, I’d point you down the Private virtual switch route;
and if you need limited interaction use .ISO file mounts or an additional VM with
multiple network interfaces (including one on an external switch).
How do you do isolated networking with the hosts? Private, external, or neither?
Share your comments below.
200 Wheeler Road, Burlington, MA 01803
Hyper-V Private vs. Internal Virtual Switches: Which to Choose?
PART # WP-2024-ENG-A
www.unitrends.com
18
About the Author
Rick Vanover (vExpert, VCP, MCITP) is a product strategy specialist for Veeam
Software based in Columbus, Ohio. Rick is a popular blogger, podcaster and active
member of the virtualization community. Rick’s IT experience includes system
administration and IT management; with virtualization being the central theme of
his career recently. Follow Rick on Twitter @RickVanover.
About Unitrends
Unitrends delivers award-winning business recovery solutions for any IT
environment. The company’s portfolio of virtual, physical and cloud solutions provides adaptive protection for organizations globally. To address
the complexities facing today’s modern data center, Unitrends delivers
end-to-end protection and instant recovery of all virtual and physical assets as well as automated disaster recovery testing built for virtualization.
With the industry’s lowest total cost of ownership, Unitrends’ offerings
are backed by a customer support team that consistently achieves a 98
percent satisfaction rating. Visit www.unitrends.com.
Live Demo:
Watch us crash a server
and recover it.
unitrends.com/demo
Hyper-V Private vs. Internal Virtual Switches: Which to Choose?
PART # WP-2024-ENG-A
www.unitrends.com
200 Wheeler Road, Burlington, MA 01803