Patent attributes
A method and a system for scheduling a virtual machine are disclosed. The method includes: obtaining energy consumption data of a rack and energy consumption data of host computers, wherein the rack is used to place the host computers; determining power consumption data of a virtual machine; determining a target host computer corresponding to the virtual machine according to the energy consumption data of the rack, the energy consumption data of the host computers, and the power consumption data of the virtual machine; and dispatching the virtual machine to the target host computer. The present disclosure solves the technical problems of unbalanced power consumption scheduling caused by virtual machine scheduling methods that are implemented only according to CPU parameters in the existing technologies.