VMware vSphere: Yet Another Reason to use Templates to Deploy VMs

In the past, we noticed that VMs in Kingston's IT environment sometimes have Memory Limits set. Since we have now decided that there is no practical application for limits as discussed in our previous whitepaper, we have mandated that Memory Limits never be used. Nevertheless, Memory Limits still appeared in our daily reports, baffling us until we finally discovered the root cause — cloning powered on VMs.

There are multiple ways to deploy VMs in a vSphere 4.1 environment. The approach of deploying VMs through templates is considered the best practice. Another method, cloning VMs, is also common. In some instances, cloning appears to be the better option, especially when the VM to be deployed is constantly updated (with windows and/or AV patches, etc).

Cloning Powered-On VMs Can Add Memory Limit

Cloning VMs has similar results as deploying through a template, but we have noticed an interesting side effect when cloning VMs that are turned on — if no memory limit is set on the VM to be cloned, a memory limit is set on the new VM, equivalent to the memory allocated to the VM. Further exploration shows that cloning VMs that are powered-on does not give any sort of benefit as opposed to cloning a powered-off VM, as the powered-on state is not saved, the new VM effectively reboots.

In short, cloning VMs is still effective when deploying from a VM that requires constant updating but one needs to ensure that cloning is done when the cloned VM is in the powered-off state.

What You Can Do to Identify & Address VMs with Memory Limits

If you have been cloning VMs and are unsure if you have been affected by this behavior, a good resource to utilize is Alan Renouf's Reservations / Limits and Shares script. In the case where memory contention is not an issue in your environment, you can go ahead and set all memory limits to 0 using Alan's script here.

Author: Edward Shen - Kingston Technology

Per informazioni su come COVID-19 ha influenzato le nostre attività aziendali fare clic qui.

Contattateci. Effettuate la sottoscrizione alle nostre email per ricevere tutte le news su Kingston e tanto altro.