1. A method for updating software on virtual machines, the method comprising: determining, by a hardware processor, a first coefficient indicative of a level of importance of a continuous operation of one or more virtual machines created from a virtual machine template; determining a second coefficient indicative of a level of criticality of software updates on the one or more virtual machines created from the virtual machine template; determining a third coefficient as a function of the first coefficient and the second coefficient; when the third coefficient exceeds a threshold, updating the software on the virtual machine template to generate an updated virtual machine template; and determining whether the updated virtual machine template is suitable for being used for one or more virtual machines by detecting events causing an incorrect execution of at least one virtual machine during a period of operating a test virtual machine created from the up virtual machine template.