1. A method for generating a snapshot of a virtual machine, comprising: receiving a trigger to generate a snapshot of the virtual machine; in response to the trigger, transmitting a first command to lock an operating system being executed by the virtual machine; and transmitting a second command to create the snapshot of the virtual machine.