In this Tutorial we are going over the process to configure maintenance mode of a Hyper-V host using SCVMM 2012 R2.
Let’s define a scenario to show the feature, we have a Hyper-V cluster with 2 (two) nodes and they are being managed by SCVMM 2012 R2 and we need to perform an offline maintenance in one of the hosts. Our cluster is called LABHVCluster, and the hosts are itlabhv01 and itlabhv02 and we have 32 VMs running on top of this cluster, as shown in the figure below.
The server that we want to put in maintenance mode is itlabhv01, let’s click on the server on the left side and we will notice that we have only 6 (six) VMs running on it. Well, that means that our cluster is not balanced properly (by the way, that is going to be a topic for a future tutorial).
Managing the Maintenance for a host..
In order to put the server in maintenance mode, we need first to click on VMs and Services located on the bottom left corner of the console. Then, select the desired server and click on the Hosts tab, and the button Start Maintenance Mode will be displayed. The same button can be found if we right-click on the server listed on the left side.
A new wizard will be displayed where we can decide what we are going to do with the current VMs that are hosted in the server that is about to be put in maintenance mode. Basically we can take advantage of Live Migration feature and move all the machines to the remaining node or we can place all machines into saved state (not that good for production environments). Let’s leave the default setting which is Move all virtual machines to other hosts in the cluster and then click OK.
We can follow the process of live migration to the remaining node(s) by clicking on Jobs tab. After all VMs are moved successfully then the server will be put in maintenance mode and we can power it off and perform the maintenance required.
Maintenance mode in action…
We have just added the server into maintenance mode but let’s try the feature. A good test is to try creating a new VM and during the selection of the destination of the VM we won’t have a good rating (specially because we have only 2 nodes and one of them is down). However, we can click on the server that is in maintenance mode and we can notice that on the Rating Explanation the server is in maintenance mode and it is not included during the placement process.
Removing the server from maintenance mode…
In order to bring a server back to production, we just need to right-click on the desired server and then Stop Maintenance Mode and after that we can move VMs back and new machines may use that server.
In this Tutorial we went over the process to add a server in maintenance mode using System Center Virtual Machine Manager 2012 R2.