Hey Checkyourlogs Fans,

Today, we are going to have a look at the process of in-place upgrading a Windows 2012 R2 Hyper-V Host Server running production workloads to Windows Server 2019 Insiders Build 17744. We are also going setup Windows Admin Center to manage this environment once the upgrade is complete. This environment houses some Virtual Machines from my lab/production environment.

Important Note: You should always make sure you backup important files or VM’s before proceeding with an upgrade like this.

The first step to getting the upgrade rolling is to register for the Windows Insiders Program here: https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver?wa=wsignin1.0

Then download Windows Server LTSC Preview ISO.

Next Download the latest Windows Admin Center 1808

Here is a look at the existing Server’s disks

One important step that I do is always reset the local admin password to something I know. I have been caught in cases before when I need to login locally to fix something post upgrade and I forget what this password was.

Mount the ISO and launch Setup.exe

Whenever I upgrade, I always make sure to download updates, drivers, and optional features.

Note: Depending on the speed of your machine it can take a few minutes to download the updates and proceed to the next step.

Depending on the edition you can use either of the two following keys for Standard or Datacenter Edition.

Datacenter Edition 6XBNX-4JQGW-QX6QG-74P76-72V67

Standard Edition MFY9F-XBN2F-TYFMP-CCV49-RMYVH

I’m already running the full GUI version of Windows Server 2012 R2 so I will choose the Windows Server 2019 Standard (Desktop Experience) option and click next.

Make sure to read all the fine print….

We are going to do an upgrade so select Keep Personal files and apps and click Next

Apparently it isn’t a good idea to do an in-place upgrade of a Hyper-V Server to Windows Server 2019 with running VM’s. Who would have guessed that was a bad idea. Turning off VM’s now.

Ok it’s go time à Click Install and wait an hour for the upgrade to complete.

After about 40 minutes the upgraded seemed to complete successfully.

However, the network stack for Hyper-V was completely messed up. The upgrade changed my External Virtual Switch VSW03 to an Internal VSwitch. I noticed this because when the Server rebooted, it couldn’t log in to the domain.

I figured that the upgrade had messed up my Virtual Switch and associated Virtual Adapters for the Management OS and the Guest VM’s. Because this was a small Hyper-V Server, I decided to follow the steps below to remediate this issue quickly.

Step 1 – Check the Virtual Machine Adapter Settings

Get-VM | Get-VMNetworkAdapter

I could see the VM’s were attached to the correct Virtual Switch which should have been VSW03. However, because it was now set to a switch type of internal, I would have to create a new Virtual Switch and I figured it would be a good idea to make it an embedded switch.

To accomplish this I would have to tear out the existing network stack and re-create it on my Hyper-V Server.

Step 2 – Disconnect the Virtual Adapters from the VM’s.

Note: You cannot remove a VMSwitch from Hyper-V while Virtual Machines have their Virtual Adapters connected to it.

Get-VM | Get-VMNetworkAdapter | Disconnect-VMNetwokAdapter

Step 3 – Remove the Management Hyper-V Virtual Adapters and VMSwitch

Get-VMNetworkAdapter -ManagementOS

Get-VMNetworkAdapter -ManagementOS | Where-Object Name -notlike VSW03 | Remove-VmNetworkAdapter
Get-VMSwitch -name VSW03 | Remove-VMSwitch

Test network connectivity to ensure that the network can communicate.

Step 4 – Create a new VMSwitch with Embedded Teaming Enabled and add a new Management VMNetwork Adapter to the Host Parent Partition

#Create the new VMSwitch as VSW02 and add a Management Virtual Adapter
New-VMSwitch -Name VSW02 -EnableEmbeddedTeaming $True -AllowManagementOS $False -NetAdapterName Ethernet
Add-VMNetworkAdapter -Name MGMT -ManagementOS -SwitchName VSW02

Step 5 – Connect the new Virtual Switch back to the VM’s

Get-VM | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName VSW02
Get-VM | Get-VMnetworkAdapter
#Test Pinging one of the VM's

For the last step, I will update the Integration Services of the Virtual Machines.

Get-VM | Update-VM version -Force -Verbose

NOTE: The process of upgrading the Virtual Machine Version is not reversible. You must only do this once you are sure that you will stay on the newer version of Hyper-V.

And with that the in-place upgrade of my Production/Lab Hyper-V Server was complete.

I hope you enjoyed reading this and see you next time.