隨著虛擬化技術廣泛的被企業以及大眾所接納,各大產業服務已經逐漸偏向在雲端平台上佈署,但是雲端服務所在的實體機器有可能因為外在因素導致實體機器故障或是機器需要停機維修,這時如何提升雲端服務之可靠度成了提供雲端平台廠商重要的議題,這時各大雲端平台引進了即時遷移技術,此技術可以在虛擬機器不停止的狀態下搬移到其他不同的實體機器上。近年來容錯技術開始引進各大雲端平台並且使用即時遷移技術來同步虛擬機器,在提供高可靠度的服務前提是必須不能丟失平台上運行虛擬機器之任何狀態,所以本研究主要針對 Qemu KVM 之即時遷移採用的 Pre-Copy 演算法進行改進的研究而不是 Post-Copy演算法。我們發現在原生 Qemu Kvm 在運行不同應用程式時進行即時遷移會有遷移失敗的情況。針對此問題我們提出一演算法 MP (Memory Pattern) 來修正原生 Qemu Kvm 於即時遷移時失敗的情形,MP演算法透過監測每次迭代的記憶體群組,存取狀況來判斷虛擬機器是否屬於記憶體密集存取,若是則提早進入停止拷貝階段付出稍為多一點 down time 來避免過長的總遷移時間,以及長時間佔用網路頻寬。經過實驗測試此演算法與 Qemu Kvm原生之即時遷移演算法,Qemu Kvm於記憶體密集的時候即時遷移的成功率為 0%。我們提出的 MP 演算法成功率為100%,我們經由放寬 down time 條件來使原生 Qemu Kvm 完成即時遷移來與我們提出之 MP 演算法來做比較,在總遷移時間(Total migration time) MP 演算法可以減少 22%,在遷移過程中所傳送的資料總量減少了 19% 左右,同時能確保即時遷移的可靠度,也能減少網路頻寬之消耗。;As virtualization technology is widely used by enterprises and the general public, many industry services have been deployed on cloud platforms. However, the hardware crash or maintenance Downtime still lead to virtual machine down. At this time how to improve the reliability of cloud services has become an important issue for cloud platform vendors. Now many of cloud platforms have introduced Live migration. This technology can move the virtual machine into other physical machines without stopping the virtual machine. In recent years, fault-tolerance technology has begun to introduce to many cloud platforms. The premise of providing high-reliability services is that any virtual machines memory states must not be lost. Therefore, this research based on the Kvm Pre-Copy Live migration. We find out the virtual machine execute difference application will lead to Live migration fail. In response to this problem, we propose an algorithm MP (Memory Pattern) to correct the failure of the Kvm in Live migration. The MP algorithm checks the memory status of each iteration to determine whether the virtual machine belongs to memory intensive. If virtual machine belongs to memory intensive then enter the stop copy phase earlier, it pays a little more down time to avoid long total migration time, as well as occupying the network bandwidth. After an experimental test of the MP algorithm and Kvm Pre-copy algorithm, Kvm achieved 0% success rate for Live migration in the memory intensive case. Our proposed MP algorithm success rate achieved 100% in the memory intensive case. We have made the Kvm perform live migration by relaxing the down time condition to compare with our proposed MP algorithm. In the total migration time MP algorithm can be reduced by 22%, and the total amount of data transmitted during the migration process is reduced by about 19%. At the same time, it can ensure the reliability of instant migration and can also reduce the consumption of network bandwidth.