Windows Server 2019 – Managing a virtual server

How to Install MySQL 8.0 on Ubuntu 18.04

We have made use of Hyper-V Manager in order 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 discussing 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 quick status on 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 are able to right-click on the words Hyper-V Manager near the top-left corner of the screen, and select an option that says Connect to Server…. By using this function, you can pull information from other Hyper-V Servers into this same Hyper-V Manager console:

Furthermore, this enables you to run Hyper-V Manager software on a client computer. You can install the Hyper-V role onto a Windows 10 machine, which will also install this console, and then use that local copy of Hyper-V Manager running on your Window 10 desktop in order to manage your Hyper-V Servers, without needing to log in to those servers directly.

Some of the most useful actions inside Hyper-V Manager are listed along the right side of the console in the Actions pane, features such as  Virtual Switch Manager and the ability to create a new VM. Once you have VMs up and running, you will find a lot of useful functions listed inside the context menu that appears when you right-click on a VM, as you can see in the following screenshot:

Some of these are self-explanatory, and some are worth playing around with. We have already used Connect… to connect to our VM’s console. Settings… opens up a ton of possibilities, and we will take a look further inside the Settings menu immediately following this text. One of the most common reasons I open up this right-click menu is for power functions on my VMs. You can see that you have the ability to Turn Off… or Shut Down… your VM. Turning it off is like pressing the power button on a server: it cuts off power immediately to that server and will cause Windows some grief when doing so. The shutdown function, on the other hand, initiates a clean shutdown, at least when you are using Microsoft operating systems on the VMs. Shutting down a server is no big deal, but the real power here comes from the fact that you can shut down multiple VMs at the same time. For example, if I were running a dozen different VMs all for my test labs, and I decided that my lab was taking up too many resources and causing problems on my Hyper-V Server, I could select all of my VMs at the same time, right-click on them, then click on Shut Down… just once, and it would immediately kick off the shutdown process on all of the VMs that I had selected. Once a VM is shut down or turned off, right-clicking on that VM will give you a Start function; you can also select many servers and start them all at once by using this right-click menu.

The Settings menu

Making in-depth modifications to any of your VMs typically means right-clicking on that VM, and then navigating to Settings… for that particular VM. Inside settings, you can adjust any aspect of your VM’s hardware, which is the most common reason to visit this screen. Immediately upon opening the settings, you have the option to Add Hardware to your VM. This is the place you would go in order to add more hard drive controllers or NICs to your virtual server:

I don’t know if you can tell from the preceding screenshot, but the Add button is currently grayed out. This is important. Many functions inside settings can be manipulated on-the-fly, while the VM is running. Some functions cannot be accomplished unless the VM is turned off. Adding hardware is one of those functions. If you want to add a new hard drive or NIC to your VM, you will need to shut down that server before you are able to do it.

Next, we should talk about the Memory screen. This one is fairly simple, right? Just input the amount of RAM that you want this VM to have available. The reason that I want to point it out is that a major improvement has been made in this functionality. Starting with Windows Server 2016 Hyper-V, you can now adjust the amount of RAM that a VM has while it is running! In the previous versions of Hyper-V, you were required to shut down the VMs in order to change their memory allocation, but even though my WEB3 server is currently running and servicing users, I can pop in here and increase RAM at will.

Let’s say my 2 GB isn’t keeping up with the task load, and I want to increase it to 4 GB. I leave the server running, open up the  Hyper-V Manager settings for the VM, and adjust the relevant setting to 4,096 MB:

The amount of memory immediately adjusts, and if I open up system properties inside the WEB3 server, I can see that the operating system has updated to reflect the 4 GB of RAM now installed:

The other useful settings screens are the Processor and Network Adapter sections. You have the ability to define the number of virtual processors currently assigned to the VM, and performance weights associated with these processors. In the Network Adapter screen, you can change which virtual switch your virtual NICs are plugged into. I find myself accessing this section often as I move servers from one location to another.


The last part of the Settings menu that I want to discuss is called checkpoints. These were formerly called snapshots, which I think makes a little more sense to most of us. Checkpoints are a function that you can invoke from Hyper-V Manager by right-clicking on one or more VMs. It essentially creates a snapshot in time for the VM. Another way to look at checkpoints is that they are creating rollback points for your servers. If you create a checkpoint on Tuesday, and on Wednesday somebody makes a configuration change on that server that causes problems, you can restore the checkpoint from Tuesday and bring the VM back to that day’s status.

There are a couple of different ways that checkpoints can be run, and the Settings menu is where we define those particulars. Simply right-click on any VM, visit the Settings screen, and then click on the management task called Checkpoints. You can see the options in the following screenshot:

These settings are individual for each VM you are running; you could treat checkpoints for WEB1 differently than WEB2, for example. The default way to handle these snapshots in time is called Production checkpoints. This is generally the preferred method for creating these quick images of your servers, as it is the cleanest method. When choosing to generate a production checkpoint, Hyper-V invokes Windows backup functions inside the VM’s own operating system, in order to create a backup of that server. This would be similar to you logging into that VM and manually launching an operating system backup task. Keep in mind that, when you do this, and therefore when Hyper-V does this for you, it is not a block-by-block identical backup of the VM as it is running at this point in time, but rather a backup file that can then be restored in the future to bring the operating system files back to this point in time. In other words, a production checkpoint brings Windows back to the previous status, but any applications and data that are constantly changing on the server are not captured.

Alternatively, the Standard checkpoints option does just that. This takes more of a quick-and-dirty capture of the VM, kind of like just right-clicking on the VHDX hard drive file and choosing to copy and then paste it somewhere else. Restoring standard checkpoints can be a messier process, because if your checkpoint was created while an application on the server was in the middle of an important function, the restore would bring it right back to that application being in the middle of the same important function. For something such as a database write, that could get complicated.

Once you have made the decision on which kind of checkpoint is best for your VM, invoking checkpoints is very simple. Back at the main screen in Hyper-V Manager, simply right-click on your VM and select Checkpoint. After performing this task, you will see the middle pane of Hyper-V Manager receive some new information in a section you may not have even noticed earlier: Checkpoints.

The new checkpoint that we just created is now sitting here, waiting to be restored if the need arises. In the future, right-clicking on this checkpoint and choosing Apply… will initiate the restoration process:

Hyper-V Console, Remote Desktop Protocol (RDP), or PowerShell

While hardware adjustments to VMs need to be made through Hyper-V Manager, your daily interaction with these VMs running as servers in your environment does not necessarily mean you have to log in to your Hyper-V Server. If you happen to be inside Hyper-V Manager anyway, you can quickly and easily use that Connect function to interact with the console of your servers, through the use of the Hyper-V Console tool. Accessing your servers this way is beneficial if you need to see something in BIOS, or otherwise outside of Windows operating system that is running on that VM, but it’s not often that you require this level of console access.

When you have Windows Servers running as VMs, it is much more common to interact with these servers in the same ways that you would interact with physical servers on your network. While I have been accessing my WEB3 server through the Hyper-V Console in this chapter, now that I have Windows Server 2019 installed onto WEB3 and I have enabled the RDP capabilities on it, there is no reason why I couldn’t just pop open MSTSC and log into WEB3 that way, straight from my desktop:

The same is true for PowerShell or any other traditional way of remotely accessing services on any other server. Since this VM is fully online and has the server operating system installed, I can use PowerShell remoting to manipulate my WEB3 server as well, from another server or from my desktop computer. Once you are finished building out the hardware and installing the operating system on a VM, it’s rare that you actually need to use the Hyper-V Console in order to interact with that server. The primary reasons for opening up Hyper-V Manager to reach a VM are to make hardware-level changes on that server, such as adding a hard drive, adjusting RAM, or moving a network connection from one switch to another.

Windows Admin Center (WAC)

We have seen WAC scattered throughout this book, and for good reason. WAC is the brand new super-tool that Microsoft wants server administrators to start using in order to interact with and manage almost every single one of their servers. VM servers hosted in Hyper-V are no exception; you can make use of the WAC toolset in order to administer servers running on your Hyper-V hosts, and use WAC to manage the host servers themselves.

Comments are closed.