A method of antivirus checking of software objects in a virtual environment, comprising: monitoring, by an antivirus agent running on each of a plurality of virtual machines in the virtual environment executed by a processor, one or more events occurring in a virtual machine; determining, by the antivirus agent, an object related to the one or more monitored events and a type of the object; determining, by the antivirus agent and based on the type of the object, whether the object needs antivirus checking; sending, by the antivirus agent, to a control module in the virtual environment, information about the object that needs antivirus checking, the type of the object, and the one or more monitored events; determining, by the control module and based on the information received from the antivirus agent, one or more methods of antivirus checking to be performed on the object; selecting, by the control module, one or more components of an antivirus system in the virtual environment, in a security virtual machine, in an external component of the virtual environment, or in the antivirus agent in the virtual machine, to perform the one or more antivirus checking methods; determining, by the control module or the security virtual machine, priorities of execution of the one or more methods of antivirus checking; and distributing, by the control module, among the one or more selected components, the one or more antivirus checking methods to be performed on the object based on the priority; wherein the selecting includes deciding whether to select the antivirus agent on any other virtual machine of the plurality of virtual machines, wherein the other virtual machine is idle or has unused computing resources. monitoring, by an antivirus agent running on each of a plurality of virtual machines in the virtual environment executed by a processor, one or more events occurring in a virtual machine; determining, by the antivirus agent, an object related to the one or more monitored events and a type of the object; determining, by the antivirus agent and based on the type of the object, whether the object needs antivirus checking; sending, by the antivirus agent, to a control module in the virtual environment, information about the object that needs antivirus checking, the type of the object, and the one or more monitored events; determining, by the control module and based on the information received from the antivirus agent, one or more methods of antivirus checking to be performed on the object; selecting, by the control module, one or more components of an antivirus system in the virtual environment, in a security virtual machine, in an external component of the virtual environment, or in the antivirus agent in the virtual machine, to perform the one or more antivirus checking methods; determining, by the control module or the security virtual machine, priorities of execution of the one or more methods of antivirus checking; and distributing, by the control module, among the one or more selected components, the one or more antivirus checking methods to be performed on the object based on the priority; wherein the selecting includes deciding whether to select the antivirus agent on any other virtual machine of the plurality of virtual machines, wherein the other virtual machine is idle or has unused computing resources.