VMware Host Groups, VM Groups and Rules

VMware

The Microsoft licensing agreements are made based on the number of processor cores (or sockets) that are in use by the physical or virtual hosts that make use of Microsoft software. The Microsoft licensing allows for a VMware ESXi host’s CPUs (or cores) to be licensed instead of the vCPU (virtual CPUs) of each virtual machine; in practice this means you licence the VMware ESXi host’s CPUs or cores, then that licences you to run a number of virtual machines on that host that are using Microsoft software, such as Microsoft Windows or Microsoft SQL.

You can achieve this using VMware VM Groups, Host Groups and (cluster) Rules.

Once you have created the virtual machine (VM), to ensure licence compliance you must add the VM to a VMware group that enforces that the VM can only run on the designated host within that cluster. Essentially there are three components at play here,

  • Microsoft SQL Server VM Group – Contains a list of the VMs that run Microsoft SQL and therefore need to have their placement controlled.
  • Microsoft SQL Server Host Group – Contains a list of the VMware ESXi hosts that are licensed to run Microsoft SQL server, this may be one hosts within the VMware cluster or it may be more, depending on the available licensing.
  • Microsoft SQL Server VM-Host Rule – Contains a rule that says: “Virtual Machines that are members of the VM Group should run on hosts that are members of the Host Group”, ergo VMs should run on this host unless it is not available in which case they can run on another host (in a DR or maintenance situation).

You create a VM Group (and add the relevant VMs), then you create a Host Group (and add the relevant host(s)) you finally stick these two groups together with the Rule that says that the VMs in VM Group should run on the host(s) specified in Host Group.

The “Must” and “Should” are important here, essentially it boils down to what happens if your desired host has failed and VMware HA kicks in to move the VMs to a surviving host in the cluster, depending on if you choose Must or Should, you VMs may not restart on a surviving host.

  • Must run on hosts in group
    • The VM Group must run on the hosts in this group. If the host(s) specified in the Host Group are down the VMs will be down and won’t restart on a surviving host in the cluster.
    • If your applications with special license agreements, you might have to use this option to ensure compliance.
  • Should run on hosts in group
    • The VM Group should run on the hosts in the group. But in this case, if the host(s) specified in the Host Group were to fail, VMware HA (High Availability) will ignore this rule and restart on a surviving host to keep the VMs running.
  • Must Not run on hosts in group
    • The VM Group will not run on the specific hosts group. Means the VMs will never ever run on the hosts specified in the Host Group. In a failure situation, the VMs will be down rather than be moved to host(s) specified in the Host Group.
  • Should Not run on hosts in group
    • The VM Group should not run on the hosts in the group. But in this case, if the host(s) running the VMs was to fail, VMware HA (High Availability) will ignore this rule (that includes hosts that should not be used) and restart on a surviving host (even if its in the Host Group) to keep the VMs running.

Leave a Reply

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