## 4 Solution for MCRC Problem
### VM Placement
Let the initial workload type sequence of host \(h_{i}\) be \((\textbf{AW}_{i,k}\textbf{BW}_{i,k}\textbf{CW}_{i,k}\textbf{DW}_{i,k})\). We sort the initial sequence in ascending order according to the values of resource usage marks, and the ordered workload type sequence is \(WL\_type_{i,l}\). For example, if \(V(\textbf{AW}_{i,k})=0.1\), \(V(\textbf{BW}_{i,k})=0.09\), \(V(\textbf{CW}_{i,k}=0.15\), and \(V(\textbf{DW}_{i,k})=0.02\), then \(WL\_type_{i,l}=(\textbf{DW}_{i,k}\textbf{BW}_{i,k}\textbf{AW}_{i,k}\textbf{CW}_{ ik})\). Then, we define the complementary workload type \(\textbf{CWL\_type}_{i,k}\) of \(h_{i}\) in \(t_{k}\) as the reverse sequence of \(WL\_type_{i,l}\). In the production environment, the power consumption of the four resources in a host is sorted from largest to smallest as CPU, memory, disk, and network. Therefore, in a host workload type sequence, if two resource usages are equal, these two resources are sorted according to the order of their resource power consumption levels. Hence, we have \(4!=24\) workload types. We divided all non-overloaded hosts (including those underloaded ones) into 24 groups by the workload types. Then, the 24 groups of hosts are arranged in descending order by the number of hosts included to form a list:  
\(HG=\{WL\_Host\_List_{1},WL\_Host\_List_{2},\cdots,WL\_Host\_List_{2}4\}\). Next, we sort the hosts in each \(WL\_Host\_List_{i}\). We compare two hosts of the same workload type as follows. Given the workload type \((\textbf{W}_{i,1}\textbf{W}_{i,2}\textbf{W}_{i,3}\textbf{W}_{i,4})\), where \(\textbf{W}_{i,p}\in\{\textbf{AW},\textbf{BW},\textbf{CW},\textbf{DW}\}\). Regarding two different host \(h_{i}\) and \(h_{i^{\prime}}\) of the same workload type:  
If \(h_{i}\) is better than \(h_{i^{\prime}}\), denoted as \(h_{i}>h_{i^{\prime}}\), then the following is met:  
\[\prod_{p=1}^{4}V(\textbf{W}_{i,p})>\prod_{p=1}^{4}V(\textbf{W}_{i^{\prime},p }). \tag{54}\]  
If \(h_{i}\) is equivalent to \(h_{i^{\prime}}\), denoted as \(h_{i}=h_{i^{\prime}}\), then the following is met:  
\[\prod_{p=1}^{4}V(\textbf{W}_{i,p})=\prod_{p=1}^{4}V(\textbf{W}_{i^{\prime},p }). \tag{55}\]  
If \(h_{i}\) is worse than \(h_{i^{\prime}}\), denoted as \(h_{i}<h_{i^{\prime}}\), then the following is met:  
\[\prod_{p=1}^{4}V(\textbf{W}_{i,p})<\prod_{p=1}^{4}V(\textbf{W}_{i^{\prime},p }). \tag{56}\]  
Hosts in the same group, according to the above method of comparison, are sorted in descending order to form an ordered group. All ordered groups are denoted as:  
\(\{WL\_Host\_List\_sorted_{1},WL\_Host\_List\_sorted_{2},\cdots,WL\_Host\_ List\_sorted_{24}\}\). For each host given a workload type, in order to take full advantage of all its resources, it is best to pick and place VMs of the complementary work type that are the same as the host's workload type. For instance, if the host is \(WL\_type_{i,k}=(\textbf{DWBWCWAW})\), then \(CWL\_type_{i,k}=(\textbf{AWCWBWDW})\), and the VMs of the complementary work type \((\textbf{ACBD})\) should be selected and placed on this host. Hence, we divide all VMs to be migrated into 24 groups according to their complementary workload types, denoted as:  
\(VG=\{cvlt\_VM\_List_{1},cvlt\_VM\_List_{1},\cdots,cvlt\_VM\_List_{24}\}\). Next, we sort the VMs in each groups. We compare two VMs of the same complementary workload type as follows. Given workload type \((\textbf{W}_{j,1}\textbf{W}_{j,2}\textbf{W}_{j,3}\textbf{W}_{j,4})\), where \(\mathbf{W}_{j,p}\in\{\mathbf{A},\mathbf{B},\mathbf{C},\mathbf{D}\}\).