Virtualization host maintenance: Defining servicing windows for your VMs

One of the pain-points long associated with virtualized environments is that, like any other type of server, a virtualization host must periodically be taken offline for maintenance. Thankfully, Microsoft makes it possible to perform maintenance in a relatively non-disruptive way so long as Hyper-V hosts are operating as a part of a failover cluster. Hosts within a cluster can be drained of their virtual machines (which failover to other hosts within the cluster), taken offline for maintenance, brought back online, and then repopulated with virtual machines.

Although this process does indeed allow IT pros to perform host-level maintenance without taking virtual machines offline, it does not mean that maintenance should be performed indiscriminately. After all, the process of draining a host before maintenance causes all of its VMs to be live-migrated to other hosts within the cluster. This means that those hosts will be required to endure a heavier than normal workload until the maintenance process is completed. While this might not be a problem in and of itself, it does mean that it’s best to avoid taking virtualization hosts offline for maintenance during hours of peak activity.

Scheduling virtualization host maintenance

Some organizations take a relatively informal approach to scheduling host maintenance. For instance, the IT staff might simply have a standing agreement that in the absence of extenuating circumstances, maintenance is only done on the weekends. Other organizations, however, use System Center Virtual Machine Manager to formally define maintenance schedules by creating servicing windows.

It is important to note that maintenance windows don’t have any enforcement power of their own. For example, VMM will not stop you from taking a Hyper-V host offline outside of its servicing window (this gives you the flexibility to deal with emergencies). What you can do, however, is to write PowerShell scripts that compare the current time against a host’s servicing window before performing any sort of action. I will show you how to do that in a separate article. For right now, I want to show you how to create a servicing window within System Center Virtual Machine Manager.

To create a servicing window, open the Virtual Machine Manager console and then go to the Settings workspace. From there, right-click on the Servicing Windows container and then choose the Create Servicing Window command from the resulting shortcut menu, as shown in the figure below.

virtualization host maintenance
At this point, the Virtual Machine Manager console will display the New Servicing Window dialog box. As you can see in the next figure, populating this dialog box is a relatively easy process. It consists of defining a start time for the servicing window and then specifying how long the servicing window should last. You also have the option of mapping the serving window to a specific time zone and setting up a recurrence frequency. For example, you might create a servicing window that occurs every weekday from 8 p.m. to 5 a.m.

virtualization host maintenance
This brings up an important point. You probably noticed in the image above that the dialog box includes fields used to assign a name and an optional description to the servicing window. The main reason these options exist is because Virtual Machine Manager gives you the ability to create multiple servicing windows.

There are any number of reasons why you might need to create multiple servicing windows. One of the most common reasons has to do with scheduling limitations. For instance, suppose you wanted to allow Hyper-V hosts to be serviced from 8 p.m. to 5 a.m. on weekdays and all day on Saturdays and Sundays. Because of the way that the New Servicing Window interface is designed, you would not be able to create such a schedule by using a single servicing window. What you could do, however, is to create two separate servicing schedules — one for weekdays and one for weekends.

Not all hosts are the same

Another reason why you might want to create multiple servicing windows is because you may have hosts with varying needs. For example, you might apply a particular servicing window to the hosts within a given cluster but use a different servicing window for the hosts in another cluster.

Once you have populated the New Servicing Window dialog box, click Finish to create the servicing window. When you do, the servicing window will be displayed within the Virtual Machine Manager console, as shown below.

virtualization host maintenance
Keep in mind that creating a new servicing window is really just the first step in the process. The other thing that you will have to do is to assign the servicing window to one or more host servers. Before I show you how to do that, there are three things you need to know.

  • First, as I alluded to a moment ago, you can apply multiple servicing windows to a single host.
  • Second, servicing windows are reusable. A single servicing window can be applied to multiple hosts.
  • Third, servicing windows can also be applied to individual virtual machines. This is especially useful if you have created guest clusters.

To apply a servicing window to a host, select the VMs and Services workspace, right-click on the host, and choose the Properties command from the shortcut menu. When the properties sheet appears, select the Servicing Windows tab, and then click the Manage button shown in the figure below.


Now, just select one or more servicing windows and then click the Add button, shown below. Click OK when you are done.

Servicing windows: Making virtualization host maintenance less disruptive

Servicing windows are a tool for making sure that virtualization host maintenance is performed at an appropriate time when hosts are not under an excessive load. Virtual Machine Manager makes it easy to define additional servicing windows or edit existing windows as your needs evolve.

Featured image: Shutterstock

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top