The invention provides a method and a
system for realizing
fault tolerance of a
virtual machine. The method comprises the steps of: redundantly operating the
virtual machine where an application program is located in a plurality of servers, selecting one
server as a master
virtual machine, using the rest servers as slave virtual machines, wherein the
virtualization configurations of the master virtual
machine and the slave virtual machines are the same, and the master virtual
machine and the slave virtual machines are redundant backups for fault switching; and enabling the master virtual
machine and the slave virtual machines to carry out redundancy
processing on the user request, and maintaining the consistency of the external visible states of the master virtual machine and the slave virtual machines through a master-slave synchronization protocol. Compared with the prior art, according to the invention, an efficient master-slave synchronization protocol and an
operating system cooperating with a virtual machine monitor are used; the method greatly reduces the
tail time
delay of user request
processing, reduces the frequency of state difference caused by uncertainty of redundantoperation of the master and slave virtual machines, reduces the expenditure of state synchronization of the master and slave virtual machines, remarkably improves the overall
throughput of an application program in a fault-tolerant
system, and remarkably reduces the
delay of request
processing.