Reader small image

You're reading from  Mastering Windows Server 2022 - Fourth Edition

Product typeBook
Published inMay 2023
PublisherPackt
ISBN-139781837634507
Edition4th Edition
Right arrow
Author (1)
Jordan Krause
Jordan Krause
author image
Jordan Krause

Jordan Krause has been an IT professional for more than 20 years and has received 9 Microsoft MVP awards for his work with Microsoft server and networking technologies. One of the world's first experts on Microsoft DirectAccess, he has a passion for helping companies find the best ways to enable a remote workforce. Committed to continuous learning, Jordan holds certifications as an MCSE, MCSA, and MCITP Enterprise Administrator, and has authored numerous books on Microsoft technologies. Jordan lives in beautiful West Michigan (USA), but works daily with companies around the world.
Read more about Jordan Krause

Right arrow

Hyper-V

I’ve always been a country boy. Driving along dirt roads, working on cars, and hunting are all ways that I prefer to fill my free time. Traveling to cities always hits me with a bit of culture shock. All those skyscrapers and tall apartment buildings serve an important purpose though, and serve to fulfill my metaphor: if there isn’t enough land to grow outward, you have to build up. The vertical ascension of large cities is similar to what we have seen happening in our datacenters over the past decade. Cities need more and more space for people and businesses, just like we need to house more and more servers every year. Rather than horizontal expansion, with enormous server rooms filled with racks and racks of hardware, we are embracing the skyscraper mentality and virtualizing everything. We build considerably fewer servers but make them incredibly powerful. Then, on top of these supercomputers, we can run dozens, if not hundreds, of virtual servers. The technology...

Designing and implementing your Hyper-V Server

Creating your own Hyper-V Server is usually pretty simple: build a server, install an operating system, install the Hyper-V role, and you’re ready to get started. In fact, you can even install the Hyper-V role on a Windows 10 or 11 Pro or Enterprise computer, if you need to run some VMs from your own desktop. While most hardware that is created these days fully supports the idea of being a hypervisor provider, some of you may try installing the Hyper-V role only to end up with the following error message:

Graphical user interface, text, application, email  Description automatically generated

Figure 14.1: Hyper-V compatibility error

Uh oh, that’s not good. This means one of two things: either my CPU really doesn’t support virtualization, or I simply have some settings turned off inside the BIOS on my server that prevent this from working. There are three considerations you should check on your server to make sure it is ready to run Hyper-V. First, you need to be running an x64-based processor...

Virtual switches

Upon completion of the Hyper-V role installation, your first inclination may be to jump right in and start creating VMs, but you should take a minute to make sure that the networking capabilities of your Hyper-V Server are adequate to meet your needs. During the role-installation process, we selected the physical NICs that are to be passed through into Hyper-V, and that screen told us it was going to establish a virtual switch for each of these NICs. But what does that look like inside the console? And what options do we have for establishing networking between our virtual machines?

To answer these questions, we need to open up the management interface for Hyper-V. As with any administrative tool of a Windows role, check inside the Tools menu of Server Manager, and now that the role has been installed, you will see a new listing for Hyper-V Manager. Launch that, and we are now looking at the primary platform from which you will be managing and manipulating every...

Implementing a new virtual server

Now we are ready to spin up our first virtual server! Similar to creating new virtual switches, the process for creating a new VM is fairly straightforward, but there are some steps along the way that might need some explanation if you haven’t been through this process before. We start with the same management interface from which we do everything in the Hyper-V world. Open up Hyper-V Manager and right-click on the name of your Hyper-V Server. Navigate to New | Virtual Machine... to launch the wizard:

Figure 14.10: Creating a new VM

The first screen where we need to make some decisions is Specify Name and Location. Create a name for your new VM, which is easy enough. Then you also have the chance to store your VM in a new location. If you set a good default location for your virtual machines during Hyper-V role installation, chances are that you won’t have to modify this field. But in my case, I chose the default options...

Managing a virtual server

We have made use of Hyper-V Manager to manage our virtual switches and to create a virtual machine. This tool is all-powerful when it comes to manipulating your VMs, and I find myself accessing it frequently in my daily job. Let’s take a look at a few of the other things you can do from inside Hyper-V Manager, as well as discuss other methods that can be used to work with the new virtual machines that are being created on your Hyper-V Server.

Hyper-V Manager

As you know, Hyper-V Manager is the primary tool for managing a Hyper-V Server. It is a nice console that gives you a status of your virtual machines and allows you to manage those VMs in a variety of ways. Something we did not cover – because I only have one Hyper-V Server running – is that you can manage multiple Hyper-V Servers from a single Hyper-V Manager console. Just like any MMC-style console in the Microsoft world, you can right-click on the words Hyper-V Manager...

Shielded VMs

If your day job doesn’t include work with Hyper-V, it’s possible that you have never heard of shielded VMs. The name does a pretty good job of explaining this technology at a basic level. If a VM is a virtual machine, then a shielded VM must be a virtual machine that is shielded or protected in some way, right?

A shielded VM is essentially a VM that is encrypted. Rather, the hard drive file itself (the VHDX) is encrypted, using BitLocker. It sounds simple, but there are some decent requirements for making this happen. For the BitLocker encryption to work properly, the VM is injected with a virtual Trusted Platform Module (TPM) chip. TPMs are quickly becoming commonplace at a hardware level, but actually using them is still a mysterious black box to many administrators. Shielded VMs can also be locked down so that they can only run on healthy and approved host servers, which is an amazing advantage to the security-conscious among us. This capability is...

Integrating with Linux

Many companies utilize Linux in some capacity or another. The use of Linux may actually be poised to make a grander entrance into the Windows Server world now that we have this higher level of integration possible inside Windows Server 2022. There are ways in which your Server 2022 can now be used to interact with Linux VMs:

  • Running in Hyper-V: VMs hosted on a Hyper-V Server used to be limited to Windows-based operating systems. This is no longer the case. The scope of the Hyper-V virtualization host has now been expanded to accommodate running Linux-based VMs in Hyper-V Manager. There is even good integration with the keyboard and mouse!
  • Linux-shielded VMs: You now know about running shielded VMs in Hyper-V, and you also know about running Linux-based VMs inside Hyper-V. Does this mean we can combine those two ideas and run a Linux VM that is also shielded? Why yes, we certainly can. This capability was introduced in SAC version Windows Server...

ReFS deduplication

While filesystems and deduplication features are technologies that you may not expect to be discussed when it comes to Hyper-V, the improvements in Server 2019 and 2022 related to ReFS and the deduplication of data carry some huge advantages for Hyper-V Servers. In case these are unfamiliar terms, let’s take a minute and define ReFS and deduplication.

ReFS

Anyone who has worked on computers for a while will recognize FAT, FAT32, and NTFS. These are filesystems that can be used when formatting hard drives. The different versions of filesystems translate into different capabilities of how you can utilize that hard drive. For a number of years, NTFS has been the de facto standard for all hard disks connected to Windows machines.

That is until Windows Server 2016 came along. We now have a new filesystem option called ReFS. Even if you work in an IT department every day, you may have never heard of ReFS because, so far, it isn’t getting used...

Hyper-V Server…2019?

It’s very easy to get excited about virtualization. Build some hardware, install Windows Server 2022, implement the Hyper-V role, and bam! You’re ready to start rolling out hundreds and hundreds of VMs in your environment... right?

Not necessarily. We haven’t talked about licensing yet, and too often our technological prowess is limited by licensing requirements. The same is true with Hyper-V. Every VM that you spin up needs to have its own operating system license, of course. That requirement makes sense. What isn’t as obvious, however, is the fact that you can only run a certain number of VMs on your Hyper-V Server, depending on what SKU you use for the host operating system itself.

The biggest gotcha is that using Windows Server 2022 Standard edition as your Hyper-V Server will result in the ability to run two VMs. Two! That’s it, no more. You will be able to launch a couple of virtual machines and will then...

Summary

I don’t have official numbers, but I will take a risk and say that today there are already more virtual servers running than physical servers to keep our world online. While the battle continues to rage about which hypervisor platform is the best—typically the argument is split between either Hyper-V or VMware—you cannot ignore the fact that virtualization is the way of the future.

Microsoft puts great quantities of time and resources into making sure that Hyper-V always stays ahead of the competition and introduces more and more features with every release so that you can keep your virtualized infrastructure up and running perfectly all the time. Is the capacity for cloud virtualization even more powerful than on-premise Hyper-V Server? I would say yes because the infrastructure that is in place at a cloud service provider is going to be the all-powerful Oz compared to what a single company can provide in its own datacenter. Does this mean you can...

Questions

  1. What are the three types of virtual switches inside Hyper-V?
  2. If you needed to build a virtual machine that booted using UEFI, which generation of VM would you need to create?
  3. True or False—In Windows Server 2022 Hyper-V, you must shut down a VM in order to change its allocated amount of memory (RAM).
  4. True or False—The only way to interact with a VM is through the Hyper-V console.
  5. What is the name of the technology inside Hyper-V that allows you to take snapshot images of virtual machines that can later be restored?
  6. When running shielded VMs in your environment, what is the name of the role that handles the attestation of your Hyper-V host servers?
  7. Which is the most comprehensive attestation method for shielded VMs—host key attestation, TPM trusted attestation, or admin trusted attestation?
  8. How many virtual machines can run on top of a Windows Server 2022 Standard edition host?

Join our...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Mastering Windows Server 2022 - Fourth Edition
Published in: May 2023Publisher: PacktISBN-13: 9781837634507
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Jordan Krause

Jordan Krause has been an IT professional for more than 20 years and has received 9 Microsoft MVP awards for his work with Microsoft server and networking technologies. One of the world's first experts on Microsoft DirectAccess, he has a passion for helping companies find the best ways to enable a remote workforce. Committed to continuous learning, Jordan holds certifications as an MCSE, MCSA, and MCITP Enterprise Administrator, and has authored numerous books on Microsoft technologies. Jordan lives in beautiful West Michigan (USA), but works daily with companies around the world.
Read more about Jordan Krause