Lastly, we have migrating IIS and Hyper‑V Workloads to Windows
Server 2022. First let's take up the issue of our IIS websites.
Now, understand in this module, I'm not concerned with rehosting
an IIS web application to Azure.
Instead, we have say, a brand spanking new server running
Windows Server 2022, and we want to move an existing IIS
website from an older server to it.
What Microsoft recommends here, and this is your exam alert, is to do
a synchronization using the Web Deployment Tool,
the msdeploy.exe, which you can install on your source and destination
servers. And when you run msdeploy from the command prompt,
there's a number of verbs that you can choose here. It's really cool, and
actually, this msdeploy tool can be helpful in Azure as well.
For example,
if you're interested in setting up a web front end for your
application and you've got X number of virtual machines,
they will definitely need their site content and IIS synchronized.
Well, scripting this out to perform regular, bidirectional syncs can be
a very handy tool to have in your tool belt.
The downside is that it is, in fact, a compiled executable, so you
don't have the standardized syntax that we have with PowerShell. So
here we can see we're using msdeploy with the sync verb, just simply
specifying the friendly website name and IIS Manager on the source and
destination computers.
And here, we're using the redirection operator, that greater than symbol, to
create a log file so we can see the results. Simple as that.
Likewise,
a relatively simple process is migrating Hyper‑V to Windows Server 2022.
Now, the slide says hosts. It's not so much the host you're
concerned with, I mean you're going to install the Hyper‑V role
on your Windows Server 2022 machine,
you're concerned about the VMs. And here, the recommendation from Microsoft if
you're not using failover clustering is to live migrate those VMs outside of
failover clustering. And to simulate live migration,
you've got the Hyper‑V PowerShell command Move‑V1, where we're
just specifying the logical label name of the VM,
the destination Hyper‑V host, that you do want to include storage, and
then, where do you want to store the VHD and configuration? Let's get into our second and last demo.