CN104156255B - A kind of virtual machine migration method, virtual machine (vm) migration device and source physical host - Google Patents
A kind of virtual machine migration method, virtual machine (vm) migration device and source physical host Download PDFInfo
- Publication number
- CN104156255B CN104156255B CN201410374581.5A CN201410374581A CN104156255B CN 104156255 B CN104156255 B CN 104156255B CN 201410374581 A CN201410374581 A CN 201410374581A CN 104156255 B CN104156255 B CN 104156255B
- Authority
- CN
- China
- Prior art keywords
- bandwidth
- page
- virtual machine
- physical host
- target physical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明实施例提供了一种虚拟机迁移方法、虚拟机迁移装置及源物理主机,涉及虚拟机迁移技术领域,减少目标物理主机上虚拟机的停机时间,从而提高虚拟机的迁移性能。包括:虚拟机从源物理主机迁移到目标物理主机,且在目标物理主机上恢复运行后,源物理主机通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页;源物理主机通过网络接口接收目标物理主机发送的缺页请求;源物理主机根据缺页请求中包含的缺失内存页的信息,找到缺失内存页,通过网络接口利用第二带宽向目标物理主机发送缺失内存页;源物理主机通过网络接口利用第三带宽继续向目标物理主机发送虚拟机的待同步内存页。
Embodiments of the present invention provide a virtual machine migration method, a virtual machine migration device, and a source physical host, relate to the technical field of virtual machine migration, and reduce the downtime of a virtual machine on a target physical host, thereby improving the migration performance of the virtual machine. Including: after the virtual machine is migrated from the source physical host to the target physical host and resumes operation on the target physical host, the source physical host sends the memory pages to be synchronized of the virtual machine to the target physical host through the network interface using the first bandwidth; the source physical host Receive the page fault request sent by the target physical host through the network interface; the source physical host finds the missing memory page according to the information of the missing memory page contained in the page fault request, and sends the missing memory page to the target physical host through the network interface using the second bandwidth; The source physical host continues to send the memory page to be synchronized of the virtual machine to the target physical host by using the third bandwidth through the network interface.
Description
技术领域technical field
本发明涉及虚拟机迁移技术领域,尤其涉及一种虚拟机迁移方法、虚拟机迁移装置及源物理主机。The present invention relates to the technical field of virtual machine migration, in particular to a virtual machine migration method, a virtual machine migration device and a source physical host.
背景技术Background technique
利用虚拟化技术可以实现高效灵活的资源管理,因此在云平台上得到广泛应用。虚拟机迁移是虚拟化技术的一个重要领域,广泛应用于集群、数据中心和云平台系统中,以及共享硬件与文件系统。虚拟机迁移技术能够确保将正在运行的虚拟机以不中断的方式从当前正在运行的物理主机上迁移到另一台物理主机上,从而实现了云平台上虚拟机的灵活管理,为集群在线维护、资源动态调度、负载均衡系统等操作提供了技术支持。Efficient and flexible resource management can be achieved by using virtualization technology, so it is widely used on cloud platforms. Virtual machine migration is an important field of virtualization technology, which is widely used in clusters, data centers and cloud platform systems, as well as shared hardware and file systems. The virtual machine migration technology can ensure that the running virtual machine is migrated from the currently running physical host to another physical host in an uninterrupted manner, thus realizing the flexible management of the virtual machine on the cloud platform and providing online maintenance for the cluster , resource dynamic scheduling, load balancing system and other operations provide technical support.
虚拟机迁移,即是将虚拟机从源物理主机上迁移到目标物理主机上的过程。目前,常用的后拷贝虚拟机迁移技术主要包括两个阶段:Virtual machine migration is the process of migrating a virtual machine from a source physical host to a target physical host. At present, the commonly used post-copy virtual machine migration technology mainly includes two stages:
第一阶段,源物理主机停止虚拟机的运行,将虚拟机的关键数据(如CPU的状态信息、设备信息等数据)传输至目标物理主机。In the first stage, the source physical host stops the operation of the virtual machine, and transmits key data of the virtual machine (such as CPU status information, device information, etc.) to the target physical host.
第二阶段,在目标物理主机上运行迁移后的虚拟机。这一阶段中,源物理主机与目标物理主机之间会进行两种形式的内存页传输。一种形式是:源物理主机通过网络接口向目标物理主机发送两者间未同步的内存页(这一过程被称为:后台主动传输);另一种形式是:在目标物理主机上运行迁移后的虚拟机时,若发生内存缺页(即虚拟机需要用到的内存页,尚未从源物理主机发送至目标物理主机),虚拟机停机,并由目标物理主机向源物理主机发出缺页请求,源物理主机通过网络接口向目标物理主机发送该缺页请求指示的内存页,目标物理主机收到该缺失内存页后虚拟机重新启动。In the second stage, the migrated virtual machine is run on the target physical host. In this phase, two forms of memory page transfers are performed between the source physical host and the target physical host. One form is: the source physical host sends unsynchronized memory pages between the two to the target physical host through the network interface (this process is called: background active transfer); the other form is: running migration on the target physical host If there is a memory page fault (that is, the memory page that the virtual machine needs to use has not been sent from the source physical host to the target physical host), the virtual machine will stop, and the target physical host will issue a page fault to the source physical host. Request, the source physical host sends the memory page indicated by the page fault request to the target physical host through the network interface, and the virtual machine restarts after the target physical host receives the missing memory page.
由于后台主动传输时的传输数据量较大,传输时间较长,因而后台主动传输往往会占用源物理主机和目标物理主机之间较多或全部的带宽。带宽的拥堵将导致目标物理主机收到缺失内存页的时间较长,进而目标物理主机上的虚拟机停机的时间也较长。而衡量虚拟机迁移的关键指标之一就是虚拟机的停机时间,停机时间越长,虚拟机的迁移性能越差。Since the amount of data to be transferred during the background active transfer is large and the transfer time is long, the background active transfer often occupies more or all of the bandwidth between the source physical host and the target physical host. Bandwidth congestion will cause the target physical host to receive the missing memory page for a long time, and then the virtual machine on the target physical host will also take a long time to stop. One of the key indicators for measuring virtual machine migration is the downtime of the virtual machine. The longer the downtime, the worse the migration performance of the virtual machine.
发明内容Contents of the invention
本发明实施例提供一种虚拟机迁移方法、虚拟机迁移装置及源物理主机,在保证虚拟机迁移总时间处于合理范围的前提下,减少目标物理主机上虚拟机的停机时间,从而提高虚拟机的迁移性能。Embodiments of the present invention provide a virtual machine migration method, a virtual machine migration device, and a source physical host. On the premise of ensuring that the total time of virtual machine migration is within a reasonable range, the downtime of the virtual machine on the target physical host is reduced, thereby improving the efficiency of the virtual machine. migration performance.
为达到上述目的,本发明实施例采用的技术方案是,In order to achieve the above purpose, the technical solution adopted in the embodiment of the present invention is:
第一方面,公开了一种虚拟机迁移方法,所述方法应用于源物理主机,包括:In the first aspect, a virtual machine migration method is disclosed, the method is applied to a source physical host, including:
虚拟机从源物理主机迁移到目标物理主机,且在所述目标物理主机上恢复运行后,所述源物理主机通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页;所述虚拟机的待同步内存页为:存储在所述源物理主机中,在所述虚拟机迁移过程中未发送至所述目标物理主机的内存页;After the virtual machine is migrated from the source physical host to the target physical host and resumes running on the target physical host, the source physical host sends the memory page of the virtual machine to be synchronized to the target physical host through the network interface using the first bandwidth; The memory page to be synchronized of the virtual machine is: a memory page stored in the source physical host and not sent to the target physical host during the virtual machine migration process;
所述源物理主机通过所述网络接口接收所述目标物理主机发送的缺页请求;所述缺页请求包含有缺失内存页的信息,所述缺失内存页为虚拟机迁移到所述目标物理主机后,恢复运行后需要但未从所述源物理主机发送至所述目标物理主机的内存页;The source physical host receives a page fault request sent by the target physical host through the network interface; the page fault request includes information about a missing memory page, and the missing memory page is a virtual machine migrated to the target physical host Afterwards, memory pages that are required but not sent from the source physical host to the target physical host after resuming operation;
所述源物理主机根据所述缺页请求中包含的所述缺失内存页的信息,找到所述缺失内存页,通过所述网络接口利用第二带宽向所述目标物理主机发送所述缺失内存页;所述源物理主机通过所述网络接口利用第三带宽继续向所述目标物理主机发送虚拟机的待同步内存页,其中,所述第二带宽、所述第三带宽均小于所述第一带宽。The source physical host finds the missing memory page according to the information of the missing memory page included in the page fault request, and sends the missing memory page to the target physical host through the network interface using the second bandwidth ; The source physical host continues to send the memory page of the virtual machine to be synchronized to the target physical host by using the third bandwidth through the network interface, wherein the second bandwidth and the third bandwidth are both smaller than the first bandwidth.
结合第一方面,在第一方面的第一种可能的实现方式中,In combination with the first aspect, in the first possible implementation of the first aspect,
所述方法还包括:The method also includes:
所述源物理主机根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中的比例,得到所述第二带宽;确定所述第三带宽在所述第一带宽中的比例,得到所述第三带宽;The source physical host determines a proportion of the second bandwidth in the first bandwidth according to a bandwidth adaptive allocation strategy to obtain the second bandwidth; determines a proportion of the third bandwidth in the first bandwidth, obtaining the third bandwidth;
其中,所述带宽自适应分配策略包括:预设参数M以及预设参数N,所述预设参数M为预先统计的预设时间段内发送缺失内存页所用的流量,所述预设参数N为所述预设时间段内发送待同步内存页所用的流量;Wherein, the bandwidth adaptive allocation strategy includes: a preset parameter M and a preset parameter N, the preset parameter M is the traffic used for sending missing memory pages in a pre-stated preset time period, and the preset parameter N The traffic used for sending the memory pages to be synchronized within the preset time period;
所述第二带宽与所述第三带宽之和等于所述第一带宽;The sum of the second bandwidth and the third bandwidth is equal to the first bandwidth;
或,所述第二带宽与所述第三带宽之和大于所述第一带宽;Or, the sum of the second bandwidth and the third bandwidth is greater than the first bandwidth;
或,所述第二带宽与所述第三带宽之和小于所述第一带宽。Or, the sum of the second bandwidth and the third bandwidth is smaller than the first bandwidth.
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述源物理主机根据带宽自适应分配策略、预设参数M以及预设参数N,确定所述第二带宽在所述第一带宽中的比例,得到所述第二带宽,以及确定所述第三带宽在所述第一带宽中的比例,得到所述第三带宽,具体包括:With reference to the first possible implementation of the first aspect, in the second possible implementation of the first aspect, the source physical host determines according to the bandwidth adaptive allocation policy, the preset parameter M, and the preset parameter N The ratio of the second bandwidth in the first bandwidth to obtain the second bandwidth, and determining the ratio of the third bandwidth in the first bandwidth to obtain the third bandwidth specifically includes:
所述源物理主机根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中比例为得到所述第二带宽,以及确定所述第三带宽在所述第一带宽中的比例为得到所述第三带宽。The source physical host determines that the ratio of the second bandwidth to the first bandwidth is Obtaining the second bandwidth, and determining the proportion of the third bandwidth in the first bandwidth is The third bandwidth is obtained.
结合第一方面,在第一方面的第三种可能的实现方式中,In combination with the first aspect, in a third possible implementation of the first aspect,
所述方法还包括:The method also includes:
所述源物理主机根据所述缺页请求中包含的所述缺失内存页的信息,找到所述缺失内存页,通过所述网络接口利用第二带宽向所述目标物理主机发送完所述缺失内存页后,所述源物理主机通过所述网络接口利用当前可用带宽向目标物理主机发送虚拟机的待同步内存页,所述当前可用带宽大于等于所述第二带宽与所述第三带宽之和。The source physical host finds the missing memory page according to the information of the missing memory page included in the page fault request, and sends the missing memory page to the target physical host through the network interface using the second bandwidth. After page, the source physical host sends the memory page of the virtual machine to be synchronized to the target physical host through the network interface using the current available bandwidth, the current available bandwidth is greater than or equal to the sum of the second bandwidth and the third bandwidth .
结合第一方面、第一方面的第一至第三种可能的实现方式,在第一方面的第四种可能的实现方式中,Combining the first aspect and the first to third possible implementations of the first aspect, in the fourth possible implementation of the first aspect,
在所述源物理主机通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页之前,所述方法还包括:Before the source physical host sends the memory page of the virtual machine to be synchronized to the target physical host by using the first bandwidth through the network interface, the method further includes:
所述源物理主机记录所述虚拟机迁移前在所述源物理主机上运行时,各内存页被访问的次数或频率值;The source physical host records the number of times or frequency values of each memory page being accessed when the virtual machine is running on the source physical host before migration;
相应地,所述源物理主机通过网络接口利用所述第一带宽向目标物理主机发送虚拟机的待同步内存页包括:所述源物理主机按照所述各内存页被访问的次数或频率值的降序顺序,通过网络接口利用所述第一带宽依次向目标物理主机发送虚拟机的待同步内存页。Correspondingly, the sending by the source physical host of the memory pages of the virtual machine to be synchronized to the target physical host by using the first bandwidth through the network interface includes: the source physical host according to the number of times or frequency values of each memory page being accessed In descending order, the memory pages to be synchronized of the virtual machine are sequentially sent to the target physical host through the network interface using the first bandwidth.
结合第一方面的第四种可能的实现方式,在第一方面的第五种可能的实现方式中,In combination with the fourth possible implementation of the first aspect, in the fifth possible implementation of the first aspect,
所述源物理主机按照所述各内存页被访问的次数或频率值的降序顺序,通过网络接口利用第一带宽依次向目标物理主机发送虚拟机的待同步内存页的过程中,包括:The process of sending the memory pages to be synchronized of the virtual machine to the target physical host sequentially through the network interface using the first bandwidth according to the descending order of the number of times or frequency values of the memory pages accessed by the source physical host includes:
所述源物理主机每次通过网络接口利用所述第一带宽向目标物理主机发送虚拟机的一个未同步的第一内存页时,将所述第一内存页地址之前的第二内存页、所述第一内存页地址之后的第三内存页一同向所述目标物理主机发送。Each time the source physical host sends an unsynchronized first memory page of the virtual machine to the target physical host through the network interface using the first bandwidth, the second memory page before the address of the first memory page, the The third memory page following the address of the first memory page is sent to the target physical host together.
结合第一方面,在第一方面的第六种可能的实现方式中,In combination with the first aspect, in the sixth possible implementation of the first aspect,
虚拟机从源物理主机迁移到目标物理主机,且在所述目标物理主机上恢复运行之前,所述方法还包括:The virtual machine is migrated from the source physical host to the target physical host, and before resuming operation on the target physical host, the method further includes:
所述源物理主机停止所述虚拟机的运行,向所述目标物理主机发送所述虚拟机的关键数据,以便所述虚拟机在所述目标物理主机上恢复运行;所述虚拟机的关键数据包括所述源物理主机中央处理器CPU的状态信息、所述源物理主机的设备信息。The source physical host stops the operation of the virtual machine, and sends key data of the virtual machine to the target physical host, so that the virtual machine resumes running on the target physical host; the key data of the virtual machine It includes the status information of the central processing unit CPU of the source physical host and the device information of the source physical host.
第二方面,公开一种虚拟机迁移装置,部署在源物理主机上,所述虚拟机迁移装置包括:In a second aspect, a virtual machine migration device is disclosed, which is deployed on a source physical host, and the virtual machine migration device includes:
后台传输模块,用于通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页;所述虚拟机的待同步内存页为:存储在所述源物理主机中,在所述虚拟机迁移过程中未发送至所述目标物理主机的内存页;The background transmission module is used to send the memory page to be synchronized of the virtual machine to the target physical host by using the first bandwidth through the network interface; the memory page to be synchronized of the virtual machine is: stored in the source physical host, in the virtual machine Memory pages not sent to the target physical host during machine migration;
缺页请求接收模块,用于通过所述网络接口接收所述目标物理主机发送的缺页请求;所述缺页请求包含有缺失内存页的信息,所述缺失内存页为虚拟机迁移到所述目标物理主机后,恢复运行后需要但未从所述源物理主机发送至所述目标物理主机的内存页;A page fault request receiving module, configured to receive a page fault request sent by the target physical host through the network interface; the page fault request includes information about a missing memory page, and the missing memory page is for the virtual machine to migrate to the After the target physical host, memory pages that are needed after recovery but not sent from the source physical host to the target physical host;
远程调页模块,用于根据所述缺页请求中包含的所述缺失内存页的信息,找到所述缺失内存页,通过所述网络接口利用第二带宽向所述目标物理主机发送所述缺失内存页;所述后台传输模块,还用于通过所述网络接口利用第三带宽继续向所述目标物理主机发送虚拟机的待同步内存页,其中,所述第二带宽、所述第三带宽均小于所述第一带宽。A remote paging module, configured to find the missing memory page according to the information of the missing memory page included in the page fault request, and send the missing memory page to the target physical host through the network interface using the second bandwidth. memory page; the background transmission module is further configured to continue to send the memory page of the virtual machine to be synchronized to the target physical host by using the third bandwidth through the network interface, wherein the second bandwidth and the third bandwidth are smaller than the first bandwidth.
结合第二方面,在第二方面的第一种可能的实现方式中,In combination with the second aspect, in the first possible implementation of the second aspect,
所述虚拟机迁移装置还包括:带宽自适应模块,The virtual machine migration device also includes: a bandwidth adaptive module,
所述带宽自适应模块用于,根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中的比例,得到所述第二带宽;确定所述第三带宽在所述第一带宽中的比例,得到所述第三带宽;The bandwidth adaptive module is configured to determine the proportion of the second bandwidth in the first bandwidth according to a bandwidth adaptive allocation strategy to obtain the second bandwidth; determine the proportion of the third bandwidth in the first bandwidth The ratio in the third bandwidth is obtained;
其中,所述带宽自适应分配策略包括:预设参数M以及预设参数N,所述预设参数M为预先统计的预设时间段内发送缺失内存页所用的流量,所述预设参数N为所述预设时间段内发送待同步内存页所用的流量;Wherein, the bandwidth adaptive allocation strategy includes: a preset parameter M and a preset parameter N, the preset parameter M is the traffic used for sending missing memory pages in a pre-stated preset time period, and the preset parameter N The traffic used for sending the memory pages to be synchronized within the preset time period;
所述第二带宽与所述第三带宽之和等于所述第一带宽;The sum of the second bandwidth and the third bandwidth is equal to the first bandwidth;
或,所述第二带宽与所述第三带宽之和大于所述第一带宽;Or, the sum of the second bandwidth and the third bandwidth is greater than the first bandwidth;
或,所述第二带宽与所述第三带宽之和小于所述第一带宽。Or, the sum of the second bandwidth and the third bandwidth is smaller than the first bandwidth.
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,In combination with the first possible implementation of the second aspect, in the second possible implementation of the second aspect,
所述带宽自适应模块具体用于,根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中比例为得到所述第二带宽,以及确定所述第三带宽在所述第一带宽中的比例为得到所述第三带宽。The bandwidth adaptive module is specifically configured to determine the proportion of the second bandwidth in the first bandwidth according to the bandwidth adaptive allocation strategy as Obtaining the second bandwidth, and determining the proportion of the third bandwidth in the first bandwidth is The third bandwidth is obtained.
结合第二方面,在第二方面的第三种可能的实现方式中,In combination with the second aspect, in a third possible implementation of the second aspect,
所述后台传输模块还用于,当所述远程调页模块通过所述网络接口利用第二带宽向所述目标物理主机发送完所述缺失内存页后,通过所述网络接口利用当前可用带宽向目标物理主机发送虚拟机的待同步内存页,所述当前可用带宽大于等于所述第二带宽与所述第三带宽之和。The background transmission module is further configured to, after the remote paging module sends the missing memory page to the target physical host by using the second bandwidth through the network interface, send the missing memory page to the target physical host by using the currently available bandwidth through the network interface. The target physical host sends the memory page of the virtual machine to be synchronized, and the currently available bandwidth is greater than or equal to the sum of the second bandwidth and the third bandwidth.
结合第二方面、第二方面的第一至第三种可能的实现方式,在第二方面的第四种可能的实现方式中,Combining the second aspect and the first to third possible implementations of the second aspect, in the fourth possible implementation of the second aspect,
所述后台传输模块还包括:The background transmission module also includes:
热页记录子模块,用于在所述后台传输模块通过网络接口利用所述第一带宽向目标物理主机发送虚拟机的待同步内存页之前,记录所述虚拟机在所述源物理主机上运行时,各内存页被访问的次数或频率值;The hot page recording submodule is configured to record that the virtual machine is running on the source physical host before the background transfer module uses the first bandwidth to send the memory page of the virtual machine to be synchronized to the target physical host through the network interface , the number or frequency value of each memory page being accessed;
热页预取子模块,用于按照所述各内存页被访问的次数或频率值的降序顺序,通过网络接口利用所述第一带宽依次向目标物理主机发送虚拟机的待同步内存页。The hot page prefetching submodule is configured to sequentially send the memory pages to be synchronized of the virtual machine to the target physical host through the network interface using the first bandwidth in descending order of the number of times or frequency values of each memory page being accessed.
结合第二方面的第四种可能的实现方式,在第二方面的第五种可能的实现方式中,In combination with the fourth possible implementation of the second aspect, in the fifth possible implementation of the second aspect,
所述热页预取子模块,具体用于每次通过网络接口利用所述第一带宽向目标物理主机发送虚拟机的一个未同步的第一内存页时,将所述第一内存页地址之前的第二内存页、所述第一内存页地址之后的第三内存页一同向所述目标物理主机发送。The hot page prefetching submodule is specifically configured to, each time an unsynchronized first memory page of the virtual machine is sent to the target physical host through the network interface using the first bandwidth, set The second memory page and the third memory page following the address of the first memory page are sent to the target physical host together.
结合第二方面,在第二方面的第六种可能的实现方式中,In combination with the second aspect, in a sixth possible implementation of the second aspect,
虚拟机状态管理模块,用于停止所述虚拟机的运行;A virtual machine state management module, configured to stop the operation of the virtual machine;
关键信息发送模块,用于向所述目标物理主机发送所述虚拟机的关键数据,以便所述虚拟机在所述目标物理主机上恢复运行;所述虚拟机的关键数据包括所述源物理主机中央处理器CPU的状态信息、所述源物理主机的设备信息。A key information sending module, configured to send key data of the virtual machine to the target physical host, so that the virtual machine resumes running on the target physical host; the key data of the virtual machine includes the source physical host State information of the central processing unit CPU and device information of the source physical host.
第三方面,公开一种源物理主机,所述源物理主机包括:硬件层;在所述硬件层运行的虚拟机监控单元VMM;所述VMM控制运行的至少一个从所述源物理主机迁移至所述目标物理主机的虚拟机,其中:In a third aspect, a source physical host is disclosed. The source physical host includes: a hardware layer; a virtual machine monitoring unit VMM running on the hardware layer; The virtual machine of the target physical host, wherein:
所述VMM,用于通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页;所述虚拟机的待同步内存页为:存储在所述源物理主机中,在所述虚拟机迁移过程中未发送至所述目标物理主机的内存页;The VMM is configured to send the memory page to be synchronized of the virtual machine to the target physical host by using the first bandwidth through the network interface; the memory page to be synchronized of the virtual machine is: stored in the source physical host, in the virtual machine Memory pages not sent to the target physical host during machine migration;
通过所述网络接口接收所述目标物理主机发送的缺页请求;所述缺页请求包含有缺失内存页的信息,所述缺失内存页为虚拟机迁移到所述目标物理主机后,恢复运行后需要但未从所述源物理主机发送至所述目标物理主机的内存页;Receive a page fault request sent by the target physical host through the network interface; the page fault request includes information about a missing memory page, and the missing memory page is after the virtual machine migrates to the target physical host and resumes operation memory pages that are required but not sent from the source physical host to the target physical host;
根据所述缺页请求中包含的所述缺失内存页的信息,找到所述缺失内存页,通过所述网络接口利用第二带宽向所述目标物理主机发送所述缺失内存页;所述源物理主机通过所述网络接口利用第三带宽继续向所述目标物理主机发送虚拟机的待同步内存页,其中,所述第二带宽、所述第三带宽均小于所述第一带宽。According to the information of the missing memory page included in the page fault request, find the missing memory page, and send the missing memory page to the target physical host through the network interface using the second bandwidth; the source physical host The host continues to send the memory page of the virtual machine to be synchronized to the target physical host by using the third bandwidth through the network interface, wherein both the second bandwidth and the third bandwidth are smaller than the first bandwidth.
结合第三方面,在第三方面的第一种可能的实现方式中,In combination with the third aspect, in the first possible implementation of the third aspect,
所述VMM,还用于根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中的比例,得到所述第二带宽;确定所述第三带宽在所述第一带宽中的比例,得到所述第三带宽;The VMM is further configured to determine a proportion of the second bandwidth in the first bandwidth according to a bandwidth adaptive allocation strategy to obtain the second bandwidth; determine a proportion of the third bandwidth in the first bandwidth Ratio, to obtain the third bandwidth;
其中,所述带宽自适应分配策略包括:预设参数M以及预设参数N,所述预设参数M为预先统计的预设时间段内发送缺失内存页所用的流量,所述预设参数N为所述预设时间段内发送待同步内存页所用的流量;Wherein, the bandwidth adaptive allocation strategy includes: a preset parameter M and a preset parameter N, the preset parameter M is the traffic used for sending missing memory pages in a pre-stated preset time period, and the preset parameter N The traffic used for sending the memory pages to be synchronized within the preset time period;
所述第二带宽与所述第三带宽之和等于所述第一带宽;The sum of the second bandwidth and the third bandwidth is equal to the first bandwidth;
或,所述第二带宽与所述第三带宽之和大于所述第一带宽;Or, the sum of the second bandwidth and the third bandwidth is greater than the first bandwidth;
或,所述第二带宽与所述第三带宽之和小于所述第一带宽。Or, the sum of the second bandwidth and the third bandwidth is smaller than the first bandwidth.
结合第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,In combination with the first possible implementation of the third aspect, in the second possible implementation of the third aspect,
所述VMM具体用于,根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中比例为得到所述第二带宽,以及确定所述第三带宽在所述第一带宽中的比例为得到所述第三带宽。The VMM is specifically configured to determine the proportion of the second bandwidth in the first bandwidth according to the adaptive bandwidth allocation policy as Obtaining the second bandwidth, and determining the proportion of the third bandwidth in the first bandwidth is The third bandwidth is obtained.
结合第三方面,在第三方面的第三种可能的实现方式中,In combination with the third aspect, in a third possible implementation of the third aspect,
所述VMM,还用于根据所述缺页请求中包含的所述缺失内存页的信息,找到所述缺失内存页,通过所述网络接口利用第二带宽向所述目标物理主机发送完所述缺失内存页后,所述源物理主机通过所述网络接口利用当前可用带宽向目标物理主机发送虚拟机的待同步内存页,所述当前可用带宽大于等于所述第二带宽与所述第三带宽之和。The VMM is further configured to find the missing memory page according to the information of the missing memory page contained in the page fault request, and send the missing memory page to the target physical host through the network interface using the second bandwidth. After the memory page is missing, the source physical host sends the memory page of the virtual machine to be synchronized to the target physical host through the network interface using the current available bandwidth, the current available bandwidth is greater than or equal to the second bandwidth and the third bandwidth Sum.
结合第三方面、第三方面的第一至第三种可能的实现方式,在第三方面的第四种可能的实现方式中,Combining the third aspect and the first to third possible implementations of the third aspect, in the fourth possible implementation of the third aspect,
所述VMM,在通过网络接口利用所述第一带宽向目标物理主机发送虚拟机的待同步内存页之前,还用于记录所述虚拟机迁移前在所述源物理主机上运行时,各内存页被访问的次数或频率值;按照所述各内存页被访问的次数或频率值的降序顺序,通过网络接口利用第一带宽依次向目标物理主机发送虚拟机的待同步内存页。The VMM, before sending the memory page of the virtual machine to be synchronized to the target physical host by using the first bandwidth through the network interface, is also used to record when the virtual machine runs on the source physical host before migration, each memory page The number of times or frequency of page access; according to the descending order of the number of times or frequency of each memory page being accessed, the memory pages to be synchronized of the virtual machine are sequentially sent to the target physical host through the network interface using the first bandwidth.
结合第三方面的第四种可能的实现方式,在第三方面的第五种可能的实现方式中,In combination with the fourth possible implementation of the third aspect, in the fifth possible implementation of the third aspect,
所述VMM,按照所述各内存页被访问的次数或频率值的降序顺序,通过网络接口利用所述第一带宽依次向目标物理主机发送虚拟机的待同步内存页的过程中,具体用于每次通过网络接口利用第一带宽向目标物理主机发送虚拟机的一个未同步的第一内存页时,将所述第一内存页地址之前的第二内存页、所述第一内存页地址之后的第三内存页一同向所述目标物理主机发送。The VMM, according to the descending order of the number of times or frequency values of each memory page being accessed, uses the first bandwidth through the network interface to sequentially send the memory pages of the virtual machine to be synchronized to the target physical host, specifically for Each time an unsynchronized first memory page of the virtual machine is sent to the target physical host through the network interface using the first bandwidth, the second memory page before the address of the first memory page, the second memory page after the address of the first memory page Send the third memory page to the target physical host together.
结合第三方面,在第三方面的第六种可能的实现方式中,In combination with the third aspect, in the sixth possible implementation of the third aspect,
所述VMM,在虚拟机从源物理主机迁移到目标物理主机,且在所述目标物理主机上恢复运行之前,还用于停止所述虚拟机的运行,向所述目标物理主机发送所述虚拟机的关键数据,以便所述虚拟机在所述目标物理主机上恢复运行;所述虚拟机的关键数据包括所述源物理主机中央处理器CPU的状态信息、所述源物理主机的设备信息。The VMM is further configured to stop the running of the virtual machine before the virtual machine is migrated from the source physical host to the target physical host and resumes running on the target physical host, and sends the virtual machine to the target physical host. The key data of the machine, so that the virtual machine resumes running on the target physical host; the key data of the virtual machine includes the state information of the central processing unit CPU of the source physical host, and the device information of the source physical host.
本发明实施例提供的虚拟机迁移方法、虚拟机迁移装置以及源物理主机,虚拟机从源物理主机迁移到目标物理主机,且在目标物理主机上恢复运行后,源物理主机会向目标物理主机传输未同步的内存页。在这一过程中,利用本发明实施例提供的方案,一旦虚拟机在目标物理主机上产生缺页,源物理主机收到缺页请求后就会用第二带宽传输缺页请求指示的缺失内存页,用第三带宽继续传输未同步的内存页。这样,一方面没有过多地影响未同步的内存页的传输,使得虚拟机迁移的总时长在合理范围内;另一方面,由于有了专用的第二带宽,保证了缺失内存页从源物理主机向目标物理主机的快速传输,减少了目标物理主机上虚拟机的停机时间,从而在整体上提高了虚拟机的迁移效率。因此,本发明实施例能够在一定程度上克服现有的虚拟机迁移方法中缺失内存页因带宽拥堵导致的不能快速传输到目标物理主机,进而使得虚拟机在目标物理主机上停机等待时间较长的问题。In the virtual machine migration method, virtual machine migration device, and source physical host provided by the embodiments of the present invention, the virtual machine is migrated from the source physical host to the target physical host, and after the target physical host resumes operation, the source physical host will transfer to the target physical host Transfer unsynchronized memory pages. In this process, using the solution provided by the embodiment of the present invention, once the virtual machine generates a page fault on the target physical host, the source physical host will use the second bandwidth to transmit the missing memory indicated by the page fault request after receiving the page fault request page, using the third bandwidth to continue transferring unsynchronized memory pages. In this way, on the one hand, the transmission of unsynchronized memory pages is not too much affected, so that the total time of virtual machine migration is within a reasonable range; The fast transfer from the host to the target physical host reduces the downtime of the virtual machine on the target physical host, thereby improving the migration efficiency of the virtual machine as a whole. Therefore, the embodiment of the present invention can overcome to a certain extent that the missing memory pages in the existing virtual machine migration method cannot be quickly transmitted to the target physical host due to bandwidth congestion, and thus make the virtual machine shut down and wait for a long time on the target physical host. The problem.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1a为本发明实施提供的虚拟机迁移示意图;Figure 1a is a schematic diagram of virtual machine migration provided by the implementation of the present invention;
图1b为本发明实施提供的虚拟机迁移方法的流程示意图;Fig. 1b is a schematic flowchart of a virtual machine migration method provided by the implementation of the present invention;
图2为本发明实施例1提供的一种虚拟机迁移方法的流程示意图;FIG. 2 is a schematic flowchart of a virtual machine migration method provided in Embodiment 1 of the present invention;
图3为本发明实施例2提供的另一种虚拟机迁移方法的流程示意图;FIG. 3 is a schematic flowchart of another virtual machine migration method provided by Embodiment 2 of the present invention;
图4a为本发明实施例2提供的带宽调整方法示意图;FIG. 4a is a schematic diagram of a bandwidth adjustment method provided by Embodiment 2 of the present invention;
图4b为本发明实施例2提供的另一种带宽调整方法示意图;FIG. 4b is a schematic diagram of another bandwidth adjustment method provided by Embodiment 2 of the present invention;
图5为本发明实施例3提供的虚拟机迁移装置的一种结构框图;FIG. 5 is a structural block diagram of a virtual machine migration device provided in Embodiment 3 of the present invention;
图6为本发明实施例3提供的虚拟机迁移装置的另一种结构框图;FIG. 6 is another structural block diagram of a virtual machine migration device provided in Embodiment 3 of the present invention;
图7为本发明实施例3提供的虚拟机迁移装置的另一种结构框图;FIG. 7 is another structural block diagram of a virtual machine migration device provided in Embodiment 3 of the present invention;
图8为本发明实施例4提供的源物理主机结构框图。FIG. 8 is a structural block diagram of a source physical host provided by Embodiment 4 of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
为了方便理解本发明实施例,首先在此介绍本发明实施例描述中会引入的几个要素。In order to facilitate understanding of the embodiments of the present invention, several elements that will be introduced in the description of the embodiments of the present invention are firstly introduced here.
虚拟机:通过虚拟机软件可以在一台物理计算机上模拟出一台或者多台虚拟的计算机,而这些虚拟机可以像真正的物理计算机那样进行工作。Virtual machine: One or more virtual computers can be simulated on a physical computer through virtual machine software, and these virtual machines can work like real physical computers.
硬件层:虚拟化环境运行的硬件平台。其中,硬件层可包括多种硬件,例如CPU、内存、网卡、存储器等高速/低速输入/输出(I/O,Input/Output)设备,及具有特定处理功能的其它设备,如输入输出内存管理单元(Input/Output Memory Management Unit,简称:IOMMU),其中IOMMU可用于虚拟机物理地址和宿主机(Host)物理地址的转换。Hardware layer: the hardware platform on which the virtualization environment runs. Among them, the hardware layer can include a variety of hardware, such as CPU, memory, network card, memory and other high-speed/low-speed input/output (I/O, Input/Output) devices, and other devices with specific processing functions, such as input and output memory management Unit (Input/Output Memory Management Unit, referred to as: IOMMU), wherein the IOMMU can be used for the conversion of the physical address of the virtual machine and the physical address of the host (Host).
宿主机(Host):作为管理层,用以完成硬件资源的管理、分配;为虚拟机呈现虚拟硬件平台,实现虚拟机的调度和隔离,Host可能是虚拟机监控器(VMM)。其中,虚拟硬件平台对其上运行的各个虚拟机提供各种硬件资源,如提供虚拟CPU、内存、虚拟磁盘、虚拟网卡等等。其中,虚拟机运行在Host为其准备的虚拟硬件平台上,Host上运行一个或多个虚拟机。Host (Host): As a management layer, it is used to complete the management and allocation of hardware resources; present a virtual hardware platform for virtual machines, and realize the scheduling and isolation of virtual machines. The Host may be a virtual machine monitor (VMM). Wherein, the virtual hardware platform provides various hardware resources for each virtual machine running on it, such as virtual CPU, memory, virtual disk, virtual network card and so on. Wherein, the virtual machine runs on a virtual hardware platform prepared by the Host, and one or more virtual machines run on the Host.
如图1a所示,物理主机1上运行了多个虚拟主机1-1、1-2、······1-N,物理主机2上运行了多个虚拟机2-1、······2-M。其中,物理主机1上运行的虚拟机1-2将从物理主机1上迁移至物理主机2上,一般地,将物理主机1称为源物理主机,将物理主机2称为目标物理主机。As shown in Figure 1a, multiple virtual hosts 1-1, 1-2, 1-N are running on physical host 1, and multiple virtual machines 2-1, 1-N are running on physical host 2 · · · · 2-M. Wherein, the virtual machine 1-2 running on the physical host 1 will be migrated from the physical host 1 to the physical host 2. Generally, the physical host 1 is called the source physical host, and the physical host 2 is called the target physical host.
如图1b所示,表示的是现有的虚拟机后拷贝迁移流程示意图。其过程大致为:首先,源物理主机停止其上待迁移虚拟机的运行。接着,通过网络接口将虚拟机的关键数据(如源物理主机CPU的状态信息、源物理主机的设备信息等)传输至目标物理主机上。之后,目标物理主机根据上述关键数据恢复虚拟机在目标物理主机上的运行。虚拟机在目标物理主机上运行时,会出现缺内存页的问题(即图1b中所示的缺页处理),此时源物理主机和目标物理主机间要进行内存页的传输。这个传输过程分为两个部分,第一部分:源物理主机主动将虚拟机存储在其内存区域中的内存页(即未同步的内存页)发送给目标物理主机,这一过程也称为后台主动传输。第二部分:虚拟机在目标物理主机运行中遇到缺失内存页时,进行远程请求调页,此时虚拟机会通过目标物理主机向源物理主机发出缺页请求。该缺页请求中可以携带缺失内存页的信息,如地址信息等。源物理主机接收到该缺页请求后,根据缺失内存页的信息找到虚拟机所需的内存页,将该缺失内存页发送给目标物理主机,虚拟机收到该缺失内存页后,恢复运行。As shown in FIG. 1 b , it is a schematic diagram of an existing virtual machine post-copy migration process. The process is roughly as follows: First, the source physical host stops running the virtual machine to be migrated on it. Then, the key data of the virtual machine (such as CPU state information of the source physical host, device information of the source physical host, etc.) is transmitted to the target physical host through the network interface. Afterwards, the target physical host resumes the operation of the virtual machine on the target physical host according to the above key data. When the virtual machine runs on the target physical host, there will be a problem of missing memory pages (that is, the page fault processing shown in Figure 1b), at this time, memory pages need to be transferred between the source physical host and the target physical host. This transfer process is divided into two parts, the first part: the source physical host actively sends the memory pages (that is, unsynchronized memory pages) stored in its memory area by the virtual machine to the target physical host, this process is also called background active transmission. The second part: When the virtual machine encounters a missing memory page during the operation of the target physical host, it performs remote request paging. At this time, the virtual machine sends a page fault request to the source physical host through the target physical host. The page fault request may carry information about the missing memory page, such as address information. After receiving the page fault request, the source physical host finds the memory page required by the virtual machine according to the missing memory page information, sends the missing memory page to the target physical host, and the virtual machine resumes running after receiving the missing memory page.
一般地,由于后台主动传输时的传输数据量较大,传输时间较长,因而后台主动传输往往会占用源物理主机和目标物理主机之间较多或全部的带宽。带宽的拥堵将导致目标物理主机收到缺页请求指示的缺失内存页的时间较长,进而虚拟机在目标物理主机上的停机的时间也较长。而衡量虚拟机迁移的关键指标一个是虚拟机的停机时间,停机时间越长,虚拟机的迁移性能越差;另一个是虚拟机迁移的总时长,总时长越长,虚拟机的迁移性能越差。Generally, since the amount of data to be transferred during the background active transfer is large and the transfer time is long, the background active transfer often occupies more or all of the bandwidth between the source physical host and the target physical host. The congestion of the bandwidth will cause the target physical host to receive the missing memory page indicated by the page fault request for a long time, and then the downtime of the virtual machine on the target physical host is also long. One of the key indicators to measure virtual machine migration is the downtime of the virtual machine, the longer the downtime, the worse the migration performance of the virtual machine; the other is the total time of virtual machine migration, the longer the total time, the better the migration performance of the virtual machine Difference.
本发明的以下各个实施例旨在保证虚拟机迁移的总时长在合理范围内的同时,减少虚拟机的停机时间,提高虚拟机的迁移性能。The following embodiments of the present invention aim to reduce the downtime of the virtual machine and improve the migration performance of the virtual machine while ensuring that the total duration of virtual machine migration is within a reasonable range.
实施例1:Example 1:
本发明实施例提供一种虚拟机迁移方法,应用于源物理主机,如图2所示,该方法包括以下步骤:An embodiment of the present invention provides a method for migrating a virtual machine, which is applied to a source physical host. As shown in FIG. 2, the method includes the following steps:
101、虚拟机从源物理主机迁移到目标物理主机,且在目标物理主机上恢复运行后,源物理主机通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页;该虚拟机的待同步内存页为:存储在源物理主机中,在虚拟机迁移过程中未发送至目标物理主机的内存页。101. After the virtual machine is migrated from the source physical host to the target physical host and resumes running on the target physical host, the source physical host sends the memory page of the virtual machine to be synchronized to the target physical host through the network interface using the first bandwidth; the virtual machine The memory pages to be synchronized are: the memory pages stored in the source physical host and not sent to the target physical host during the virtual machine migration process.
优选地,本步骤中的第一带宽可以是源物理主机和目标物理主机之间,当前能够用于传输待同步内存页的全部带宽。例如,一个100M的带宽当前全部空闲,该100M可以全部用于传输待同步内存页,则第一带宽即为这100M的带宽;假如一个100M的带宽,当前有10M正在传输其他数据,有90M空闲,可以全部用于传输待同步内存页,则该第一带宽即为这90M的带宽。Preferably, the first bandwidth in this step may be all the bandwidth currently available for transferring memory pages to be synchronized between the source physical host and the target physical host. For example, a 100M bandwidth is currently all idle, and the 100M can be used to transfer memory pages to be synchronized, then the first bandwidth is the 100M bandwidth; if a 100M bandwidth is currently transmitting other data, 10M is currently transmitting, and 90M is free , can all be used to transmit memory pages to be synchronized, then the first bandwidth is the bandwidth of 90M.
102、源物理主机通过网络接口接收目标物理主机发送的缺页请求;该缺页请求包含有缺失内存页的信息,该缺失内存页为虚拟机迁移到目标物理主机后,恢复运行后需要但未从源物理主机发送至目标物理主机的内存页。102. The source physical host receives the page fault request sent by the target physical host through the network interface; the page fault request contains the information of the missing memory page, which is required but not available after the virtual machine is migrated to the target physical host and resumes operation. Memory pages sent from the source physical host to the target physical host.
优选地,缺页请求中包含的缺失内存页的信息,可以是缺失内存页的地址信息,当然也可以是能够找到该内存页的其他信息,例如缺失内存页的标识信息。Preferably, the information of the missing memory page included in the page fault request may be the address information of the missing memory page, and of course it may also be other information that can find the memory page, such as identification information of the missing memory page.
103、源物理主机根据缺页请求中包含的缺失内存页的信息,找到该缺失内存页,通过网络接口利用第二带宽向目标物理主机发送该缺失内存页;源物理主机通过网络接口利用第三带宽继续向目标物理主机发送虚拟机的待同步内存页,其中,第二带宽、第三带宽均小于第一带宽。103. The source physical host finds the missing memory page according to the missing memory page information included in the page fault request, and sends the missing memory page to the target physical host through the network interface using the second bandwidth; the source physical host uses the third bandwidth through the network interface The bandwidth continues to send the memory page of the virtual machine to be synchronized to the target physical host, wherein both the second bandwidth and the third bandwidth are smaller than the first bandwidth.
优选地,在本步骤中,源物理主机在向目标物理主机发送缺页请求指示的内存页前是利用第一带宽传输待同步内存页的(即后台主动传输)。而收到缺页请求后,向目标物理主机发送缺页请求指示的内存页时,将当前能够用于传输内存页的全部带宽划分为了第二带宽和第三带宽,并用第二带宽传输缺页请求指示的内存页,用第三带宽继续进行后台主动传输。例如,一个100M的带宽,之前全部用于后台主动传输,此时则可以用第二带宽50M(也可以是其他数量值)传输缺页请求指示的内存页,用第三带宽50M(也可以是其他数量值)继续进行后台主动传输。假如一个100M的带宽,之前有10M正在传输其他数据,有90M空闲,该90M用来进行后台主动传输,此时其他数据已经传完,100M全部可用,此时则可以用第二带宽50M(也可以是其他数量值)传输缺页请求指示的内存页,用第三带宽50M(也可以是其他数量值)继续进行后台主动传输。Preferably, in this step, the source physical host uses the first bandwidth to transmit the memory page to be synchronized before sending the memory page indicated by the page fault request to the target physical host (ie background active transmission). After receiving the page fault request, when sending the memory page indicated by the page fault request to the target physical host, divide the entire bandwidth that can currently be used to transfer the memory page into the second bandwidth and the third bandwidth, and use the second bandwidth to transmit the fault page The memory page indicated by the request continues to be actively transferred in the background with the third bandwidth. For example, a bandwidth of 100M was used for background active transmission before, at this time, the memory page indicated by the page fault request can be transmitted with the second bandwidth of 50M (or other values), and the third bandwidth of 50M (or other values) to continue the background active transfer. Suppose a 100M bandwidth, 10M was transmitting other data before, and 90M was idle, and the 90M was used for active background transmission. At this time, other data has been transmitted and all 100M is available. At this time, the second bandwidth of 50M (also It can be other quantitative values) to transfer the memory page indicated by the page fault request, and use the third bandwidth of 50M (also can be other quantitative values) to continue the background active transmission.
本发明实施例提供的虚拟机迁移方法,虚拟机从源物理主机迁移到目标物理主机,且在目标物理主机上恢复运行后,源物理主机会向目标物理主机传输未同步的内存页。在这一过程中,利用本发明实施例提供的方案,一旦虚拟机在目标物理主机上产生缺页,源物理主机收到缺页请求后就会用第二带宽传输缺页请求指示的缺失内存页,用第三带宽继续传输未同步的内存页。这样,一方面没有过多地影响未同步的内存页的传输,使得虚拟机迁移的总时长在合理范围内;另一方面,由于有了专用的第二带宽,保证了缺失内存页从源物理主机向目标物理主机的快速传输,减少了目标物理主机上虚拟机的停机时间,从而在整体上提高了虚拟机的迁移效率。因此,本发明实施例能够在一定程度上克服现有的虚拟机迁移方法中缺失内存页因带宽拥堵导致的不能快速传输到目标物理主机,进而使得虚拟机在目标物理主机上停机等待时间较长的问题。In the virtual machine migration method provided by the embodiment of the present invention, the virtual machine is migrated from the source physical host to the target physical host, and after the virtual machine resumes operation on the target physical host, the source physical host will transfer unsynchronized memory pages to the target physical host. In this process, using the solution provided by the embodiment of the present invention, once the virtual machine generates a page fault on the target physical host, the source physical host will use the second bandwidth to transmit the missing memory indicated by the page fault request after receiving the page fault request page, using the third bandwidth to continue transferring unsynchronized memory pages. In this way, on the one hand, the transmission of unsynchronized memory pages is not too much affected, so that the total time of virtual machine migration is within a reasonable range; The fast transfer from the host to the target physical host reduces the downtime of the virtual machine on the target physical host, thereby improving the migration efficiency of the virtual machine as a whole. Therefore, the embodiment of the present invention can overcome to a certain extent that the missing memory pages in the existing virtual machine migration method cannot be quickly transmitted to the target physical host due to bandwidth congestion, and thus make the virtual machine shut down and wait for a long time on the target physical host. The problem.
优选地,在本发明优选实施例中,所述源物理主机根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中的比例,得到所述第二带宽;确定所述第三带宽在所述第一带宽中的比例,得到所述第三带宽。Preferably, in a preferred embodiment of the present invention, the source physical host determines the proportion of the second bandwidth in the first bandwidth according to a bandwidth adaptive allocation policy to obtain the second bandwidth; determine the third The ratio of the bandwidth to the first bandwidth to obtain the third bandwidth.
其中,所述带宽自适应分配策略包括:预设参数M以及预设参数N,所述预设参数M为预先统计的预设时间段内发送缺失内存页所用的流量,所述预设参数N为所述预设时间段内发送待同步内存页所用的流量;所述第二带宽与所述第三带宽之和等于所述第一带宽;或,所述第二带宽与所述第三带宽之和大于所述第一带宽;或,所述第二带宽与所述第三带宽之和小于所述第一带宽。Wherein, the bandwidth adaptive allocation strategy includes: a preset parameter M and a preset parameter N, the preset parameter M is the traffic used for sending missing memory pages in a pre-stated preset time period, and the preset parameter N The traffic used to send the memory page to be synchronized within the preset time period; the sum of the second bandwidth and the third bandwidth is equal to the first bandwidth; or, the second bandwidth and the third bandwidth The sum is greater than the first bandwidth; or, the sum of the second bandwidth and the third bandwidth is smaller than the first bandwidth.
优选地,在本发明优选实施例中,源物理主机根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中比例为得到所述第二带宽,确定所述第三带宽在所述第一带宽中的比例为得到所述第三带宽。Preferably, in a preferred embodiment of the present invention, the source physical host determines that the ratio of the second bandwidth to the first bandwidth is Obtain the second bandwidth, determine the proportion of the third bandwidth in the first bandwidth as The third bandwidth is obtained.
优选地,在本发明优选实施例中,源物理主机根据缺页请求中包含的缺失内存页的信息,找到缺失内存页,通过网络接口利用第二带宽向目标物理主机发送完该缺失内存页后,源物理主机通过网络接口利用当前可用带宽向目标物理主机发送虚拟机的待同步内存页。Preferably, in a preferred embodiment of the present invention, the source physical host finds the missing memory page according to the information of the missing memory page contained in the page fault request, and sends the missing memory page to the target physical host through the network interface using the second bandwidth , the source physical host sends the memory page to be synchronized of the virtual machine to the target physical host by using the currently available bandwidth through the network interface.
在此,假设一个100M的带宽,其中50M(即第二带宽)用于传输缺失内存页指示的内存页,另50M(即第三带宽)用于传输未同步的内存页,在物理主机发送完该缺失内存页后,若这100M带宽处于可传输内存页所用,没有其他数据需要传输时,源物理主机恢复用100M传输未同步的内存页(即进行后台主动传输)。需要说明的是,此时这100M带宽可以是之前认定的第一带宽,也有可能根据当前实际情况不再是原先的第一带宽。Here, assume a 100M bandwidth, of which 50M (that is, the second bandwidth) is used to transmit the memory page indicated by the missing memory page, and the other 50M (that is, the third bandwidth) is used to transmit the unsynchronized memory page. After the missing memory page, if the 100M bandwidth is used by the transferable memory page and there is no other data to be transferred, the source physical host resumes using 100M to transfer the unsynchronized memory page (that is, background active transfer). It should be noted that at this time, the 100M bandwidth may be the previously identified first bandwidth, or it may no longer be the original first bandwidth according to the current actual situation.
优选地,在本发明优选实施例中,在101、源物理主机通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页之前,该方法还包括:Preferably, in a preferred embodiment of the present invention, before 101, the source physical host sends the memory page of the virtual machine to be synchronized to the target physical host through the network interface using the first bandwidth, the method further includes:
源物理主机记录虚拟机迁移前在源物理主机上运行时,各内存页被访问的次数或频率值。源物理主机按照各内存页被访问的次数或频率值的降序顺序,通过网络接口利用第一带宽依次向目标物理主机发送虚拟机的待同步内存页。这样,通过被访问的次数或频率值的降序顺序,可以将最常用的内存页优先发送至目标物理主机上,从而减少虚拟机在目标物理主机上发生缺页的概率,进而减少虚拟机停机时间。The source physical host records the number of times or frequency values of each memory page accessed when the virtual machine was running on the source physical host before migration. The source physical host sends the memory pages to be synchronized of the virtual machine to the target physical host sequentially through the network interface using the first bandwidth in descending order of the number of times or frequency values of each memory page being accessed. In this way, the most commonly used memory pages can be sent to the target physical host in priority through the descending order of the number of access times or frequency values, thereby reducing the probability of virtual machine page faults on the target physical host, thereby reducing the downtime of the virtual machine .
优选地,在本发明优选实施例中,源物理主机按照各内存页被访问的次数或频率值的降序顺序,通过网络接口利用第一带宽依次向目标物理主机发送虚拟机的待同步内存页的过程中,每次通过网络接口利用第一带宽向目标物理主机发送虚拟机的一个未同步的第一内存页时,将该第一内存页地址之前的第二内存页、该第一内存页地址之后的第三内存页一同向目标物理主机发送。这样,也能够将最常用的内存页优先发送至目标物理主机上,从而减少虚拟机在目标物理主机上发生缺页的概率,进而减少虚拟机停机时间。Preferably, in a preferred embodiment of the present invention, the source physical host sends the memory pages of the virtual machine to be synchronized to the target physical host sequentially through the network interface using the first bandwidth in descending order of the number of times or frequency values of each memory page accessed. During the process, each time an unsynchronized first memory page of the virtual machine is sent to the target physical host through the network interface using the first bandwidth, the second memory page before the address of the first memory page, the address of the first memory page The subsequent third memory page is sent to the target physical host together. In this way, the most commonly used memory pages can also be preferentially sent to the target physical host, thereby reducing the probability of a page fault in the virtual machine on the target physical host, thereby reducing the downtime of the virtual machine.
优选地,在本发明优选实施例中,在101、虚拟机从源物理主机迁移到目标物理主机,且在目标物理主机上恢复运行之前,还包括:源物理主机停止虚拟机的运行,向目标物理主机发送该虚拟机的关键数据,以便虚拟机在目标物理主机上恢复运行;该虚拟机的关键数据包括源物理主机CPU的状态信息、源物理主机的设备信息等。Preferably, in a preferred embodiment of the present invention, in step 101, the virtual machine is migrated from the source physical host to the target physical host, and before resuming operation on the target physical host, it also includes: the source physical host stops the running of the virtual machine, and transfers to the target The physical host sends the key data of the virtual machine so that the virtual machine can resume operation on the target physical host; the key data of the virtual machine includes CPU status information of the source physical host, device information of the source physical host, and the like.
实施例2:Example 2:
本发明实施例提供一种虚拟机迁移方法,以虚拟机后拷贝迁移为例进行说明。如图3所示,该方法包括以下步骤:An embodiment of the present invention provides a method for migrating a virtual machine, which is described by taking post-copy migration of a virtual machine as an example. As shown in Figure 3, the method includes the following steps:
201、源物理主机记录待迁移的虚拟机在该源物理主机上运行时,虚拟机的各内存页被访问的次数或频率值。201. The source physical host records the times or frequency values of each memory page of the virtual machine being accessed when the virtual machine to be migrated runs on the source physical host.
优选地,本步骤可以采用bitmap(位图)计数器来记录虚拟机内存页的访问次数或频率值。bitmap计数器中记录的某一内存页的数值越大,则表示该内存页被访问的次数多或频率值高,相应地,bitmap计数器中记录的某一内存页的数值越小,则表示该内存页被访问的次数少或频率值小。Preferably, in this step, a bitmap (bitmap) counter may be used to record the number of accesses or the frequency value of the memory page of the virtual machine. The larger the value of a memory page recorded in the bitmap counter, it means that the memory page is accessed more times or the frequency value is high. Correspondingly, the smaller the value of a memory page recorded in the bitmap counter, it means that the memory page The page is accessed less often or has a lower frequency value.
表1Table 1
表1表示虚拟机在源物理主机上运行前,各内存页的bitmap计数器值,初试均为“0”。Table 1 shows the bitmap counter value of each memory page before the virtual machine runs on the source physical host, and the initial test is "0".
表2Table 2
表2为虚拟机运行后,bitmap计数器记录的各内存页的数值。Table 2 shows the values of each memory page recorded by the bitmap counter after the virtual machine is running.
进一步地,可以按照bitmap计数器记录的各内存页的数值进行降序排列,得到如表3所示。Further, the values of each memory page recorded by the bitmap counter can be sorted in descending order, as shown in Table 3.
表3table 3
被访问次数多或频率值高的内存页经过降序排列后得到了较高的优先级,能够在之后的过程中被有限传输,那么就能够减小迁移后的虚拟机发生缺页的概率,减少停机时间。Memory pages that have been accessed frequently or with high frequency values have a higher priority after being sorted in descending order, and can be limitedly transmitted in the subsequent process, so that the probability of page faults in the migrated virtual machine can be reduced, and the Downtime.
202、源物理主机停止该待迁移的虚拟机的运行,向目标物理主机发送该虚拟机的关键数据,以便该虚拟机在目标物理主机上恢复运行。其中,虚拟机的关键数据可以包括源物理主机CPU的状态信息、源物理主机的设备信息等。202. The source physical host stops the operation of the virtual machine to be migrated, and sends key data of the virtual machine to the target physical host, so that the virtual machine resumes running on the target physical host. The key data of the virtual machine may include CPU status information of the source physical host, device information of the source physical host, and the like.
这里需要说明的是,由于此时各内存页尚未从源物理主机传输到目标物理主机上,因此目标物理主机恢复运行的虚拟机还不具备该虚拟机的所有功能。It should be noted here that, at this time, the memory pages have not been transferred from the source physical host to the target physical host, so the virtual machine resumed by the target physical host does not yet have all the functions of the virtual machine.
203、源物理主机通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页。该虚拟机的待同步内存页为:存储在源物理主机中,在虚拟机迁移过程中未发送至目标物理主机的内存页。这一过程也被称为后台主动传输。203. The source physical host sends the memory page to be synchronized of the virtual machine to the target physical host by using the first bandwidth through the network interface. The memory page to be synchronized of the virtual machine is: a memory page stored in the source physical host and not sent to the target physical host during the virtual machine migration process. This process is also known as background active transfer.
在本实施例中,假设源物理主机与目标物理主机之间的带宽为100M,且该100M此时空闲,均可以用来传输内存页,则源物理主机将该100M带宽认定为第一带宽,进行后台主动传输。如图4a所示。In this embodiment, assuming that the bandwidth between the source physical host and the target physical host is 100M, and the 100M is idle at this time, and can be used to transfer memory pages, then the source physical host identifies the 100M bandwidth as the first bandwidth, Perform background active transfers. As shown in Figure 4a.
优选地,由于在步骤201中,示例性的bitmap计数器记录了各内存页的被访问次数或频率值,且经过降序排列得到了表3所示的顺序。那么本步骤中,源物理主机可以根据表3的顺序以内存页6、内存页5、内存页10……内存页3的顺序,向目标物理主机发送。Preferably, in step 201, the exemplary bitmap counter records the number of times or frequency values of each memory page being accessed, and the sequence shown in Table 3 is obtained through descending sorting. Then in this step, the source physical host can send to the target physical host in the order of memory page 6, memory page 5, memory page 10...memory page 3 according to the order in Table 3.
进一步地,源物理主机每次通过网络接口利用第一带宽向目标物理主机发送虚拟机的一个未同步的第一内存页时,还可以将该第一内存页地址之前的第二内存页、第一内存页地址之后的第三内存页一同向目标物理主机发送。仍以表3为例,当源物理主机向目标物理主机传输内存页8时,会将内存页8地址之前的内存页4、内存页8地址之后的内存页2一同向目标物理主机传输。Further, each time when the source physical host sends an unsynchronized first memory page of the virtual machine to the target physical host through the network interface using the first bandwidth, the second memory page before the first memory page address, the second The third memory page following the memory page address is sent to the target physical host together. Still taking Table 3 as an example, when the source physical host transfers memory page 8 to the target physical host, memory page 4 before the address of memory page 8 and memory page 2 after the address of memory page 8 will be transferred to the target physical host together.
204、虚拟机在目标物理主机上运行时产生缺页,虚拟机通过目标物理主机向源物理主机发送缺页请求。其中,该缺页请求中可以包含缺失内存页的地址信息,该缺失内存页为虚拟机迁移到所述目标物理主机后,恢复运行后需要但未从所述源物理主机发送至目标物理主机的内存页。204. A page fault occurs when the virtual machine runs on the target physical host, and the virtual machine sends a page fault request to the source physical host through the target physical host. Wherein, the page fault request may include the address information of the missing memory page, the missing memory page is required after the virtual machine is migrated to the target physical host, but is not sent from the source physical host to the target physical host after resuming operation memory pages.
例如,虚拟机在目标物理主机上运行时,需要用到内存页100,但此时内存页100尚未从源物理主机传输至目标物理主机,则目标物理主机生成包含该内存页100地址“XXXXXXXX”的缺页请求,发送至源物理主机。For example, when the virtual machine runs on the target physical host, it needs to use memory page 100, but at this time the memory page 100 has not been transferred from the source physical host to the target physical host, then the target physical host generates the address "XXXXXXXX" containing the memory page 100 The page fault request is sent to the source physical host.
205、源物理主机接收目标物理主机发送的缺页请求后,根据该缺页请求中包含的缺失内存页的地址信息,找到所述缺失内存页,通过网络接口利用第二带宽向目标物理主机发送缺失内存页;源物理主机通过网络接口利用第三带宽向目标物理主机发送虚拟机的待同步内存页。205. After receiving the page fault request sent by the target physical host, the source physical host finds the missing memory page according to the address information of the missing memory page contained in the page fault request, and sends it to the target physical host through the network interface using the second bandwidth A memory page is missing: the source physical host sends the memory page of the virtual machine to be synchronized to the target physical host by using the third bandwidth through the network interface.
具体地,源物理主机根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中的比例,得到所述第二带宽;确定所述第三带宽在所述第一带宽中的比例,得到所述第三带宽。Specifically, the source physical host determines the proportion of the second bandwidth in the first bandwidth according to the adaptive bandwidth allocation policy to obtain the second bandwidth; and determines the proportion of the third bandwidth in the first bandwidth , to obtain the third bandwidth.
其中,所述带宽自适应分配策略包括:预设参数M以及预设参数N,预设参数M为预先统计的预设时间段内发送缺失内存页所用的流量,预设参数N为预设时间段内发送待同步内存页所用的流量。另外,第一带宽、第二带宽、第三带宽这三者之间的关系包括以下情况:第二带宽与第三带宽之和等于所述第一带宽,或者,所述第二带宽与所述第三带宽之和大于所述第一带宽。或者,所述第二带宽与所述第三带宽之和小于所述第一带宽。Wherein, the adaptive bandwidth allocation strategy includes: a preset parameter M and a preset parameter N, the preset parameter M is the traffic used for sending missing memory pages within a pre-stated preset time period, and the preset parameter N is the preset time The traffic used to send memory pages to be synchronized within the segment. In addition, the relationship among the first bandwidth, the second bandwidth, and the third bandwidth includes the following situations: the sum of the second bandwidth and the third bandwidth is equal to the first bandwidth, or the second bandwidth and the The sum of the third bandwidths is greater than the first bandwidth. Or, the sum of the second bandwidth and the third bandwidth is smaller than the first bandwidth.
实现中,源物理主机接收目标物理主机发送的缺页请求后,根据地址信息“XXXXXXXX”找到内存页100。将当前用于后台主动传输的带宽分为第二带宽和第三带宽,例如当前有100M的带宽用于后台主动传输,那么可以将这100M带宽中的50M(即第二带宽)用来传输内存页100,另50M(即第三带宽)用来继续进行后台主动传输,传输未同步的内存页。如图4b所示。In implementation, after receiving the page fault request sent by the target physical host, the source physical host finds the memory page 100 according to the address information "XXXXXXXX". Divide the bandwidth currently used for background active transmission into the second bandwidth and the third bandwidth. For example, if there is currently 100M of bandwidth used for background active transmission, then 50M of the 100M bandwidth (that is, the second bandwidth) can be used to transfer memory Page 100, and another 50M (that is, the third bandwidth) is used to continue background active transmission, and transmit unsynchronized memory pages. As shown in Figure 4b.
优选地,上述第二带宽与第三带宽之和可以等于第一带宽。此即第一带宽一开始就在进行后台主动传输,该第一带宽值从未改变,那么此时,就可以将该第一带宽划分为传输缺页请求指示的内存页的第二带宽和继续进行后台主动传输的第三带宽。Preferably, the sum of the second bandwidth and the third bandwidth may be equal to the first bandwidth. That is to say, the first bandwidth is actively transferring in the background from the very beginning, and the value of the first bandwidth has never changed. At this time, the first bandwidth can be divided into the second bandwidth of transferring the memory page indicated by the page fault request and continuing Third bandwidth for background active transfers.
进一步地,第二带宽与第三带宽的比例可以是:源物理主机将第一的带宽的确定为第二带宽,将第一带宽的确定为第三带宽;其中,M为预先统计的一定时间段内发送缺失内存页所用的流量,N为该间段内发送待同步内存页所用的流量。Further, the ratio of the second bandwidth to the third bandwidth may be: the source physical host takes the ratio of the first bandwidth Determined as the second bandwidth, the first bandwidth's It is determined as the third bandwidth; wherein, M is the traffic used to send the missing memory page within a certain period of pre-statistics, and N is the traffic used to send the memory page to be synchronized within the period.
至此,可以看出,如果不调整带宽,则会出现后台传输占满整个网络带宽,而导致这段时间内产生的缺页请求得不到及时解决,正在运行的虚拟机会被中止运行,等待缺失页面从源物理主机传输过来。就会导致目标物理主机上的虚拟机停机等待的时间变长。如果为了能及时满足缺页需求,将第一带宽全部用于传输缺失页给目标物理主机,则后台主动传输将会受到限制,导致总迁移时间较长。因此,在源物理主机传输待同步内存页的同时合理分配带宽处理目标物理主机的缺页请求能够很好地解决上述问题。So far, it can be seen that if the bandwidth is not adjusted, the background transmission will occupy the entire network bandwidth, and the page fault requests generated during this period will not be resolved in time, and the running virtual machines will be suspended, waiting for missing pages. Pages are transferred from the source physical host. It will cause the virtual machine on the target physical host to stop and wait longer. If all the first bandwidth is used to transfer the missing page to the target physical host in order to meet the page fault requirement in time, the background active transfer will be limited, resulting in a longer total migration time. Therefore, reasonably allocating bandwidth to handle the page fault request of the target physical host while the source physical host transmits the memory pages to be synchronized can well solve the above problems.
206、源物理主机通过网络接口利用第二带宽向目标物理主机发送完缺失内存页后,源物理主机通过该网络接口利用当前可用带宽继续向目标物理主机发送虚拟机的待同步内存页。206. After the source physical host sends the missing memory page to the target physical host through the network interface using the second bandwidth, the source physical host continues to send the memory page to be synchronized of the virtual machine to the target physical host through the network interface using the currently available bandwidth.
其中,当前可用带宽大于等于第二带宽与第三带宽的带宽和。Wherein, the currently available bandwidth is greater than or equal to the sum of the second bandwidth and the third bandwidth.
例如,一个100M的带宽,在步骤203中全部用于后台主动传输,在步骤205中,用第二带宽50M传输缺页请求指示的内存页100,用第三带宽50M继续进行后台主动传输。本步骤中,当内存页100传输完成后,将当前能够利用的带宽再用来进行后台主动传输。例如,该50M带宽传输完内存页100后没有其他用途,则可以也用来进行后台传输,此时将有100M带宽用于进行后台主动传输。若该50M带宽传输完内存页100后,有10M用作其他数据传输,则剩余的40M可以用来进行后台传输,此时将有90M带宽用于进行后台主动传输。可以看出,本步骤中再次用于后台主动传输的带宽可以与原先第一带宽相等,也可能不等,这取决与当前的传输情况。For example, a bandwidth of 100M is used for background active transmission in step 203. In step 205, the memory page 100 indicated by the page fault request is transmitted with the second bandwidth of 50M, and background active transmission is continued with the third bandwidth of 50M. In this step, after the transfer of the memory page 100 is completed, the currently available bandwidth is reused for background active transfer. For example, if the 50M bandwidth has no other use after the memory page 100 is transferred, it can also be used for background transfer, and 100M bandwidth will be used for background active transfer at this time. If the 50M bandwidth transfers the memory page 100, 10M is used for other data transmission, then the remaining 40M can be used for background transmission, and 90M bandwidth will be used for background active transmission. It can be seen that, in this step, the bandwidth used for background active transmission again may be equal to or different from the original first bandwidth, which depends on the current transmission situation.
本发明实施例提供的虚拟机迁移方法,虚拟机从源物理主机迁移到目标物理主机,且在目标物理主机上恢复运行后,源物理主机会向目标物理主机传输未同步的内存页。在这一过程中,利用本发明实施例提供的方案,一旦虚拟机在目标物理主机上产生缺页,源物理主机收到缺页请求后就会用第二带宽传输缺页请求指示的缺失内存页,用第三带宽继续传输未同步的内存页。这样,一方面没有过多地影响未同步的内存页的传输,使得虚拟机迁移的总时长在合理范围内;另一方面,由于有了专用的第二带宽,保证了缺失内存页从源物理主机向目标物理主机的快速传输,减少了目标物理主机上虚拟机的停机时间,从而在整体上提高了虚拟机的迁移效率。In the virtual machine migration method provided by the embodiment of the present invention, the virtual machine is migrated from the source physical host to the target physical host, and after the virtual machine resumes operation on the target physical host, the source physical host will transfer unsynchronized memory pages to the target physical host. In this process, using the solution provided by the embodiment of the present invention, once the virtual machine generates a page fault on the target physical host, the source physical host will use the second bandwidth to transmit the missing memory indicated by the page fault request after receiving the page fault request page, using the third bandwidth to continue transferring unsynchronized memory pages. In this way, on the one hand, the transmission of unsynchronized memory pages is not too much affected, so that the total time of virtual machine migration is within a reasonable range; The fast transfer from the host to the target physical host reduces the downtime of the virtual machine on the target physical host, thereby improving the migration efficiency of the virtual machine as a whole.
此外,由于预先对内存页的被访问情况进行了统计与排序,常用内存页得到了较高的传输优先级,因而可以保证常用的内存页优先被传输到目标物理主机上供虚拟机使用,进而减少了虚拟机发生缺页的概率,也对减少停机时间、减少总迁移时间起到一定作用。In addition, due to the statistics and sorting of the memory pages being accessed in advance, the commonly used memory pages are given a higher transmission priority, so it can be guaranteed that the commonly used memory pages are preferentially transmitted to the target physical host for use by the virtual machine, and then It reduces the probability of page faults in virtual machines, and also plays a role in reducing downtime and total migration time.
在此说明,本发明实施例提供的虚拟机迁移方法除了适应于后拷贝迁移外,还适用于混合拷贝迁移,再次不做限定。也可以认为,本发明实施例提供的虚拟机迁移方法适用于任何远程调页(源物理主机向目标物理主机传输缺失内存页的过程)与后台主动传输(源物理主机主动向目标物理主机传输两者间未同步的内存页的过程)同时存在的数据传输场景。It is explained here that the virtual machine migration method provided by the embodiment of the present invention is not only suitable for post-copy migration, but also suitable for hybrid copy migration, which is not limited again. It can also be considered that the virtual machine migration method provided by the embodiment of the present invention is applicable to any remote paging (the process of transferring missing memory pages from the source physical host to the target physical host) and background active transfer (the source physical host actively transfers two memory pages to the target physical host). The process of unsynchronized memory pages between the two) data transfer scenarios that exist at the same time.
实施例3:Example 3:
本发明实施例提供一种虚拟机迁移装置3,部署在源物理主机上,能够应用于上述方法实施例中,执行方法实施例中的相应步骤。如图5所示,该虚拟机迁移装置3包括:The embodiment of the present invention provides a virtual machine migration device 3, which is deployed on the source physical host, and can be applied to the above method embodiments to execute corresponding steps in the method embodiments. As shown in Figure 5, the virtual machine migration device 3 includes:
后台传输模块301,用于通过网络接口利用带宽自适应模块304确定的第一带宽向目标物理主机发送虚拟机的待同步内存页;该虚拟机的待同步内存页为:存储在源物理主机中,在虚拟机迁移过程中未发送至目标物理主机的内存页。The background transmission module 301 is configured to send the memory page to be synchronized of the virtual machine to the target physical host by using the first bandwidth determined by the bandwidth adaptive module 304 through the network interface; the memory page to be synchronized of the virtual machine is: stored in the source physical host , memory pages that were not sent to the target physical host during virtual machine migration.
缺页请求接收模块302,用于通过网络接口接收目标物理主机发送的缺页请求;该缺页请求包含有缺失内存页的信息,该缺失内存页为虚拟机迁移到目标物理主机后,恢复运行后需要但未从源物理主机发送至目标物理主机的内存页。The page fault request receiving module 302 is configured to receive a page fault request sent by the target physical host through a network interface; the page fault request includes information about a missing memory page, and the missing memory page is for the virtual machine to resume operation after migrating to the target physical host Memory pages that are later needed but not sent from the source physical host to the target physical host.
远程调页模块303,用于根据缺页请求中包含的缺失内存页的信息,找到缺失内存页,通过网络接口利用带宽自适应模块304确定的第二带宽向目标物理主机发送该缺失内存页;后台传输模块301,还用于通过网络接口利用带宽自适应模块304确定的第三带宽向目标物理主机发送虚拟机的待同步内存页。其中,所述第二带宽、所述第三带宽均小于所述第一带宽。The remote paging module 303 is configured to find the missing memory page according to the information of the missing memory page included in the page fault request, and send the missing memory page to the target physical host through the network interface using the second bandwidth determined by the bandwidth adaptive module 304; The background transmission module 301 is further configured to send the memory page of the virtual machine to be synchronized to the target physical host by using the third bandwidth determined by the bandwidth adaptation module 304 through the network interface. Wherein, both the second bandwidth and the third bandwidth are smaller than the first bandwidth.
在本实施例中,后台传输模块301、远程调页模块303和带宽自适应模块304可以构成虚拟机迁移装置3的虚拟机缺页管理模块30。In this embodiment, the background transmission module 301 , the remote paging module 303 and the bandwidth adaptive module 304 may constitute the virtual machine page fault management module 30 of the virtual machine migration apparatus 3 .
在虚拟机从源物理主机迁移到目标物理主机,且在目标物理主机上恢复运行后,源物理主机会向目标物理主机传输未同步的内存页。在这一过程中,利用本发明实施例提供的虚拟机迁移装置,一旦虚拟机在目标物理主机上产生缺页,虚拟机迁移装置收到缺页请求后就会用第二带宽传输缺页请求指示的缺失内存页,用第三带宽继续传输未同步的内存页。这样,一方面没有过多地影响未同步的内存页的传输,使得虚拟机迁移的总时长在合理范围内;另一方面,由于有了专用的第二带宽,保证了缺失内存页从源物理主机向目标物理主机的快速传输,减少了目标物理主机上虚拟机的停机时间,从而在整体上提高了虚拟机的迁移效率。After the virtual machine is migrated from the source physical host to the target physical host and resumes running on the target physical host, the source physical host will transfer unsynchronized memory pages to the target physical host. In this process, using the virtual machine migration device provided by the embodiment of the present invention, once the virtual machine generates a page fault on the target physical host, the virtual machine migration device will use the second bandwidth to transmit the page fault request after receiving the page fault request The indicated missing memory page continues to transfer the unsynchronized memory page with the third bandwidth. In this way, on the one hand, the transmission of unsynchronized memory pages is not too much affected, so that the total time of virtual machine migration is within a reasonable range; The fast transfer from the host to the target physical host reduces the downtime of the virtual machine on the target physical host, thereby improving the migration efficiency of the virtual machine as a whole.
优选地,该带宽自适应模块304用于,根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中的比例,得到所述第二带宽;确定所述第三带宽在所述第一带宽中的比例,得到所述第三带宽。Preferably, the bandwidth adaptive module 304 is configured to determine the proportion of the second bandwidth in the first bandwidth according to a bandwidth adaptive allocation strategy to obtain the second bandwidth; determine the ratio of the third bandwidth in the first bandwidth; The ratio of the first bandwidth to the third bandwidth is obtained.
其中,所述带宽自适应分配策略包括:预设参数M以及预设参数N,预设参数M为预先统计的预设时间段内发送缺失内存页所用的流量,预设参数N为所述预设时间段内发送待同步内存页所用的流量;第一带宽、第二带宽、第三带宽这三者之间的关系包括以下情况:第二带宽与所述第三带宽之和等于所述第一带宽。或者,所述第二带宽与所述第三带宽之和大于所述第一带宽。或者,所述第二带宽与所述第三带宽之和小于所述第一带宽。Wherein, the adaptive bandwidth allocation strategy includes: a preset parameter M and a preset parameter N, the preset parameter M is the traffic used for sending missing memory pages within a pre-stated preset time period, and the preset parameter N is the preset parameter N. The traffic used to send the memory page to be synchronized within the time period; the relationship between the first bandwidth, the second bandwidth, and the third bandwidth includes the following situations: the sum of the second bandwidth and the third bandwidth is equal to the first bandwidth a bandwidth. Or, the sum of the second bandwidth and the third bandwidth is greater than the first bandwidth. Or, the sum of the second bandwidth and the third bandwidth is smaller than the first bandwidth.
优选地,该带宽自适应模块304具体用于,根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中比例为得到所述第二带宽,确定所述第三带宽在所述第一带宽中的比例为得到所述第三带宽。Preferably, the bandwidth adaptation module 304 is specifically configured to determine the proportion of the second bandwidth in the first bandwidth according to the bandwidth adaptive allocation strategy as Obtain the second bandwidth, determine the proportion of the third bandwidth in the first bandwidth as The third bandwidth is obtained.
优选地,该后台传输模块301还用于,当远程调页模块303通过网络接口利用第二带宽向目标物理主机发送完该缺失内存页后,通过网络接口利用当前可用带宽继续向目标物理主机发送虚拟机的待同步内存页。当前可用带宽大于等于第二带宽与第三带宽之和。Preferably, the background transmission module 301 is further configured to, after the remote paging module 303 sends the missing memory page to the target physical host through the network interface using the second bandwidth, continue sending the missing memory page to the target physical host through the network interface using the currently available bandwidth. The memory pages of the virtual machine to be synchronized. The current available bandwidth is greater than or equal to the sum of the second bandwidth and the third bandwidth.
优选地,如图6所示,该后台传输模块301还包括:Preferably, as shown in Figure 6, the background transmission module 301 also includes:
热页记录子模块3011,用于在后台传输模块301通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页之前,记录该虚拟机在源物理主机上运行时,各内存页被访问的次数或频率值。The hot page recording sub-module 3011 is configured to record the memory pages of each memory page when the virtual machine is running on the source physical host before the background transfer module 301 sends the memory pages to be synchronized of the virtual machine to the target physical host through the network interface using the first bandwidth. The number of visits or frequency value.
热页预取子模块3012,用于按照各内存页被访问的次数或频率值的降序顺序,通过网络接口利用第一带宽依次向目标物理主机发送虚拟机的待同步内存页。The hot page prefetch sub-module 3012 is configured to sequentially send the memory pages to be synchronized of the virtual machine to the target physical host through the network interface using the first bandwidth in descending order of the number of times or frequency values of each memory page being accessed.
在此,被访问次数多或频率值高的内存页经过降序排列后得到了较高的优先级,能够在之后的过程中被有限传输,那么就能够减小迁移后的虚拟机发生缺页的概率,减少停机时间。Here, memory pages with high access times or high frequency values are arranged in descending order with higher priority, and can be limitedly transmitted in the subsequent process, so that the chance of page faults in the migrated virtual machine can be reduced. probability and reduce downtime.
优选地,该热页预取子模块3012,具体用于每次通过网络接口利用第一带宽向目标物理主机发送虚拟机的一个未同步的第一内存页时,将该第一内存页地址之前的第二内存页、该第一内存页地址之后的第三内存页一同向目标物理主机发送。Preferably, the hot page prefetch sub-module 3012 is specifically configured to, each time an unsynchronized first memory page of the virtual machine is sent to the target physical host through the network interface using the first bandwidth, The second memory page and the third memory page following the address of the first memory page are sent to the target physical host together.
优选地,如图7所示,虚拟机迁移装置3还包括:Preferably, as shown in FIG. 7, the virtual machine migration device 3 further includes:
虚拟机状态管理模块305,用于停止虚拟机的运行。The virtual machine status management module 305 is configured to stop the running of the virtual machine.
关键信息发送模块306,用于向目标物理主机发送该虚拟机的关键数据,以便该虚拟机在目标物理主机上恢复运行;虚拟机的关键数据包括源物理主机CPU的状态信息、源物理主机的设备信息等。The key information sending module 306 is used to send the key data of the virtual machine to the target physical host, so that the virtual machine resumes operation on the target physical host; the key data of the virtual machine includes the state information of the CPU of the source physical host, the status information of the source physical host Device information, etc.
实施例4:Example 4:
本发明实施例提供一种源物理主机4,能够应用于上述方法实施例,执行方法实施例中对应的操作。如图8所示,该源物理主机4包括:The embodiments of the present invention provide a source physical host 4, which can be applied to the above method embodiments, and perform corresponding operations in the method embodiments. As shown in Figure 8, the source physical host 4 includes:
硬件层40,该硬件层一般包括CPU、内存、网卡等。A hardware layer 40, which generally includes a CPU, a memory, a network card, and the like.
在硬件层40运行的虚拟机监控单元VMM401,所述VMM401,用于通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页;虚拟机的待同步内存页为:存储在源物理主机中,在虚拟机迁移过程中未发送至目标物理主机的内存页。The virtual machine monitoring unit VMM401 running on the hardware layer 40 is used to send the memory page to be synchronized of the virtual machine to the target physical host by using the first bandwidth through the network interface; the memory page to be synchronized of the virtual machine is: stored in the source In the physical host, memory pages that are not sent to the target physical host during the virtual machine migration process.
通过网络接口接收目标物理主机发送的缺页请求;该缺页请求包含有缺失内存页的信息,所述缺失内存页为虚拟机迁移到目标物理主机后,恢复运行后需要但未从源物理主机发送至目标物理主机的内存页。Receive the page fault request sent by the target physical host through the network interface; the page fault request contains the information of the missing memory page, and the missing memory page is required after the virtual machine is migrated to the target physical host, but is not transferred from the source physical host Memory pages sent to the target physical host.
根据缺页请求中包含的缺失内存页的信息,找到缺失内存页,通过网络接口利用第二带宽向目标物理主机发送该缺失内存页;源物理主机通过网络接口利用第三带宽向目标物理主机发送虚拟机的待同步内存页。其中,所述第二带宽、所述第三带宽均小于所述第一带宽。Find the missing memory page according to the missing memory page information contained in the page fault request, and send the missing memory page to the target physical host through the network interface using the second bandwidth; the source physical host sends the missing memory page to the target physical host through the network interface using the third bandwidth The memory page of the virtual machine to be synchronized. Wherein, both the second bandwidth and the third bandwidth are smaller than the first bandwidth.
此外,该源物理主机4还包括:VMM401控制运行的至少一个从源物理主机迁移至目标物理主机的虚拟机41。In addition, the source physical host 4 further includes: at least one virtual machine 41 that is migrated from the source physical host to the target physical host and run under the control of the VMM 401 .
在虚拟机从源物理主机迁移到目标物理主机,且在目标物理主机上恢复运行后,源物理主机会向目标物理主机传输未同步的内存页。在这一过程中,利用本发明实施例提供的源物理主机,一旦虚拟机在目标物理主机上产生缺页,源物理主机收到缺页请求后就会用第二带宽传输缺页请求指示的缺失内存页,用第三带宽继续传输未同步的内存页。这样,一方面没有过多地影响未同步的内存页的传输,使得虚拟机迁移的总时长在合理范围内;另一方面,由于有了专用的第二带宽,保证了缺失内存页从源物理主机向目标物理主机的快速传输,减少了目标物理主机上虚拟机的停机时间,从而在整体上提高了虚拟机的迁移效率。After the virtual machine is migrated from the source physical host to the target physical host and resumes running on the target physical host, the source physical host will transfer unsynchronized memory pages to the target physical host. In this process, using the source physical host provided by the embodiment of the present invention, once the virtual machine generates a page fault on the target physical host, the source physical host will use the second bandwidth to transmit the page fault indicated by the page fault request after receiving the page fault request. Missing memory pages, continue to transfer unsynchronized memory pages with the third bandwidth. In this way, on the one hand, the transmission of unsynchronized memory pages is not too much affected, so that the total time of virtual machine migration is within a reasonable range; The fast transfer from the host to the target physical host reduces the downtime of the virtual machine on the target physical host, thereby improving the migration efficiency of the virtual machine as a whole.
优选地,所述VMM401,还用于根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中的比例,得到所述第二带宽;确定所述第三带宽在所述第一带宽中的比例,得到所述第三带宽。Preferably, the VMM401 is further configured to determine the proportion of the second bandwidth in the first bandwidth according to the adaptive bandwidth allocation strategy to obtain the second bandwidth; determine the proportion of the third bandwidth in the first bandwidth bandwidth in proportion to obtain the third bandwidth.
其中,所述带宽自适应分配策略包括:预设参数M以及预设参数N,所述预设参数M为预先统计的预设时间段内发送缺失内存页所用的流量,所述预设参数N为所述预设时间段内发送待同步内存页所用的流量;第一带宽、第二带宽、第三带宽之间的关系满足以下情况:所述第二带宽与所述第三带宽之和等于所述第一带宽。或者,所述第二带宽与所述第三带宽之和大于所述第一带宽。或者,所述第二带宽与所述第三带宽之和小于所述第一带宽。Wherein, the bandwidth adaptive allocation strategy includes: a preset parameter M and a preset parameter N, the preset parameter M is the traffic used for sending missing memory pages in a pre-stated preset time period, and the preset parameter N The traffic used to send the memory page to be synchronized within the preset time period; the relationship between the first bandwidth, the second bandwidth, and the third bandwidth satisfies the following conditions: the sum of the second bandwidth and the third bandwidth is equal to The first bandwidth. Or, the sum of the second bandwidth and the third bandwidth is greater than the first bandwidth. Or, the sum of the second bandwidth and the third bandwidth is smaller than the first bandwidth.
优选地,该VMM401具体用于,根据带宽自适应分配策略确定所述第二带宽在所述第一带宽中比例为得到所述第二带宽,确定所述第三带宽在所述第一带宽中的比例为得到所述第三带宽。Preferably, the VMM401 is specifically configured to determine the proportion of the second bandwidth in the first bandwidth according to the bandwidth adaptive allocation strategy as Obtain the second bandwidth, determine the proportion of the third bandwidth in the first bandwidth as The third bandwidth is obtained.
优选地,所述VMM401,还用于根据缺页请求中包含的缺失内存页的信息,找到该缺失内存页,通过网络接口利用第二带宽继续向所述目标物理主机发送完该缺失内存页后,源物理主机通过网络接口利用当前可用带宽向目标物理主机发送虚拟机的待同步内存页。其中,所述当前可用带宽大于等于所述第二带宽与所述第三带宽之和。Preferably, the VMM401 is further configured to find the missing memory page according to the information of the missing memory page included in the page fault request, and continue to send the missing memory page to the target physical host through the network interface using the second bandwidth , the source physical host sends the memory page to be synchronized of the virtual machine to the target physical host by using the currently available bandwidth through the network interface. Wherein, the currently available bandwidth is greater than or equal to the sum of the second bandwidth and the third bandwidth.
优选地,所述VMM401,在通过网络接口利用第一带宽向目标物理主机发送虚拟机的待同步内存页之前,还用于记录虚拟机迁移前在源物理主机上运行时,各内存页被访问的次数或频率值;按照各内存页被访问的次数或频率值的降序顺序,通过网络接口利用第一带宽依次向目标物理主机发送虚拟机的待同步内存页。Preferably, before the VMM401 sends the memory pages to be synchronized of the virtual machine to the target physical host through the network interface using the first bandwidth, it is also used to record when the virtual machine runs on the source physical host before migration, each memory page is accessed times or frequency values; according to the descending order of the number of times or frequency values of each memory page being accessed, the memory pages to be synchronized of the virtual machine are sequentially sent to the target physical host through the network interface using the first bandwidth.
优选地,所述VMM401,按照各内存页被访问的次数或频率值的降序顺序,通过网络接口利用第一带宽依次向目标物理主机发送虚拟机的待同步内存页的过程中,具体用于每次通过网络接口利用第一带宽向目标物理主机发送虚拟机的一个未同步的第一内存页时,将该第一内存页地址之前的第二内存页、该第一内存页地址之后的第三内存页一同向所述目标物理主机发送。Preferably, the VMM401, according to the descending order of the number of times or frequency values of each memory page, uses the first bandwidth to send the virtual machine's memory pages to be synchronized to the target physical host sequentially through the network interface, specifically for each When using the first bandwidth to send an unsynchronized first memory page of the virtual machine to the target physical host through the network interface for the first time, the second memory page before the address of the first memory page and the third memory page after the address of the first memory page The memory pages are sent to the target physical host together.
优选地,所述VMM401,在虚拟机从源物理主机迁移到目标物理主机,且在目标物理主机上恢复运行之前,还用于停止该虚拟机的运行,向目标物理主机发送虚拟机的关键数据,以便该虚拟机在目标物理主机上恢复运行;虚拟机的关键数据包括源物理主机中央处理器CPU的状态信息、源物理主机的设备信息。Preferably, the VMM401 is also used to stop the operation of the virtual machine and send key data of the virtual machine to the target physical host before the virtual machine is migrated from the source physical host to the target physical host and resumes operation on the target physical host , so that the virtual machine resumes running on the target physical host; the key data of the virtual machine includes the state information of the central processing unit CPU of the source physical host, and the device information of the source physical host.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.
Claims (21)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410374581.5A CN104156255B (en) | 2014-07-31 | 2014-07-31 | A kind of virtual machine migration method, virtual machine (vm) migration device and source physical host |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410374581.5A CN104156255B (en) | 2014-07-31 | 2014-07-31 | A kind of virtual machine migration method, virtual machine (vm) migration device and source physical host |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104156255A CN104156255A (en) | 2014-11-19 |
CN104156255B true CN104156255B (en) | 2017-10-17 |
Family
ID=51881761
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410374581.5A Active CN104156255B (en) | 2014-07-31 | 2014-07-31 | A kind of virtual machine migration method, virtual machine (vm) migration device and source physical host |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104156255B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106155782B (en) * | 2015-04-09 | 2019-06-25 | 联想(北京)有限公司 | Virtual machine migration method and device |
CN107735767B (en) | 2015-06-26 | 2022-02-11 | 英特尔公司 | Apparatus and method for virtual machine migration |
CN105808383B (en) * | 2016-03-11 | 2020-04-07 | 重庆大学 | Quick-response virtual machine checkpoint storage method |
CN108932149B (en) * | 2017-05-22 | 2023-11-17 | 中兴通讯股份有限公司 | Data transmission method and device |
CN107577518B (en) * | 2017-09-14 | 2021-05-04 | 郑州云海信息技术有限公司 | A virtual machine deployment method and device |
CN108776617A (en) * | 2018-06-08 | 2018-11-09 | 山东超越数控电子股份有限公司 | It is a kind of that target identification method is prefetched based on access frequency and dynamic priority |
CN109189545B (en) * | 2018-07-06 | 2021-03-30 | 烽火通信科技股份有限公司 | Implementation method and system for improving thermal migration reliability of virtual machine |
CN110188026B (en) * | 2019-05-31 | 2023-05-12 | 龙芯中科技术股份有限公司 | Method and device for determining missing parameters of fast table |
CN111611055B (en) * | 2020-05-27 | 2020-12-18 | 上海有孚智数云创数字科技有限公司 | Virtual equipment optimal idle time migration method and device and readable storage medium |
CN113590269A (en) * | 2021-08-12 | 2021-11-02 | 深圳威科软件科技有限公司 | Method, device and equipment for connecting cloud desktop and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101398768A (en) * | 2008-10-28 | 2009-04-01 | 北京航空航天大学 | Construct method of distributed virtual machine monitor system |
CN102262557A (en) * | 2010-05-25 | 2011-11-30 | 运软网络科技(上海)有限公司 | Method for constructing virtual machine monitor by bus architecture and performance service framework |
CN103257929A (en) * | 2013-04-18 | 2013-08-21 | 中国科学院计算技术研究所 | Virtual machine memory mapping method and system |
CN103744725A (en) * | 2013-12-24 | 2014-04-23 | 杭州华为数字技术有限公司 | Virtual machine management method and device |
CN103955399A (en) * | 2014-04-30 | 2014-07-30 | 华为技术有限公司 | Migrating method and device for virtual machine, as well as physical host |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8490091B2 (en) * | 2011-03-28 | 2013-07-16 | International Business Machines Corporation | Virtual machine placement to improve memory utilization |
-
2014
- 2014-07-31 CN CN201410374581.5A patent/CN104156255B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101398768A (en) * | 2008-10-28 | 2009-04-01 | 北京航空航天大学 | Construct method of distributed virtual machine monitor system |
CN102262557A (en) * | 2010-05-25 | 2011-11-30 | 运软网络科技(上海)有限公司 | Method for constructing virtual machine monitor by bus architecture and performance service framework |
CN103257929A (en) * | 2013-04-18 | 2013-08-21 | 中国科学院计算技术研究所 | Virtual machine memory mapping method and system |
CN103744725A (en) * | 2013-12-24 | 2014-04-23 | 杭州华为数字技术有限公司 | Virtual machine management method and device |
CN103955399A (en) * | 2014-04-30 | 2014-07-30 | 华为技术有限公司 | Migrating method and device for virtual machine, as well as physical host |
Non-Patent Citations (1)
Title |
---|
Post-copy based live virtual machine migration using adaptive pre-paging and dynamic self-ballooning;Michael R. Hines;《ACM Press》;20091231;第51-60页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104156255A (en) | 2014-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104156255B (en) | A kind of virtual machine migration method, virtual machine (vm) migration device and source physical host | |
US10572290B2 (en) | Method and apparatus for allocating a physical resource to a virtual machine | |
CN103530189B (en) | It is a kind of towards the automatic telescopic of stream data and the method and device of migration | |
CN115668886A (en) | Resource allocation and software execution for switch management | |
CN109684074B (en) | Physical machine resource allocation method and terminal equipment | |
CN107222531B (en) | Container cloud resource scheduling method | |
CN103338252B (en) | Realizing method of distributed database concurrence storage virtual request mechanism | |
WO2013163865A1 (en) | Virtual machine hot migration and deployment method, server and cluster system | |
US20180189084A1 (en) | Data flow affinity for heterogenous virtual machines | |
CN105024842A (en) | Method and device for capacity expansion of server | |
CN103064733A (en) | Cloud computing virtual machine live migration technology | |
CN104270421A (en) | A multi-tenant cloud platform task scheduling method supporting bandwidth guarantee | |
CN105607950A (en) | Virtual machine resource configuration method and apparatus | |
CN105786619B (en) | Virtual machine allocation method and device | |
US20140289728A1 (en) | Apparatus, system, method, and storage medium | |
WO2023173961A1 (en) | Memory allocation method and related product | |
US11954534B2 (en) | Scheduling in a container orchestration system utilizing hardware topology hints | |
CN104954452A (en) | Dynamic cipher card resource control method in virtualization environment | |
US10846125B2 (en) | Memory access optimization in a processor complex | |
CN104468379B (en) | Virtual Hadoop clustered nodes system of selection and device based on most short logical reach | |
CN110347473B (en) | Method and device for distributing virtual machines of virtualized network elements distributed across data centers | |
WO2015062390A1 (en) | Virtual machine migration method, device and system | |
CN105045745B (en) | A kind of FCoE read-writes processing system, processing method and exchange id distribution method | |
CN104468701B (en) | A kind of I/O service quality maintaining methods for isomery storage cluster system | |
CN107967172A (en) | A kind of Spark tasks dynamic migration method and system towards isomery storage |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20191223 Address after: 314400 No.11, Weisan Road, Nongfa District, Chang'an Town, Haining City, Jiaxing City, Zhejiang Province Patentee after: Haining hi tech Zone Science and Innovation Center Co.,Ltd. Address before: 510000 unit 2414-2416, building, No. five, No. 371, Tianhe District, Guangdong, China Patentee before: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd. Effective date of registration: 20191223 Address after: 510000 unit 2414-2416, building, No. five, No. 371, Tianhe District, Guangdong, China Patentee after: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |