Algorithm 1
The virtual machine migration algorithm.
Input: , , . | Output: . | Procedure begin | (1) for each in do | (2) Use cloud model to predict future workloads for host , and push results into list | (3) . Calculate the average of the predicted workloads and push result into list ; | (4) if then | (5) Add host ID into the list , select the VM with the largest average history | (6) workload valueon the host , and add the VM into queue ; | (7) end if | (8) if then | (9) Add host ID into list , and add all the virtual machines on the host into ; | (10) end if | (11) if then | (12) Add host ID into list ; | (13) end if | (14) end for | (15) for each in do | (16) for each in do | (17) if then | (18) Migrate virtual machine to host , add VM information into list ; | (19) end if | (20) end for | (21) end for | (22) return ; | end Procedure |
|