# Agent-Based Virtual Machine Migration for Load Balancing and Co-Resident Attack in Cloud Computing
## 3 Research Aim and Problem Statement
### Research Aim and Metrics  
The objective of this study is to develop an Agent-based VM migration methodology that integrates co-resident attack (CRA) mitigation strategies into live migration policies, with the objective of ensuring equitable distribution of workloads and the secure operation of cloud computing. The effectiveness of our approach is evaluated using a set of three key performance indicators. To clarify the calculation method for the key performance indicators utilized in this method, and to facilitate the development of subsequent virtual machine migration strategies, we have included the metrics used in this paper in Table 1.  
To support live migration of VMs, it is necessary to determine whether \(VM_{i}\) needs to be migrated to host \(j\) at each decision time point, and this decision variable is also used in the calculation of the load-balancing metric. The decision variable is as follows. \[m_{ijt}=\left\{ \begin{array}{cl}1&\text{if $VM_{i}$ migrates to host $j$ at time $t$}\\ &0&\text{otherwise}\end{array} \right. \tag{1}\]  
BalanceFor server administrators, it is desirable to balance cloud computing, i.e., the proportions of computing or memory resource usages of hosts that are close to each other. A scale statistic can describe the balance of resource utilization, and in this paper, we choose one of the commonly used scale statistics, the sample standard deviation. The sample is \begin{table}
\begin{tabular}{c l} \hline \hline
**Name** & \multicolumn{1}{c}{**Definition**} \\ \hline \(i\) & index of VMs in the Cloud \((i=1,2,\ldots,n)\), \(n\) indicates the number of VMs in the Cloud. \\ \hline \(j\) & index of hosts in the Cloud \((j=1,\ 2,\ \ldots,m)\), \(m\) indicates the number of hosts in the Cloud. \\ \hline \(t\) & index of load-balancing decision time points \((t=1,\ 2,\ \ldots,\ \text{T})\), T indicates the total operation time. \\ \hline \(\alpha_{i}\) & Number of cores required by \(VM_{i}\) \\ \hline \(\alpha_{ii}^{\%}\) & Percentage of CPU usage of \(VM_{i}\) at time \(t\) \\ \hline \(\beta_{i}\) & Number of gigabytes of memory required by \(VM_{i}\) \\ \hline \(\beta_{ii}^{\%}\) & Percentage of memory usage of \(VM_{i}\) at time \(t\) \\ \hline \(\gamma_{it}\) & Security level of \(VM_{i}\) at time \(t\) \\ \hline \(C_{it}\) & Idle number of cores of host \(j\) at time \(t\) \\ \hline \(M_{ijt}\) & Idle memory (expressed in gigabytes) of host \(j\) at time \(t\) \\ \hline \(x_{ji}^{\%}\) & Percentage of CPU usage of host \(j\) at time \(t\) \\ \hline \(y_{ji}^{\%}\) & Percentage of memory usage of host \(j\) at time \(t\) \\ \hline \(S_{jit}\) & Security level of host \(j\) at time \(t\) \\ \hline \(D\) & Number of hosts covered by malicious VMs \\ \hline \(d\) & Number of VMs treated by malicious VMs \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Definitions regarding the metrics. the CPU/memory usage of each host \(j\) at time \(t\). Hence, we define _Balance_ as the arithmetic mean of resource utilization sample standard deviations represented as a percentage. \[\overline{\sigma}_{CPU}=\frac{\sum_{t=1}^{T}\sigma_{CPU_{t}}}{T},\ \sigma_{CPU_{t}}=\sqrt{\frac{1}{m-1}\sum_{j=1}^{m}\left(x_{jt}^{\%}-\overline{ x_{t}^{\%}}\right)^{2}} \tag{2}\]  
\[\overline{\sigma}_{memory}=\frac{\sum_{t=1}^{T}\sigma_{memory_{t}}}{T},\ \sigma_{ memory_{t}}=\sqrt{\frac{1}{m-1}\sum_{j=1}^{m}\left(y_{jt}^{\%}-\overline{y_{t}^{ \%}}\right)^{2}} \tag{3}\]  
\[Balance=\overline{\sigma}_{CPU}+\overline{\sigma}_{memory} \tag{4}\]  
_Coverage_--One criterion to measure the security performance is _Coverage_, the rate of hosts attacked, which equals the number of targeted hosts co-located with malicious VMs, divided by the number of total hosts \(m\). \[Coverage=D/m \tag{5}\]  
_CVR_--Another criterion, _CVR_ (Co-located VMs Rate), is the percentage of VMs next to malicious VMs. A VM belonging to a malicious user undermines the server's security and the security of all VMs operating on the same server.