[go: up one dir, main page]

CN107688484A - A kind of method and system of virtual machine (vm) migration - Google Patents

A kind of method and system of virtual machine (vm) migration Download PDF

Info

Publication number
CN107688484A
CN107688484A CN201710796339.0A CN201710796339A CN107688484A CN 107688484 A CN107688484 A CN 107688484A CN 201710796339 A CN201710796339 A CN 201710796339A CN 107688484 A CN107688484 A CN 107688484A
Authority
CN
China
Prior art keywords
virtual machine
controller
data
migration
disk
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.)
Pending
Application number
CN201710796339.0A
Other languages
Chinese (zh)
Inventor
孙京本
张会健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710796339.0A priority Critical patent/CN107688484A/en
Publication of CN107688484A publication Critical patent/CN107688484A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种虚拟机迁移的方法,包括:将虚拟机的操作系统安装至系统盘;其中,所述系统盘由第一控制器通过连接系统硬盘池得到;将所述虚拟机的业务数据存储至数据盘;其中,所述数据盘由所述第一控制器连接数据硬盘池得到;当检测到虚拟机迁移指令时,停止虚拟机的运行,并登录第二控制器连接所述系统硬盘池;利用所述系统硬盘池中的虚拟机镜像开启所述虚拟机并挂载所述数据盘;该方法能够实现快速迁移虚拟机,保持数据存储业务的负载均衡;本申请还公开了一种虚拟机迁移的系统,具有以上有益效果。

The present application discloses a method for migrating a virtual machine, including: installing the operating system of the virtual machine on a system disk; wherein, the system disk is obtained by the first controller by connecting to the system hard disk pool; The data is stored in a data disk; wherein, the data disk is obtained by connecting the first controller to the data hard disk pool; when a virtual machine migration instruction is detected, the operation of the virtual machine is stopped, and the second controller is logged in to connect to the system Hard disk pool; use the virtual machine image in the system hard disk pool to start the virtual machine and mount the data disk; this method can realize fast migration of virtual machines and maintain load balance of data storage services; this application also discloses a A virtual machine migration system has the above beneficial effects.

Description

一种虚拟机迁移的方法及系统Method and system for virtual machine migration

技术领域technical field

本发明涉及数据存储领域,特别涉及一种虚拟机迁移的方法及系统。The invention relates to the field of data storage, in particular to a method and system for virtual machine migration.

背景技术Background technique

随着科技的迅猛发展,数据存储技术在人类生产生活中扮演着重要的角色,人们对数据存储技术越来越重视。With the rapid development of science and technology, data storage technology plays an important role in human production and life, and people pay more and more attention to data storage technology.

对于运行在多控制器的虚拟化平台,每个控制器上会同时运行多个虚拟机。当其中一个控制器的虚拟机运行占用较多CPU和内存资源时,需要把该控制器上的部分虚拟机迁移到另外的控制器上,以实现负载均衡。For a virtualization platform running on multiple controllers, multiple virtual machines will run concurrently on each controller. When the virtual machines on one of the controllers occupy more CPU and memory resources, you need to migrate some of the virtual machines on the controller to another controller to achieve load balancing.

现有技术中,通过复制源控制器上虚拟机镜像到目的控制器上,首先在源控制器上停止虚拟机,然后复制虚拟机镜像到目的控制器上,在目的控制器上加载虚拟机镜像来启动虚拟机。但是这种虚拟机迁移技术的迁移速度较慢,影响相关业务的进行。In the prior art, by copying the virtual machine image on the source controller to the destination controller, first stop the virtual machine on the source controller, then copy the virtual machine image to the destination controller, and load the virtual machine image on the destination controller to start the virtual machine. However, the migration speed of this virtual machine migration technology is relatively slow, which affects the progress of related businesses.

因此,如何实现快速迁移虚拟机,是本领域技术人员目前需要解决的技术问题。Therefore, how to implement fast migration of virtual machines is a technical problem that those skilled in the art need to solve.

发明内容Contents of the invention

本申请的目的是提供一种虚拟机迁移的方法及系统,能够实现快速迁移虚拟机,保持数据存储业务的负载均衡。The purpose of the present application is to provide a method and system for virtual machine migration, which can realize fast migration of virtual machines and maintain load balance of data storage services.

为解决上述技术问题,本申请提供一种虚拟机迁移的方法,该方法包括:In order to solve the above technical problems, the present application provides a method for virtual machine migration, the method comprising:

将虚拟机的操作系统安装至系统盘;其中,所述系统盘由第一控制器通过连接系统硬盘池得到;Installing the operating system of the virtual machine to the system disk; wherein, the system disk is obtained by the first controller by connecting to the system hard disk pool;

将所述虚拟机的业务数据存储至数据盘;其中,所述数据盘由所述第一控制器连接数据硬盘池得到;storing the business data of the virtual machine in a data disk; wherein, the data disk is obtained by connecting the first controller to a data hard disk pool;

当检测到虚拟机迁移指令时,停止虚拟机的运行,并登录第二控制器连接所述系统硬盘池;When a virtual machine migration instruction is detected, stop the operation of the virtual machine, and log in to the second controller to connect to the system hard disk pool;

利用所述系统硬盘池中的虚拟机镜像开启所述虚拟机并挂载所述数据盘。The virtual machine image in the system hard disk pool is used to start the virtual machine and mount the data disk.

可选的,所述当检测到虚拟机迁移指令时,停止虚拟机的运行,并登录第二控制器连接所述系统硬盘池包括:Optionally, when a virtual machine migration instruction is detected, stopping the running of the virtual machine, and logging into the second controller to connect to the system hard disk pool includes:

当检测到所述虚拟机迁移指令时,停止所述虚拟机的运行,并关闭所述第一控制器;When detecting the virtual machine migration instruction, stop the running of the virtual machine, and shut down the first controller;

判断所述第二控制器剩余的CPU和内存是否符合所述虚拟机的规格;judging whether the remaining CPU and memory of the second controller meet the specifications of the virtual machine;

若是,则登录所述第二控制器通过iSCSI连接所述系统硬盘池。If yes, log in to the second controller to connect to the system hard disk pool through iSCSI.

可选的,还包括:Optionally, also include:

当所述虚拟机启动时,所述虚拟机自动挂载所述数据盘。When the virtual machine starts, the virtual machine automatically mounts the data disk.

本申请还提供了一种虚拟机迁移的系统,该系统包括:The present application also provides a virtual machine migration system, the system comprising:

系统安装模块,用于将虚拟机的操作系统安装至系统盘;其中,所述系统盘由第一控制器通过连接系统硬盘池得到;The system installation module is used to install the operating system of the virtual machine to the system disk; wherein, the system disk is obtained by the first controller by connecting to the system hard disk pool;

数据存储模块,用于将所述虚拟机的业务数据存储至数据盘;其中,所述数据盘由所述第一控制器连接数据硬盘池得到;A data storage module, configured to store the business data of the virtual machine in a data disk; wherein, the data disk is obtained by connecting the first controller to a data hard disk pool;

系统迁移模块,用于当检测到虚拟机迁移指令时,停止虚拟机的运行,并登录第二控制器连接所述系统硬盘池;A system migration module, configured to stop the operation of the virtual machine when a virtual machine migration instruction is detected, and log in to the second controller to connect to the system hard disk pool;

数据迁移模块,用于利用所述系统硬盘池中的虚拟机镜像开启所述虚拟机并挂载所述数据盘。The data migration module is configured to use the virtual machine image in the system hard disk pool to start the virtual machine and mount the data disk.

可选的,所述系统迁移模块包括:Optionally, the system migration module includes:

终止单元,用于当检测到所述虚拟机迁移指令时,停止所述虚拟机的运行,并关闭所述第一控制器;a termination unit, configured to stop the operation of the virtual machine and shut down the first controller when the virtual machine migration instruction is detected;

判断单元,用于判断所述第二控制器剩余的CPU和内存是否符合所述虚拟机的规格;a judging unit, configured to judge whether the remaining CPU and memory of the second controller meet the specification of the virtual machine;

链接单元,用于当所述CPU和所述内存符合所述虚拟机的所述规格时,登录所述第二控制器通过iSCSI连接所述系统硬盘池。A linking unit, configured to log in to the second controller to connect to the system hard disk pool through iSCSI when the CPU and the memory meet the specification of the virtual machine.

可选的,还包括:Optionally, also include:

自动挂载模块,用于当所述虚拟机启动时,所述虚拟机自动挂载所述数据盘。The automatic mounting module is used for automatically mounting the data disk by the virtual machine when the virtual machine is started.

本发明提供了一种虚拟机迁移的方法,将虚拟机的操作系统安装至系统盘;其中,所述系统盘由第一控制器通过连接系统硬盘池得到;将所述虚拟机的业务数据存储至数据盘;其中,所述数据盘由所述第一控制器连接数据硬盘池得到;当检测到虚拟机迁移指令时,停止虚拟机的运行,并登录第二控制器连接所述系统硬盘池;利用所述系统硬盘池中的虚拟机镜像开启所述虚拟机并挂载所述数据盘。The present invention provides a method for migrating a virtual machine. The operating system of the virtual machine is installed on a system disk; wherein, the system disk is obtained by the first controller by connecting to the system hard disk pool; and the business data of the virtual machine is stored To a data disk; wherein, the data disk is obtained by connecting the first controller to the data hard disk pool; when a virtual machine migration command is detected, stop the operation of the virtual machine, and log in to the second controller to connect to the system hard disk pool ; Use the virtual machine image in the system hard disk pool to start the virtual machine and mount the data disk.

本方法通过将虚拟机的操作系统安装至系统盘,将虚拟机的业务数据存储至数据盘实现了虚拟机的操作系统与业务数据的分离。在虚拟机迁移时,只需第二控制器通过iSCSI连接到系统盘就可以直接启动虚拟机,不再复制虚拟机镜像文件。该方法能够实现快速迁移虚拟机,保持数据存储业务的负载均衡。本申请同时还提供了一种虚拟机迁移的系统,具有上述有益效果,在此不再赘述。The method realizes the separation of the operating system of the virtual machine and the business data by installing the operating system of the virtual machine on the system disk and storing the business data of the virtual machine on the data disk. When the virtual machine is migrated, only the second controller needs to be connected to the system disk through iSCSI to start the virtual machine directly, without copying the virtual machine image file. This method can realize rapid migration of virtual machines and maintain load balance of data storage services. The present application also provides a system for migrating a virtual machine, which has the above beneficial effects, and will not be repeated here.

附图说明Description of drawings

为了更清楚地说明本申请实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present application more clearly, the following will briefly introduce the accompanying drawings used in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. As far as people are concerned, other drawings can also be obtained based on these drawings on the premise of not paying creative work.

图1为本申请实施例所提供的一种虚拟机迁移的方法的流程图;FIG. 1 is a flowchart of a method for migrating a virtual machine provided in an embodiment of the present application;

图2为本申请实施例所提供的另一种虚拟机迁移的方法的流程图;FIG. 2 is a flowchart of another method for migrating a virtual machine provided by an embodiment of the present application;

图3为本申请提供的一种虚拟机迁移的系统的结构示意图。FIG. 3 is a schematic structural diagram of a virtual machine migration system provided by the present application.

具体实施方式detailed description

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

下面请参见图1,图1为本申请实施例所提供的一种虚拟机迁移的方法的流程图;Please refer to FIG. 1 below. FIG. 1 is a flowchart of a method for migrating a virtual machine provided in an embodiment of the present application;

具体步骤可以包括:Specific steps can include:

步骤S101:将虚拟机的操作系统安装至系统盘;其中,所述系统盘由第一控制器通过连接系统硬盘池得到;Step S101: Install the operating system of the virtual machine to the system disk; wherein, the system disk is obtained by the first controller by connecting to the system hard disk pool;

其中,本方案是建立在承载虚拟机的两个控制器都可以通过网络连接到存储设备的基础上,存储设备的硬盘划分为系统硬盘池和数据硬盘池。将承载虚拟机的第一控制器连接系统硬盘池的方法有很多,通常来讲可以使用iSCSI(Internet Small ComputerSystem Interface,网络小型计算机系统接口)技术连接系统硬盘池得到系统盘。iSCSI技术是一种供硬件设备使用的可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI(Small Computer System Interface,小型计算机系统接口)协议,使其能够在诸如高速千兆以太网上进行路由选择。iSCSI技术是一种新储存技术,该技术是将现有SCSI接口与以太网络技术结合,使服务器可与使用IP网络的储存装置互相交换资料。Among them, this solution is based on the basis that both controllers carrying the virtual machine can be connected to the storage device through the network, and the hard disk of the storage device is divided into a system hard disk pool and a data hard disk pool. There are many ways to connect the first controller carrying the virtual machine to the system hard disk pool. Generally speaking, the iSCSI (Internet Small Computer System Interface, network small computer system interface) technology can be used to connect to the system hard disk pool to obtain the system disk. iSCSI technology is a SCSI instruction set used by hardware devices that can run on the upper layer of the IP protocol. This instruction set can implement the SCSI (Small Computer System Interface, small computer system interface) protocol on the IP network, enabling it to Routing over, for example, high-speed Gigabit Ethernet. iSCSI technology is a new storage technology that combines the existing SCSI interface with Ethernet technology to enable servers to exchange data with storage devices using IP networks.

经过上述的分析,第一控制器连接系统硬盘池得到系统盘,并将虚拟机的操作系统安装至系统盘。可以理解的是系统盘可以是在安装操作系统之前就已经存在的,即一个系统盘可以安装多个虚拟机的操作系统。可以理解的是虚拟机的操作系统可以有很多种,如Windows、Linux等等,此处并不多虚拟机的操作系统进行具体的限定,对于任何一种虚拟机的操作系统都可以适用于本步骤提到的操作。After the above analysis, the first controller connects to the system hard disk pool to obtain the system disk, and installs the operating system of the virtual machine to the system disk. It can be understood that the system disk may already exist before the operating system is installed, that is, one system disk may install the operating systems of multiple virtual machines. It can be understood that there can be many kinds of virtual machine operating systems, such as Windows, Linux, etc., and there are not many virtual machine operating systems to be specifically limited here, and any virtual machine operating system can be applied to this The operations mentioned in the steps.

值得注意的是,一般情况下虚拟机的操作系统所占据的空间都会小于系统盘的大小,但是由于系统盘能够容纳的虚拟机操作系统的空间也是有限的且可能存在一个系统盘承载多个虚拟机的情况。所以,在将虚拟机的操作系统安装至系统盘之前,可以先判断系统盘剩余空间是否能够容纳再安装一个虚拟机的操作系统。因此,可以在本步骤之前设置一个判断的步骤,判断系统盘是否有足够的空间安装操作系统。It is worth noting that in general, the space occupied by the operating system of the virtual machine will be smaller than the size of the system disk, but because the space of the virtual machine operating system that the system disk can accommodate is also limited, and there may be a system disk that hosts multiple virtual machines. machine condition. Therefore, before installing the operating system of the virtual machine to the system disk, it may be determined whether the remaining space of the system disk can accommodate another operating system of the virtual machine to be installed. Therefore, a judging step may be set before this step to judge whether the system disk has enough space to install the operating system.

步骤S102:将所述虚拟机的业务数据存储至数据盘;其中,所述数据盘由所述第一控制器连接数据硬盘池得到;Step S102: storing the business data of the virtual machine in a data disk; wherein, the data disk is obtained by connecting the first controller to a data hard disk pool;

其中,本步骤与步骤S101基本相同,只是本步骤将业务数据存储至数据盘。同样的,由第一控制器连接数据硬盘池得到数据盘可以是第一控制器通过iSCSI技术连接数据硬盘池得到数据盘。由于虚拟机在执行相关业务时会有大量的业数据产生(例如,虚拟机时做数据采集、视频拍摄之类的业务时,镜像文件非常巨大一般以GB(Gigabyte,千兆字节)甚至是TB(Terabyte,太字节,或百万兆字节)为单位进行数据文件存储,所以通常来讲业务数据所需要的空间是比安装操作系统所需要的空间大得多的。因此,数据盘比系统盘也要大得多。Wherein, this step is basically the same as step S101, except that the business data is stored in the data disk in this step. Similarly, the data disk obtained by connecting the first controller to the data disk pool may be that the first controller connects to the data disk pool through iSCSI technology to obtain the data disk. Because the virtual machine will generate a large amount of business data when performing related services (for example, when the virtual machine is used for data collection, video shooting and other services, the image file is very huge, generally in GB (Gigabyte, gigabyte) or even TB (Terabyte, terabyte, or megabyte) is used as a unit for data file storage, so generally speaking, the space required for business data is much larger than the space required for installing the operating system. Therefore, the data disk Much larger than the system disk.

由于系统盘和数据盘都是由存储设备硬盘划分得到的,所以在划分存储设备硬盘的时候应该注意划分的比例。值得注意的是,每一个虚拟机的操作系统的大小的变化不是十分明显的,而业务数据的存储是时常进行的并且业务数据存储的总量非常大。因此对于存储设备硬盘的划分的具体操作,可以由本领域的技术人员根据本方案的具体应用场景进行选择,此处不进行具体的限定。Since both the system disk and the data disk are obtained by dividing the hard disk of the storage device, attention should be paid to the division ratio when dividing the hard disk of the storage device. It should be noted that the change of the size of the operating system of each virtual machine is not very obvious, but the storage of business data is carried out frequently and the total amount of business data storage is very large. Therefore, the specific operation of dividing the hard disk of the storage device can be selected by those skilled in the art according to the specific application scenario of the solution, and no specific limitation is made here.

步骤S103:当检测到虚拟机迁移指令时,停止虚拟机的运行,并登录第二控制器连接所述系统硬盘池;Step S103: When a virtual machine migration instruction is detected, stop the running of the virtual machine, and log in to the second controller to connect to the system hard disk pool;

其中,由于每个控制器上会同时运行多个虚拟机,当其中一个控制器的虚拟机运行占用较多CPU和内存资源时需要执行虚拟机迁移的相关指令(即虚拟机迁移指令)。可以理解的是,虚拟机迁移指令可以是当检测到控制器无法承载该虚拟机时自动发送的指令,也可以是相关技术人员在分析控制器工作状况后人为发送的指令,当然还存在其他发送虚拟机迁移指令的方法,本领域的技术人员可以根据该方案的实际应用场景选择适当的方法。Wherein, since multiple virtual machines are running on each controller at the same time, when a virtual machine of one of the controllers runs and occupies more CPU and memory resources, it is necessary to execute a related instruction of virtual machine migration (ie, a virtual machine migration instruction). It can be understood that the virtual machine migration instruction may be an instruction sent automatically when it is detected that the controller cannot host the virtual machine, or it may be an instruction sent artificially by relevant technical personnel after analyzing the working condition of the controller. Of course, there are other instructions. As for the method of sending the virtual machine migration instruction, those skilled in the art can choose an appropriate method according to the actual application scenario of the solution.

虚拟机迁移是指虚拟机由原来架设在第一控制器转变为架设在第二控制器上,其中涉及虚拟机的操作系统的迁移与虚拟机业务数据的迁移。当检测到虚拟机迁移指令时,就说明此时虚拟机不再架设在第一控制器上,为了避免出现业务故障,因此在迁移虚拟机之前需要先登录第一控制器停止虚拟机的运行。可以理解的是,停止虚拟机运行的方法有很多种,本领域的技术人员可以根据本方案的实际应用场景进行具体的选择。Virtual machine migration means that the virtual machine is changed from being set up on the first controller to being set up on the second controller, which involves the migration of the operating system of the virtual machine and the migration of the business data of the virtual machine. When a virtual machine migration instruction is detected, it means that the virtual machine is no longer installed on the first controller. In order to avoid service failure, it is necessary to log in to the first controller to stop the running of the virtual machine before migrating the virtual machine. It can be understood that there are many methods for stopping the running of the virtual machine, and those skilled in the art can make a specific selection according to the actual application scenario of the solution.

本步骤中登录第二控制器连接系统硬盘池是默认第二控制器剩余的CPU和内存是能够满足虚拟机的相关规格的。当然,也可以在本步骤之前判断第二控制器是否满足相关条件,若满足相关条件则可以进行迁移,若不满足则选择其他控制器进行迁移。当然也可以在进行虚拟机迁移之前对所有的控制器进行筛选选择满足相关条件的控制器作为等待执行迁移相关操作的控制器。此处并不对控制器的选择方法进行限定,本领域的技术人员可以根据方案的具体应用场景选择适当的方法。In this step, log in to the second controller to connect to the system hard disk pool. By default, the remaining CPU and memory of the second controller can meet the relevant specifications of the virtual machine. Of course, it is also possible to determine whether the second controller satisfies relevant conditions before this step, and if the relevant conditions are met, migration can be performed, and if not, other controllers are selected for migration. Of course, it is also possible to screen all controllers before virtual machine migration and select a controller that satisfies relevant conditions as a controller waiting to perform migration-related operations. The selection method of the controller is not limited here, and those skilled in the art may select an appropriate method according to a specific application scenario of the solution.

登录第二控制器连接系统硬盘池就是将虚拟机的操作系统迁移到第二控制器,由于虚拟机内配置了自动连接iSCSI数据盘功能,每次启动虚拟机时,都能够自动挂载连接虚拟机的数据盘。Logging in to the second controller to connect to the system hard disk pool is to migrate the operating system of the virtual machine to the second controller. Since the function of automatically connecting to the iSCSI data disk is configured in the virtual machine, each time the virtual machine is started, it can automatically mount and connect to the virtual machine. machine's data disk.

步骤S104:利用所述系统硬盘池中的虚拟机镜像开启所述虚拟机并挂载所述数据盘;Step S104: using the virtual machine image in the system hard disk pool to start the virtual machine and mount the data disk;

其中,正如步骤S103所解释的,由于虚拟机内配置了自动连接iSCSI数据盘功能,每次启动虚拟机时,都能够自动挂载连接虚拟机的数据盘。登录第二控制器连接系统硬盘池可以通过硬盘池中的虚拟机镜像开启虚拟机,虚拟机启动之后,可以自动挂载数据盘就不需要传输大量的业务数据。Wherein, as explained in step S103, since the function of automatically connecting the iSCSI data disk is configured in the virtual machine, each time the virtual machine is started, the data disk connected to the virtual machine can be automatically mounted. Log in to the second controller to connect to the system hard disk pool, and start the virtual machine through the virtual machine image in the hard disk pool. After the virtual machine is started, the data disk can be automatically mounted without transferring a large amount of business data.

下面请参见图2,图2为本申请实施例所提供的另一种虚拟机迁移的方法的流程图;Please refer to FIG. 2 below. FIG. 2 is a flow chart of another method for virtual machine migration provided by the embodiment of the present application;

具体步骤可以包括:Specific steps can include:

步骤S201:将虚拟机的操作系统安装至系统盘;其中,所述系统盘由第一控制器通过连接系统硬盘池得到。Step S201: Install the operating system of the virtual machine to the system disk; wherein, the system disk is obtained by the first controller by connecting to the system hard disk pool.

步骤S202:将所述虚拟机的业务数据存储至数据盘;其中,所述数据盘由所述第一控制器连接数据硬盘池得到。Step S202: Store the business data of the virtual machine in a data disk; wherein the data disk is obtained by connecting the first controller to a data hard disk pool.

步骤S203:当检测到所述虚拟机迁移指令时,停止所述虚拟机的运行,并关闭所述第一控制器;Step S203: When the virtual machine migration instruction is detected, stop the running of the virtual machine, and shut down the first controller;

步骤S204:判断所述第二控制器剩余的CPU和内存是否符合所述虚拟机的规格;Step S204: judging whether the remaining CPU and memory of the second controller meet the specification of the virtual machine;

其中,判断第二控制器剩余CPU和内存是否符合虚拟机规格的标准是根据虚拟机内部存储数据的具体情况确定的,也就是说每台虚拟机所执行的相关业务是不同的,存储的业务数据的大小也是不同的,此外操作系统的大小也会存在差异,因此虚拟机的规格是一个不确定的量,在每一次迁移之前都要进行目标控制器剩余CPU和内存是否满足虚拟机规格的判断。Among them, the standard for judging whether the remaining CPU and memory of the second controller meet the specifications of the virtual machine is determined according to the specific conditions of the data stored inside the virtual machine, that is to say, the related services performed by each virtual machine are different, and the stored business The size of the data is also different, and the size of the operating system will also be different, so the specification of the virtual machine is an uncertain amount. Before each migration, it is necessary to check whether the remaining CPU and memory of the target controller meet the specifications of the virtual machine. judge.

步骤S205:若是,则登录所述第二控制器通过iSCSI连接所述系统硬盘池。Step S205: If yes, log in to the second controller to connect to the system hard disk pool through iSCSI.

步骤S206:利用所述系统硬盘池中的虚拟机镜像开启所述虚拟机并挂载所述数据盘。Step S206: Use the virtual machine image in the system hard disk pool to start the virtual machine and mount the data disk.

请参见图3,图3为本申请提供的一种虚拟机迁移的系统的结构示意图;Please refer to FIG. 3, which is a schematic structural diagram of a virtual machine migration system provided by the present application;

该系统可以包括:The system can include:

系统安装模块100,用于将虚拟机的操作系统安装至系统盘;其中,所述系统盘由第一控制器通过连接系统硬盘池得到;The system installation module 100 is configured to install the operating system of the virtual machine to the system disk; wherein, the system disk is obtained by the first controller by connecting to the system hard disk pool;

数据存储模块200,用于将所述虚拟机的业务数据存储至数据盘;其中,所述数据盘由所述第一控制器连接数据硬盘池得到;The data storage module 200 is configured to store the business data of the virtual machine in a data disk; wherein, the data disk is obtained by connecting the first controller to a data hard disk pool;

系统迁移模块300,用于当检测到虚拟机迁移指令时,停止虚拟机的运行,并登录第二控制器连接所述系统硬盘池;The system migration module 300 is configured to stop the operation of the virtual machine when a virtual machine migration instruction is detected, and log in to the second controller to connect to the system hard disk pool;

数据迁移模块400,用于利用所述系统硬盘池中的虚拟机镜像开启所述虚拟机并挂载所述数据盘。The data migration module 400 is configured to use the virtual machine image in the system hard disk pool to start the virtual machine and mount the data disk.

在本申请提供的另一种虚拟机迁移的系统的实施例中,所述系统迁移模块300包括:In another embodiment of a virtual machine migration system provided in this application, the system migration module 300 includes:

终止单元,用于当检测到所述虚拟机迁移指令时,停止所述虚拟机的运行,并关闭所述第一控制器;a termination unit, configured to stop the operation of the virtual machine and shut down the first controller when the virtual machine migration instruction is detected;

判断单元,用于判断所述第二控制器剩余的CPU和内存是否符合所述虚拟机的规格;a judging unit, configured to judge whether the remaining CPU and memory of the second controller meet the specifications of the virtual machine;

链接单元,用于当所述CPU和所述内存符合所述虚拟机的所述规格时,登录所述第二控制器通过iSCSI连接所述系统硬盘池。A linking unit, configured to log in to the second controller to connect to the system hard disk pool through iSCSI when the CPU and the memory meet the specification of the virtual machine.

进一步的,该系统还包括:Further, the system also includes:

自动挂载模块,用于当所述虚拟机启动时,所述虚拟机自动挂载所述数据盘。The automatic mounting module is used for automatically mounting the data disk by the virtual machine when the virtual machine is started.

由于系统部分的实施例与方法部分的实施例相互对应,因此系统部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, and details will not be repeated here.

说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。Each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related information, please refer to the description of the method part. It should be pointed out that those skilled in the art can make several improvements and modifications to the application without departing from the principles of the application, and these improvements and modifications also fall within the protection scope of the claims of the application.

还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的状况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is no such actual relationship or order between the operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

Claims (6)

  1. A kind of 1. method of virtual machine (vm) migration, it is characterised in that including:
    The operating system of virtual machine is attached to system disk;Wherein, the system disk is hard by connecting system by the first controller Pan Chi is obtained;
    The business datum of the virtual machine is stored to data disks;Wherein, the data disks connect number by first controller Obtained according to hard disk pond;
    When detecting virtual machine (vm) migration instruction, stop the operation of virtual machine, and it is hard to log in the second controller connection system Pan Chi;
    The virtual machine and data disks described in carry are opened using the virtual machine image in the system disk pond.
  2. 2. method according to claim 1, it is characterised in that it is described when detecting virtual machine (vm) migration instruction, stop virtual The operation of machine, and log in second controller and connect the system disk pond and include:
    When detecting the virtual machine (vm) migration instruction, stop the operation of the virtual machine, and close first controller;
    Judge whether the remaining CPU of the second controller and internal memory meet the specification of the virtual machine;
    If so, then log in the second controller connects the system disk pond by iSCSI.
  3. 3. method according to claim 2, it is characterised in that also include:
    When the virtual machine starts, data disks described in the automatic carry of virtual machine.
  4. A kind of 4. system of virtual machine (vm) migration, it is characterised in that including:
    System installs module, for the operating system of virtual machine to be attached into system disk;Wherein, the system disk is by the first control Device is obtained by connecting system disk pond;
    Data memory module, for the business datum of the virtual machine to be stored to data disks;Wherein, the data disks are by described First controller connection data hard disc pond obtains;
    System migration module, for when detecting virtual machine (vm) migration instruction, stopping the operation of virtual machine, and log in the second control Device connects the system disk pond;
    Data Migration module, for being opened using the virtual machine image in the system disk pond described in the virtual machine and carry Data disks.
  5. 5. system according to claim 4, it is characterised in that the system migration module includes:
    Unit is terminated, for when detecting the virtual machine (vm) migration instruction, stopping the operation of the virtual machine, and described in closing First controller;
    Judging unit, for judging whether the remaining CPU of the second controller and internal memory meet the specification of the virtual machine;
    Link unit, for when the CPU and the internal memory meet the specification of the virtual machine, logging in second control Device processed connects the system disk pond by iSCSI.
  6. 6. system according to claim 5, it is characterised in that also include:
    Automatic carry module, for when the virtual machine starts, data disks described in the automatic carry of virtual machine.
CN201710796339.0A 2017-09-06 2017-09-06 A kind of method and system of virtual machine (vm) migration Pending CN107688484A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710796339.0A CN107688484A (en) 2017-09-06 2017-09-06 A kind of method and system of virtual machine (vm) migration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710796339.0A CN107688484A (en) 2017-09-06 2017-09-06 A kind of method and system of virtual machine (vm) migration

Publications (1)

Publication Number Publication Date
CN107688484A true CN107688484A (en) 2018-02-13

Family

ID=61156130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710796339.0A Pending CN107688484A (en) 2017-09-06 2017-09-06 A kind of method and system of virtual machine (vm) migration

Country Status (1)

Country Link
CN (1) CN107688484A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112202856A (en) * 2020-09-18 2021-01-08 苏州浪潮智能科技有限公司 Method and device for data migration in network storage management system
WO2021184983A1 (en) * 2020-03-16 2021-09-23 华为技术有限公司 Virtual machine migration method, and related device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110131568A1 (en) * 2009-11-30 2011-06-02 Itamar Heim Mechanism for Live Migration of Virtual Machines with Memory Optimizations
CN102164184A (en) * 2011-04-22 2011-08-24 广州杰赛科技股份有限公司 Computer entity access and management method for cloud computing network and cloud computing network
CN102170474A (en) * 2011-04-22 2011-08-31 广州杰赛科技股份有限公司 Method and system for dynamic scheduling of virtual resources in cloud computing network
CN102177509A (en) * 2008-10-09 2011-09-07 微软公司 Virtualized storage assignment method
CN102185928A (en) * 2011-06-01 2011-09-14 广州杰赛科技股份有限公司 Method for creating virtual machine in cloud computing system and cloud computing system
CN102821158A (en) * 2012-08-20 2012-12-12 广州杰赛科技股份有限公司 Method and cloud system for realizing virtual machine migration
CN102841759A (en) * 2012-05-10 2012-12-26 天津兆民云计算科技有限公司 Memory system for ultra-large virtual machine cluster
CN104270409A (en) * 2014-09-04 2015-01-07 国云科技股份有限公司 Method for efficiently utilizing centralized storage in cloud platform
CN104618191A (en) * 2015-02-11 2015-05-13 杭州华三通信技术有限公司 Method and device for detecting communication fault between hosts and naked storage blocks
CN104679579A (en) * 2015-03-19 2015-06-03 杭州华三通信技术有限公司 Virtual machine migration method and device in cluster system
CN106603632A (en) * 2016-11-25 2017-04-26 国云科技股份有限公司 A virtual machine management method for reducing cloud platform start-up storm
CN106775924A (en) * 2016-11-07 2017-05-31 北京百度网讯科技有限公司 Virtual machine starts method and apparatus

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102177509A (en) * 2008-10-09 2011-09-07 微软公司 Virtualized storage assignment method
US20110131568A1 (en) * 2009-11-30 2011-06-02 Itamar Heim Mechanism for Live Migration of Virtual Machines with Memory Optimizations
CN102164184A (en) * 2011-04-22 2011-08-24 广州杰赛科技股份有限公司 Computer entity access and management method for cloud computing network and cloud computing network
CN102170474A (en) * 2011-04-22 2011-08-31 广州杰赛科技股份有限公司 Method and system for dynamic scheduling of virtual resources in cloud computing network
CN102185928A (en) * 2011-06-01 2011-09-14 广州杰赛科技股份有限公司 Method for creating virtual machine in cloud computing system and cloud computing system
CN102841759A (en) * 2012-05-10 2012-12-26 天津兆民云计算科技有限公司 Memory system for ultra-large virtual machine cluster
CN102821158A (en) * 2012-08-20 2012-12-12 广州杰赛科技股份有限公司 Method and cloud system for realizing virtual machine migration
CN104270409A (en) * 2014-09-04 2015-01-07 国云科技股份有限公司 Method for efficiently utilizing centralized storage in cloud platform
CN104618191A (en) * 2015-02-11 2015-05-13 杭州华三通信技术有限公司 Method and device for detecting communication fault between hosts and naked storage blocks
CN104679579A (en) * 2015-03-19 2015-06-03 杭州华三通信技术有限公司 Virtual machine migration method and device in cluster system
CN106775924A (en) * 2016-11-07 2017-05-31 北京百度网讯科技有限公司 Virtual machine starts method and apparatus
CN106603632A (en) * 2016-11-25 2017-04-26 国云科技股份有限公司 A virtual machine management method for reducing cloud platform start-up storm

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021184983A1 (en) * 2020-03-16 2021-09-23 华为技术有限公司 Virtual machine migration method, and related device
CN112202856A (en) * 2020-09-18 2021-01-08 苏州浪潮智能科技有限公司 Method and device for data migration in network storage management system
CN112202856B (en) * 2020-09-18 2022-12-02 苏州浪潮智能科技有限公司 Method and device for data migration in network storage management system

Similar Documents

Publication Publication Date Title
US10545781B2 (en) Dynamically deployed virtual machine
US9720784B2 (en) Cloud infrastructure backup in a shared storage environment
JP5840548B2 (en) Method and apparatus for improving resource utilization efficiency in a data center
US8843717B2 (en) Maintaining consistency of storage in a mirrored virtual environment
US8356147B2 (en) Tiered storage pool management and control for loosely coupled multiple storage environment
JP6054522B2 (en) Integrated storage / VDI provisioning method
US20150295790A1 (en) Management of virtual machine resources in computing environments
US20160092119A1 (en) Data migration between different types of storage systems
US20190334765A1 (en) Apparatuses and methods for site configuration management
US20150295789A1 (en) Management of virtual machine placement in computing environments
US9928056B1 (en) Operating system update management
US11343141B2 (en) Methods and apparatus to migrate physical server hosts between virtual standard switches and virtual distributed switches in a network
JP2012104097A (en) Latency reduction associated with response to request in storage system
US11893407B2 (en) Overlay container storage driver for microservice workloads
JP2008269600A (en) Method, apparatus and program for managing migration of logical partition
CN107193499A (en) A kind of moving method and device of container data volume
CN105278874A (en) Big data platform system and running method therefor
US9841983B2 (en) Single click host maintenance
US10623526B2 (en) Dynamically configuring multi-mode hardware components based on workload requirements
CN107688484A (en) A kind of method and system of virtual machine (vm) migration
US9935824B2 (en) Virtualization of consistency groups
US10664364B2 (en) Transferring a server configuration parameter along with a workload
US11252232B2 (en) NVME-of queue management in host clusters
US11175848B2 (en) Self-determination for in-progress volume draining
Zhang et al. DLSM: Decoupled Live Storage Migration with Distributed Device Mapper Storage

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180213

RJ01 Rejection of invention patent application after publication