1. A computer-implemented method comprising: setting, in an execution environment of a computer system, a first environment variable that specifies a custom agent to be executed in the execution environment; intercepting, by a custom create VM function, a request by the system to create a virtual machine using a default create VM function; removing, by the custom create VM function, the first environment variable from the execution environment; and executing, by the custom create VM function, the default create VM function to invoke a VM having the custom agent without the execution environment having the first environment variable being set.