Creating a Windows Server that runs Hyper-V

Before you can start building virtual machines to use in your environment, first you need a virtualization host server on which Hyper-V will run. The first consideration to take into account is hardware. The hardware requirements for a server running Hyper-V depend on how many virtual servers you plan to run on top of this host platform. For example, the server that I am using for the lab environment shown throughout this book is an Intel i3 processor with only 8 GB of RAM. This is not at all conducive to a successful Hyper-V environment. I can only turn on four or five VMs at a time, each of them with very minimal amounts of memory per virtual machine. They all run quite slowly. Multiple Xeon processors with 100 GB of RAM or more will become criteria if you intend to run dozens of servers within your virtualized environment. Or perhaps you can meet somewhere in the middle of those numbers if you are running between one and 10 servers. There's not really a right answer here. Just make sure you have enough RAM to assign each VM the amount that it needs, plus an amount dedicated to the host operating system so that it continues to perform properly. Hard drive space is also a good consideration because you need to make sure you have enough physical storage for all of those servers that you plan to spin up.

Once you have decided on the hardware, your next decision is which version of Windows Server 2016 to install on it. If you have run through the installer, you will know that you have options for Server 2016 Standard and Server 2016 Datacenter. One of the most important notes I can give you regarding this topic is that the Standard SKU of Windows Server only allows you to run two virtual machines! If this is not enough to meet your needs, you had better go ahead and install Windows Server 2016 Datacenter. Sneak peek: make sure you check out the next recipe in this chapter for a third option. Spoiler alert: it's much less expensive than the Datacenter SKU!

Getting ready

I have a piece of server hardware upon which I have installed Windows Server 2016 Datacenter edition. This will enable me to spin up an unlimited number of virtual machines from a licensing perspective. Keep in mind that each virtual machine you create that is running Windows Server will also require a server key; there are no freebies here with operating system licenses.

How to do it…

I have already installed Windows Server 2016 Datacenter onto my hardware. I have two NICs on this server, because Hyper-V prefers to have one NIC dedicated to host operating system communications. The second NIC can be used as a bridge between the virtual machines and my physical network. Follow these steps to install the Hyper-V role:

  1. Open Server Manager and click on the link for Add roles and features. Click Next until you see the Select server roles screen. Here you simply choose the check-box for Hyper-V.
  2. Alternatively, and this can be extremely useful if your Hyper-V server is running Server Core, the following PowerShell cmdlet will install the Hyper-V role and its management features:
          Add-WindowsFeature Hyper-V, RSAT-Hyper-V-Tools, Hyper-V-Tools,
          Hyper-V-
          PowerShell

    How to do it…

  3. Following installation of the role, you must reboot the server. Once it is back online, head into Server Manager and launch Hyper-V Manager for the first time from the Tools menu.
  4. The following screenshot gives you a glance into Hyper-V Manager. This is the tool you will most often utilize to interact with the virtual machines that you run on this virtualization host server. As we will discuss in upcoming recipes, there are a variety of ways that you can interact with a server running Hyper-V, and even a number of different ways that you can run the Hyper-V Manager console.

    How to do it…

How it works…

Implementing the Hyper-V role onto your new Windows Server 2016 is the first step toward virtualizing your infrastructure. You need to plan for hardware needs carefully, making sure you have wiggle room in case you end up with more servers or bigger servers than you originally planned. Now that our Hyper-V virtualization host is online, has the role installed, and has gone through its initial configuration, it is time to really start making use of the Hyper-V Manager console.

An important item to point out relating to the Hyper-V role installation is that we now have the ability to install the Hyper-V role onto a virtual machine! This is known in the industry as Nested Virtualization. Your virtual servers can host other virtual servers. What is the point of that? This is primarily because of some new functionality in Server 2016 relating to containers, and also for Nano server, but it is an interesting point to spend some time thinking about as you decide on the best way to build out your virtual server environment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.209.235