摘要 |
A method and device for allocating a physical machine to a virtual machine. The method for allocating a physical machine to a virtual machine comprises: according to the quantity of resources of each dimension of at least three physical machines, acquiring the comprehensive resource index of the at least three physical machines (101); then, in accordance with the comprehensive resource index, sequencing the at least three physical machines to obtain a physical machine sequence (102); then, dividing the physical machine sequence in accordance with a reservation coefficient to obtain a first physical machine sequence (103); and finally, determining the first physical machine as a physical machine which is used for operating a virtual machine (104), wherein the first physical machine is a physical machine in the first physical machine sequence. It is achieved to allocate a physical machine to a virtual machine according to resources of different dimensions between various physical machines, so that it is achieved to allocate a suitable physical machine to the virtual machine, and the efficiency of allocating a physical machine having suitable resources to the virtual machine is improved. |