Patent ID: 8225317

Claim:
A computer-implemented method for inserting an agent of a virtual appliance into a virtual machine, the method being performed by a computing system comprising at least one processor, the method comprising: inserting, into a first exception handler memory location of the virtual machine, one or more computer-executable instructions configured to facilitate transfer of control from the virtual machine to an agent-insertion module of the virtual appliance; triggering an exception during execution of the virtual machine to cause the one or more computer-executable instructions in the first exception handler memory location to be executed; obtaining control from the virtual machine after the one or more computer-executable instructions execute; inserting the agent of the virtual appliance into the virtual machine, wherein: the agent-insertion module of the virtual appliance performs the inserting the one or more computer-executable instructions configured to facilitate transfer of control from the virtual machine to the agent-insertion module of the virtual appliance, triggering the exception, obtaining the control, and inserting the agent; the virtual appliance comprises code that executes one or more common kernel components of a plurality of virtual machines; the plurality of virtual machines comprise the virtual machine; the agent of the virtual appliance is programmed to run within the virtual machine and perform one or more tasks on behalf of the virtual appliance; identifying an event that triggers invocation of the agent of the virtual appliance; inserting, into a second exception handler memory location of the virtual machine, one or more computer-executable instructions configured to transfer control of execution to the agent of the virtual appliance; triggering an exception during execution of the virtual machine to cause the one or more computer-executable instructions in the second exception handler memory location to execute such that execution is transferred to the agent of the virtual appliance and the agent of the virtual appliance executes, wherein an agent invocation module of the virtual appliance performs the identifying the event, the inserting the one or more computer-executable instructions configured to transfer control of execution to the agent of the virtual appliance, and the triggering the exception.