摘要 |
Provided are a method for processing virtual machine cluster and a computer system. The virtual machine cluster comprises N virtual machines, each of the N virtual machines saves state information about the N virtual machines, and works as a first virtual machine in peer-to-peer mode. A virtual machine list comprises information about the N virtual machines. The method comprises: the first virtual machine sending a first heartbeat message to at least two neighbour virtual machines in the N virtual machines, so that the at least two neighbour virtual machines detect the first heartbeat message, wherein a detection result of the first heartbeat message is used for determining the state of the first virtual machine, and the first virtual machine establishes a neighbour relationship with the at least two neighbour virtual machines according to the information about the N virtual machines; and the first virtual machine, as a neighbour virtual machine of a second virtual machine in the at least two virtual machines, detecting a second heartbeat message sent by the second virtual machine. The technical solution of the embodiments of the present invention can improve the fault-tolerant capability and the performance of a virtual machine cluster. |