Upgrading Windows Server 2012 to Windows Server 2012 R2 on Hyper-V hosts

Introduction

I recently did a VMware to Hyper-V migration on two of our virtualization hosts. Everything has been working great, but now that Windows Server 2012 R2 is out I decided to give it a try. There are also cool new features in the new Hyper-V version, so why not upgrade. Here’s a link for 10 great new features in Windows Server 2012 R2 Hyper-V:

http://www.infoworld.com/slideshow/104337/10-great-new-features-in-windows-server-2012-r2-hyper-v-220067

For me, the most interesting features are VM Direct Connect and Copy / Paste between Host and VM via Shared Clipboard. Online VM exporting and cloning & Online VHDX resizing also seems like usable features.

 

 

Upgrade

Enough with the features, it’s time to upgrade! As usual I started out in a virtual test environment. The process was actually very easy and pain-free. Here are my steps:

 

· Inserted/mounted Server 2012 R2 media

· Chose upgrade

· Windows ran its own Windows Compatibility Report

· Told me to reboot

· I also received the following notification:

“Setup has detected one or more virtual machines which are part of a replication relationship. To avoid replication failures, upgrade the Replica server before upgrading the primary server. Once the Replica server is upgraded, any uncommitted failover operations will be committed, test failover virtual machines will be deleted, and the recovery history of the Replica virtual machines will be deleted. Setup has detected that one or more virtual drives are directly attached to physical devices. You might need to reconnect the virtual drives to these devices after the upgrade is complete”.

 

· I did a planned failover on one of the virtual machines on the replica server and then resumed the setup. Now every virtual machine had the same primary server.

· Upgraded the replica server. Upgrade went fine, no problems with virtual drives directly attached to physical devices. (Nothing to worry about, apparently it has to do with connected/mounted .iso to vm’s:

http://social.technet.microsoft.com/Forums/windowsserver/en-US/2d669709-f7d0-4bdc-974b-e0f5ab5552df/warning-compatibility-issue-during-upgrade-von-2008-r2-to-2012)

· One of the virtual machines had problems with replication (Fig 1) after the upgrade: 

 

clip_image002

 

Fig 1. Replication health

 

 

From event viewer:

 

Could not replicate changes for virtual machine ‘server 2012 r2’ as the Replica server ‘hyper1’ on port ‘443’ is not reachable. The operation timed out (0x00002EE2). (Virtual Machine ID 54519BBA-5127-4D5E-B9C3-D988BB6591F7)

 

Nothing critical, the server was just not able to replicate when the other server was down due to the upgrade. I reset the statistics and resumed replication. Everything went back to normal.

 

Now it was time to upgrade the other server, which basically follows the same concept. Just to test, I didn’t even shut down the virtual machines before the upgrade. The Server setup was smart enough to tell me to shut down the virtual machines before attempting an upgrade however. I was also told to restart the server before upgrading. I did both and resumed setup. As this server was the primary server and not the replica server, I could ignore the message about first upgrading the replica server (already done).

 

That’s it. It was really that simple 🙂

 

 

Production environment

The upgrade procedure in the production environment was obviously about the same as in the virtual test environment. Here are my steps:

 

· Shut down the virtual machines on the Hyper-V host

· Paused replication on both Hyper-V hosts. This way I didn’t have to worry about which server was primary and which was replica. (I didn’t find any information about this online so I just tested this theory. Worked great 🙂 )

· Ran the upgrade

· A bit of waiting (about 30 min in total, Fig 2)

 

clip_image004

 

Fig 2. Upgrading…

 

· Everything went fine on the first Hyper-V host

· …and also on the second 🙂

· Upgraded Hyper-V Integration Services in the virtual machines

· Resumed replication and did a reset on the replication statistics. Have some patience, replication will start automatically within a couple of minutes after this.

· Success, everything is back to normal except now I’m running Windows Server 2012 R2 instead of Windows Server 2012 (Fig 3) 🙂

 

clip_image006

 

Fig 3. Windows Server 2012 R2

 

 

Post installation tweaks

As this was an upgrade installation, Windows left its old installation in “Windows.old”. I’m only running the Hyper-V server role on these servers so I don’t need any of the old files as the servers are working just fine. To remove Windows.old, follow these steps:

 

· Enable Disk Cleanup Utility in Windows Server 2012 R2

· Run Disk Cleanup Utility and remove “Previous Windows Installations & Windows Upgrade log files”

· Done

 

Sources:

http://thenrml.wordpress.com/2013/06/26/remove-windows-old-after-using-in-place-upgrade-method-on-windows-server-2012-r2-preview/

http://blogs.technet.com/b/chad/archive/2012/10/08/tip-51-cleanup-on-isle-3-get-back-disk-cleanup-wizard-on-windows-server-2008-amp-2012.aspx

 

 

I also re-enabled ping (Echo request – ICMPv4) in the firewall as it was disabled by the upgrade.

 

 

Advertisements

2 thoughts on “Upgrading Windows Server 2012 to Windows Server 2012 R2 on Hyper-V hosts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s