A method for shutting down a virtual system, the virtual system comprising several virtual machines hosted by one or more physical servers and one or more virtual machine monitors, each virtual machine monitor controlling one or more virtual machines, and each virtual machine hosting an application, wherein at least one of the applications hosted on the virtual machines depends on at least another application, and at least one of the applications hosted on the virtual machines is a power protection software that monitors and manages power devices, and at least one of the applications hosted on the virtual machines is a virtualization manager being a software that monitors and manages the virtual machines and the one or more virtual machine monitors, the method comprising the steps of: • receiving, by the power protection software, a shutdown command for the virtual system or detecting, by the power protection software, an event that is sent by one of the power devices monitored and managed by the power protection software and that triggers a process for shutting down of the virtual system, • sending, by the power protection software and to the virtualization manager, a request for data about dependencies in the virtual system, • retrieving, by the virtualization manager, the requested data, which comprise dependencies of the applications executed by the virtual machines, dependencies of the virtual machines, and dependencies with the virtual machine monitors, • generating, by the power protection software, a sequence of shutdown actions depending on the retrieved requested data, wherein the sequence comprises: ∘ the shutting down of all applications executed by the virtual machines, comprising the shutting down of applications without dependencies, checking through the virtualization manager whether all applications in the virtual system are shut down and outputting the result, checking the result whether all applications are shut down except the power protection software and applications it depends on, repeating the previous steps until it is determined that all applications are shut down except the power protection software and the applications it depends on, ∘ the shutting down of all virtual machines (S16-S26), and ∘ then the shutting down of all virtual machine monitors, and • executing the generated sequence of shutdown actions in order to shut down the virtual system. • receiving, by the power protection software, a shutdown command for the virtual system or detecting, by the power protection software, an event that is sent by one of the power devices monitored and managed by the power protection software and that triggers a process for shutting down of the virtual system, • sending, by the power protection software and to the virtualization manager, a request for data about dependencies in the virtual system, • retrieving, by the virtualization manager, the requested data, which comprise dependencies of the applications executed by the virtual machines, dependencies of the virtual machines, and dependencies with the virtual machine monitors, • generating, by the power protection software, a sequence of shutdown actions depending on the retrieved requested data, wherein the sequence comprises: ∘ the shutting down of all applications executed by the virtual machines, comprising the shutting down of applications without dependencies, checking through the virtualization manager whether all applications in the virtual system are shut down and outputting the result, checking the result whether all applications are shut down except the power protection software and applications it depends on, repeating the previous steps until it is determined that all applications are shut down except the power protection software and the applications it depends on, ∘ the shutting down of all virtual machines (S16-S26), and ∘ then the shutting down of all virtual machine monitors, and ∘ the shutting down of all applications executed by the virtual machines, comprising the shutting down of applications without dependencies, checking through the virtualization manager whether all applications in the virtual system are shut down and outputting the result, checking the result whether all applications are shut down except the power protection software and applications it depends on, repeating the previous steps until it is determined that all applications are shut down except the power protection software and the applications it depends on, ∘ the shutting down of all virtual machines (S16-S26), and ∘ then the shutting down of all virtual machine monitors, and • executing the generated sequence of shutdown actions in order to shut down the virtual system.