CN111124615A - Virtual machine migration method, device, equipment and computer readable storage medium - Google Patents

Virtual machine migration method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111124615A
CN111124615A CN201911332536.2A CN201911332536A CN111124615A CN 111124615 A CN111124615 A CN 111124615A CN 201911332536 A CN201911332536 A CN 201911332536A CN 111124615 A CN111124615 A CN 111124615A
Authority
CN
China
Prior art keywords
virtual machine
migrated
migration
disk
local
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
CN201911332536.2A
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.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data 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 Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN201911332536.2A priority Critical patent/CN111124615A/en
Publication of CN111124615A publication Critical patent/CN111124615A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/128Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Abstract

The application discloses a virtual machine migration method, which comprises the steps of determining a virtual machine to be migrated according to a received migration instruction; determining a source host corresponding to the virtual machine to be migrated; acquiring the disk data of the virtual machine to be migrated in the source host by using a preset snapshot termination strategy; writing the disk data into a local disk file; starting the virtual machine to be migrated by using the local disk file; the virtual machine migration method can effectively avoid service interruption in the virtual machine migration process, and ensures user experience. The application also discloses a virtual machine migration device, equipment and a computer readable storage medium, which have the beneficial effects.

Description

Virtual machine migration method, device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of virtualization technologies, and in particular, to a virtual machine migration method, and further relates to a virtual machine migration apparatus, a device, and a computer-readable storage medium.
Background
With the continuous development of cloud computing technology, new applications of various new technologies are emerging. As for the virtual machine, the implementation modes of manufacturers are different, and the virtual machine presents a state of hundreds of flowers. At present, there is no unified standard for the development of VMM (Virtual Machine Monitor), and different virtualization vendors, especially non-open vendors, have developed VMMs in one set, and various technical genres coexist.
However, the coexistence of multiple heterogeneous systems of a virtualization client not only increases the operation cost, but also makes the later system maintenance and upgrade difficult, and data disaster recovery and other redundancy and complexity, and in some scenarios, virtual machine migration or conversion needs to be performed in a heterogeneous environment to implement operation upgrade or service migration, and at this time, the V2V technology needs to be used, and V2V is a way to migrate virtual machines of different platforms by various means. However, the existing virtual machine migration technology needs to interrupt the service and then perform virtual machine migration, which brings a bad experience to the user.
Therefore, how to avoid service interruption in the virtual machine migration process and ensure user experience is a problem to be urgently solved by those skilled in the art.
Disclosure of Invention
The virtual machine migration method can effectively avoid service interruption in the virtual machine migration process, and ensures user experience; another object of the present application is to provide a virtual machine migration apparatus, a device and a computer readable storage medium, which also have the above beneficial effects.
In order to solve the above technical problem, the present application provides a virtual machine migration method, where the virtual machine migration method includes:
determining a virtual machine to be migrated according to the received migration instruction;
determining a source host corresponding to the virtual machine to be migrated;
acquiring the disk data of the virtual machine to be migrated in the source host by using a preset snapshot termination strategy;
writing the disk data into a local disk file;
and starting the virtual machine to be migrated by using the local disk file.
Preferably, the determining the virtual machine to be migrated according to the received migration instruction includes:
sending a virtual machine cluster information acquisition request to a virtual machine management site according to the received migration instruction;
receiving virtual machine cluster information which is requested to be fed back and acquired by the virtual machine management station according to the virtual machine cluster information;
sending the virtual machine cluster information to a display interface for displaying;
and determining the virtual machine to be migrated in the virtual machine cluster information according to the received interface click instruction.
Preferably, the obtaining, in the source host, the disk data of the virtual machine to be migrated by using a preset snapshot termination policy includes:
and carrying out a preset number of snapshots on the disk file of the virtual machine to be migrated in the source host to obtain the disk data.
Preferably, the obtaining, in the source host, the disk data of the virtual machine to be migrated by using a preset snapshot termination policy includes:
snapshotting the disk file of the virtual machine to be migrated in the source host according to the size of a preset data block to obtain a disk data block;
and judging whether the difference value between the disk data block obtained by the current snapshot and the disk data obtained by the previous snapshot is lower than a preset threshold value, if so, stopping the snapshot, otherwise, continuing to snapshot the disk file until the difference value of the data block is lower than the preset threshold value, and obtaining the disk data.
Preferably, the writing the disk data into the local disk file includes:
and writing the disk data into the local disk file by OPENSL.
Preferably, before writing the disk data into the local disk file, the method further includes:
and checking the local virtual machine environment, judging whether the local virtual machine environment meets the migration condition, and if so, executing the step of writing the disk data into the local disk file.
Preferably, after the virtual machine to be migrated is started by using the local disk file, the method further includes:
and performing format conversion on the local disk file to obtain the local disk file supported by the local virtual machine environment.
In order to solve the above technical problem, the present application further provides a virtual machine migration apparatus, where the virtual machine migration apparatus includes:
the virtual machine determining module is used for determining the virtual machine to be migrated according to the received migration instruction;
a source host determining module, configured to determine a source host corresponding to the virtual machine to be migrated;
a disk data obtaining module, configured to obtain disk data of the virtual machine to be migrated in the source host by using a preset snapshot termination policy;
the disk data migration module is used for writing the disk data into a local disk file;
and the virtual machine starting module is used for starting the virtual machine to be migrated by utilizing the local disk file.
In order to solve the above technical problem, the present application further provides a virtual machine migration device, where the virtual machine migration device includes:
a memory for storing a computer program;
and the processor is used for realizing the steps of any one of the virtual machine migration methods when the computer program is executed.
In order to solve the above technical problem, the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the above virtual machine migration methods are implemented.
The virtual machine migration method comprises the steps of determining a virtual machine to be migrated according to a received migration instruction; determining a source host corresponding to the virtual machine to be migrated; acquiring the disk data of the virtual machine to be migrated in the source host by using a preset snapshot termination strategy; writing the disk data into a local disk file; and starting the virtual machine to be migrated by using the local disk file.
Therefore, according to the virtual machine migration method provided by the application, after the virtual machine to be migrated is determined, migration of disk data from the source host to the destination host is achieved in a snapshot mode, online migration of the virtual machine is further achieved, further, the virtual machine can be guaranteed to normally run in the migration process through online migration, the source host provides service in the initial migration stage, the destination host takes over the service after having necessary resources for running a system, the migration process is transparent relative to a user, only very short downtime exists in the migration process, service interruption can be effectively avoided, and user experience is guaranteed.
The virtual machine migration apparatus, the device and the computer-readable storage medium provided by the present application all have the above beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a virtual machine migration method provided in the present application;
fig. 2 is a schematic structural diagram of a virtual machine migration apparatus provided in the present application;
fig. 3 is a schematic structural diagram of a virtual machine migration apparatus provided in the present application.
Detailed Description
The core of the application is to provide a virtual machine migration method, which can effectively avoid service interruption in the virtual machine migration process and ensure user experience; another core of the present application is to provide a virtual machine migration apparatus, a server, and a computer-readable storage medium, which also have the above beneficial effects.
In order to make the objects, 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 with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the prior art, when virtual machine migration is required, the virtual machine migration is performed after service interruption, which brings a poor experience to users. Therefore, in order to solve the technical problem, the application provides a virtual machine migration method, which can realize migration of disk data from a source host to a destination host in a snapshot manner after determining a virtual machine to be migrated, and further realize online migration of the virtual machine, further, online migration can ensure normal operation of the virtual machine in the migration process, the source host provides service at the initial stage of migration, the destination host takes over the service after having necessary resources for operating a system, the migration process is transparent relative to a user, the migration process has only very short downtime, service interruption can be effectively avoided, and user experience is ensured.
Referring to fig. 1, fig. 1 is a schematic flow chart of a virtual machine migration method provided in the present application, where the virtual machine migration method may include:
s101: determining a virtual machine to be migrated according to the received migration instruction;
this step is intended to enable the determination of the virtual machine to be migrated. Specifically, the number of virtual machines set in the virtual machine management system is not unique, and the number of virtual machines set in the host is also not unique, so that, in order to implement migration of a virtual machine, a virtual machine that needs to be migrated, that is, the virtual machine to be migrated, needs to be determined from a plurality of virtual machines, and the determination process of the virtual machine to be migrated can be implemented based on a received migration instruction, for example, the migration instruction carries relevant information of the virtual machine to be migrated, so that the determination of the virtual machine to be migrated can be implemented by an instruction parsing technology; the information analysis technique may adopt any one of the prior arts, and is not described herein again.
Preferably, the determining the virtual machine to be migrated according to the received migration instruction may include: sending a virtual machine cluster information acquisition request to a virtual machine management site according to the received migration instruction; receiving virtual machine cluster information which is requested to be fed back and obtained by a virtual machine management station according to the virtual machine cluster information; sending the virtual machine cluster information to a display interface for displaying; and determining the virtual machine to be migrated in the virtual machine cluster information according to the received interface click instruction.
The preferred embodiment provides a more specific method for determining a virtual machine to be migrated, where a virtual machine management site is generally set in a virtual machine management system and used to manage all virtual machines in the system, and therefore, the virtual machine management site stores relevant information of all virtual machines in the system, and under this condition, a virtual machine cluster information acquisition request may be initiated to the virtual machine management site so as to obtain virtual machine cluster information therefrom, and further, the virtual machine cluster information is sent to a display interface for display, so that a user may select virtual machine information to be migrated from a large amount of virtual machine information according to actual needs, and further, the determination of the virtual machine to be migrated is achieved by clicking the interface. The acquisition of the virtual machine cluster information can be realized based on a web api interface, so that the selection and determination of the virtual machine to be migrated are realized in a web access mode.
S102: determining a source host corresponding to a virtual machine to be migrated;
the step aims to realize the determination of the source host corresponding to the virtual machine to be migrated, wherein the virtual machine is realized based on the host equipment of the entity, and the source host is the host to which the virtual machine to be migrated belongs. In a specific implementation process, after virtual machine cluster information is obtained from a virtual machine management site and information of a virtual machine to be migrated is determined from the virtual machine cluster information, relevant information of a source host corresponding to the virtual machine to be migrated can be obtained from the information of the virtual machine to be migrated, and therefore the determination of the source host is achieved.
S103: acquiring the disk data of the virtual machine to be migrated in the source host by using a preset snapshot termination strategy;
the step aims to realize the acquisition of the disk data of the virtual machine to be migrated, and is realized based on a snapshot technology. Specifically, a snapshot termination policy may be preset, so as to perform snapshot on the disk file corresponding to the virtual machine to be migrated from the source host based on the preset snapshot termination policy, and when a snapshot termination condition in the preset snapshot termination policy is satisfied, the snapshot may be stopped, so as to obtain corresponding disk data. The specific content of the preset snapshot termination strategy is not unique, and the user can set the preset snapshot termination strategy according to actual requirements, which is not limited in the application.
Preferably, the obtaining, in the source host, the disk data of the virtual machine to be migrated using the preset snapshot termination policy may include: and carrying out a preset number of snapshots on the disk file of the virtual machine to be migrated in the source host to obtain disk data.
The preferred embodiment provides a specific type of preset snapshot termination policy, that is, the number of snapshots, that is, the preset number, is directly set, so that the disk file of the virtual machine to be migrated in the source host is snapshot for the preset number of times to obtain the disk data block after each snapshot, thereby obtaining the disk data. The value of the preset number is not unique and can be set according to the size of the disk file, and the method is not limited in the application.
Preferably, the obtaining, in the source host, the disk data of the virtual machine to be migrated using the preset snapshot termination policy may include: snapshotting a disk file of a virtual machine to be migrated in a source host according to the size of a preset data block to obtain a disk data block; and judging whether the difference value between the disk data block obtained by the current snapshot and the disk data obtained by the previous snapshot is lower than a preset threshold value, if so, stopping the snapshot, otherwise, continuing to snapshot the disk file until the difference value of the data block is lower than the preset threshold value, and obtaining the disk data.
The preferred embodiment provides another specific type of preset snapshot termination policy, specifically, the size of a data block that is subjected to snapshot each time, that is, the size of the preset data block, and snapshots the disk file according to the size of the preset data block to obtain a data block after each snapshot, and at the same time, the size of the data block obtained after two adjacent snapshots is monitored, and when the difference between the two data blocks, that is, the difference between the two data blocks is lower than a preset threshold, it is indicated that the data block in the disk file has been completely snapshot, at this time, the snapshot is stopped, otherwise, the snapshot of the disk file is continued until the difference between the data blocks after the snapshot is lower than the preset threshold, so as to achieve the acquisition of the disk data. It can be understood that the values of the preset data block size and the preset threshold do not affect the implementation of the technical solution, and the user may set the values according to the actual situation, which is not limited in the present application.
It should be noted that the two preset snapshot termination policies are only two implementation manners provided in the present application, and are not unique, and may also be termination policies based on snapshot time or based on a combination of snapshot times and snapshot time. Of course, the selection and parameter setting of the termination policy and the network bandwidth of the user determine the time length required for the migration of the virtual machine.
S104: writing the disk data into a local disk file;
the step aims to realize the writing of the disk data, namely, the disk data obtained through the snapshot is written into a local disk file, wherein the local disk file is a disk file which is pre-established locally and is used for storing the disk data of the virtual machine to be migrated, namely, the disk file of the target host. The creating process of the local disk file is as follows: after the virtual machine to be migrated is determined, the number of disks of the virtual machine to be migrated on the source host can be further determined, and then the same number of disks are created locally, so that the local disk file can be obtained.
Preferably, the writing the disk data into the local disk file may include: and writing the disk data into the local disk file by using OPENSL (Open secure sockets Layer).
The preferred embodiment provides a more specific method for writing disk data, that is, the method is implemented in an OPENSSL manner. OPENSSL is a secure socket layer cryptographic library, including a main cryptographic algorithm, a common key and certificate encapsulation management function, an SSL protocol, and the like, thereby implementing transmission of disk data to a destination host in an encrypted state and writing the disk data into a local disk file based on OPENSSL technology, and further ensuring data security.
S105: and starting the virtual machine to be migrated by using the local disk file.
Specifically, after the disk data is completely written into the local disk file, the virtual machine to be migrated can be directly started by using the local disk file, so that the virtual machine to be migrated is migrated.
Preferably, before writing the disk data into the local disk file, the method may further include: and checking the local virtual machine environment, judging whether the local virtual machine environment meets the migration condition, and if so, executing the step of writing the disk data into the local disk file.
The preferred embodiment aims to verify the environment of the local virtual machine so as to ensure that the local environment meets the migration condition of the virtual machine, and only under the condition that the environment of the local virtual machine meets the migration condition, the disk data can be written into the local disk file, so that the virtual machine migration is realized. The checking of the local virtual machine environment may include checking of relevant resources such as a CPU, a memory, and a disk. Furthermore, if the local virtual machine environment does not meet the virtual machine migration condition, the related exception can be recorded through the log, and the virtual machine migration is terminated.
Preferably, after the starting of the virtual machine to be migrated by using the local disk file, the method may further include: and carrying out format conversion on the local disk file to obtain the local disk file supported by the local virtual machine environment.
The preferred embodiment aims to realize format conversion of a local disk file, generally, for the local disk file written with disk data, the format of the local disk file is still the disk file format of a virtual machine to be migrated on a source host, and in order to ensure that the local environment supports the operation of the local disk file, after the virtual machine is started by using the local disk file, format conversion can be performed on the local disk file to obtain the disk file in the format supported by the local virtual machine environment, so as to ensure the normal operation of the virtual machine.
According to the virtual machine migration method provided by the embodiment of the application, after the virtual machine to be migrated is determined, migration of disk data from a source host to a destination host is achieved in a snapshot mode, and then online migration of the virtual machine is achieved.
On the basis of the foregoing embodiments, taking migrating a virtual machine from VMware to KVM as an example, the present application provides a more specific virtual machine migration method, which is implemented as follows:
adding a VMware virtual machine management site address into a management system to which a target host belongs, and acquiring relevant information (virtual machine cluster information) of a virtual machine cluster managed by the VMware virtual machine management site from the management site through webapi to display the information; further, after the virtual machine to be migrated is selected, sequentially further acquiring information of a host (a source host) and a storage pool (disk file information) to which the virtual machine to be migrated belongs;
step two, checking whether related resources such as a CPU, a memory, a disk and the like in a target host environment meet migration conditions, if the related resources pass the checking, turning to step three, otherwise, throwing the system out the exception, recording related exception information through a log, and terminating the migration;
step three, according to the number of the disks of the virtual machine to be migrated, creating local disks with corresponding number on the target host; meanwhile, starting a snapshot at a source host, executing multiple snapshots based on a preset snapshot termination strategy, acquiring a disk incremental data block between adjacent snapshots and writing the disk incremental data block into a corresponding disk file (local disk file) on a target host; wherein, the termination strategy determines the times of snapshot, which mainly aims at minimizing the data loss in the migration process; in addition, the termination policy is not unique, for example, the number of snapshots may be directly limited, or an absolute change in the size of the disk incremental data between two adjacent snapshots may be monitored, and a snapshot may be terminated when the number is lower than a threshold value;
and step four, starting the virtual machine to be migrated in the target host environment, and performing format conversion on the local disk file, so as to finish virtual machine migration.
It can be seen that, according to the virtual machine migration method provided in the embodiment of the present application, after the virtual machine to be migrated is determined, migration of disk data from the source host to the destination host is achieved in a snapshot manner, and then online migration of the virtual machine is achieved, further, online migration can ensure that the virtual machine operates normally in the migration process, the source host provides service at the initial stage of migration, the destination host takes over the service after having necessary resources for operating the system, the migration process is transparent to a user, and the migration process has only very short downtime, so that service interruption can be effectively avoided, and user experience is ensured.
To solve the above problem, please refer to fig. 2, where fig. 2 is a schematic structural diagram of a virtual machine migration apparatus provided in the present application, and the virtual machine migration apparatus may include:
a virtual machine determining module 10, configured to determine a virtual machine to be migrated according to the received migration instruction;
a source host determining module 20, configured to determine a source host corresponding to a virtual machine to be migrated;
a disk data obtaining module 30, configured to obtain disk data of the virtual machine to be migrated in the source host by using a preset snapshot termination policy;
a disk data migration module 40, configured to write disk data into a local disk file;
and the virtual machine starting module 50 is configured to start the virtual machine to be migrated by using the local disk file.
It can be seen that, with the virtual machine migration apparatus provided in the embodiment of the present application, after determining a virtual machine to be migrated, migration of disk data from a source host to a destination host is implemented in a snapshot manner, so as to implement online migration of the virtual machine, further, online migration can ensure that the virtual machine operates normally in the migration process, the source host provides a service at an initial stage of migration, and the destination host takes over the service after having necessary resources for operating a system, and the migration process is transparent to a user, and only a very short downtime occurs in the migration process, so that service interruption can be effectively avoided, and user experience is ensured.
As a preferred embodiment, the virtual machine determination module 10 may include:
the request sending unit is used for sending a virtual machine cluster information acquisition request to the virtual machine management site according to the received migration instruction;
the information acquisition unit is used for receiving virtual machine cluster information fed back by the virtual machine management station according to the virtual machine cluster information acquisition request;
the information display unit is used for sending the virtual machine cluster information to a display interface for displaying;
and the virtual machine determining unit is used for determining the virtual machine to be migrated in the virtual machine cluster information according to the received interface click instruction.
As a preferred embodiment, the disk data obtaining module 30 may be specifically configured to perform a preset number of snapshots on a disk file of the virtual machine to be migrated in the source host to obtain disk data.
As a preferred embodiment, the disk data obtaining module 30 may be specifically configured to snapshot a disk file of a to-be-migrated virtual machine in a source host according to a size of a preset data block, so as to obtain a disk data block; and judging whether the difference value between the disk data block obtained by the current snapshot and the disk data obtained by the previous snapshot is lower than a preset threshold value, if so, stopping the snapshot, otherwise, continuing to snapshot the disk file until the difference value of the data block is lower than the preset threshold value, and obtaining the disk data.
As a preferred embodiment, the disk data migration module 40 may be specifically configured to write the disk data to the local disk file by OPENSSL.
As a preferred embodiment, the virtual machine migration apparatus may further include an environment checking module, configured to check the local virtual machine environment before the disk data is written into the local disk file, determine whether the local virtual machine environment meets the migration condition, and if so, execute the step of writing the disk data into the local disk file.
As a preferred embodiment, the virtual machine migration apparatus may further include a disk file conversion module, configured to perform format conversion on the local disk file after the virtual machine to be migrated is started by using the local disk file, so as to obtain the local disk file supported by the local virtual machine environment.
For the introduction of the apparatus provided in the present application, please refer to the above method embodiments, which are not described herein again.
To solve the above problem, please refer to fig. 3, where fig. 3 is a schematic structural diagram of a virtual machine migration apparatus provided in the present application, and the virtual machine migration apparatus may include:
a memory 10 for storing a computer program;
the processor 20, when executing the computer program, may implement the steps of any of the virtual machine migration methods described above.
For the introduction of the device provided in the present application, please refer to the above method embodiment, which is not described herein again.
To solve the above problem, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, can implement the steps of any one of the virtual machine migration methods described above.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided in the present application, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The virtual machine migration method, apparatus, device and computer-readable storage medium provided in the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and these improvements and modifications also fall into the elements of the protection scope of the claims of the present application.

Claims (10)

1. A virtual machine migration method is characterized by comprising the following steps:
determining a virtual machine to be migrated according to the received migration instruction;
determining a source host corresponding to the virtual machine to be migrated;
acquiring the disk data of the virtual machine to be migrated in the source host by using a preset snapshot termination strategy;
writing the disk data into a local disk file;
and starting the virtual machine to be migrated by using the local disk file.
2. The virtual machine migration method according to claim 1, wherein the determining, according to the received migration instruction, the virtual machine to be migrated includes:
sending a virtual machine cluster information acquisition request to a virtual machine management site according to the received migration instruction;
receiving virtual machine cluster information which is requested to be fed back and acquired by the virtual machine management station according to the virtual machine cluster information;
sending the virtual machine cluster information to a display interface for displaying;
and determining the virtual machine to be migrated in the virtual machine cluster information according to the received interface click instruction.
3. The virtual machine migration method according to claim 1, wherein the obtaining, in the source host, the disk data of the virtual machine to be migrated by using a preset snapshot termination policy includes:
and carrying out a preset number of snapshots on the disk file of the virtual machine to be migrated in the source host to obtain the disk data.
4. The virtual machine migration method according to claim 1, wherein the obtaining, in the source host, the disk data of the virtual machine to be migrated by using a preset snapshot termination policy includes:
snapshotting the disk file of the virtual machine to be migrated in the source host according to the size of a preset data block to obtain a disk data block;
and judging whether the difference value between the disk data block obtained by the current snapshot and the disk data obtained by the previous snapshot is lower than a preset threshold value, if so, stopping the snapshot, otherwise, continuing to snapshot the disk file until the difference value of the data block is lower than the preset threshold value, and obtaining the disk data.
5. The virtual machine migration method according to claim 1, wherein the writing the disk data to a local disk file includes:
and writing the disk data into the local disk file by OPENSL.
6. The virtual machine migration method according to any one of claims 1 to 5, wherein before writing the disk data into the local disk file, further comprising:
and checking the local virtual machine environment, judging whether the local virtual machine environment meets the migration condition, and if so, executing the step of writing the disk data into the local disk file.
7. The virtual machine migration method according to claim 6, wherein after the virtual machine to be migrated is started by using the local disk file, the method further comprises:
and performing format conversion on the local disk file to obtain the local disk file supported by the local virtual machine environment.
8. A virtual machine migration apparatus, comprising:
the virtual machine determining module is used for determining the virtual machine to be migrated according to the received migration instruction;
a source host determining module, configured to determine a source host corresponding to the virtual machine to be migrated;
a disk data obtaining module, configured to obtain disk data of the virtual machine to be migrated in the source host by using a preset snapshot termination policy;
the disk data migration module is used for writing the disk data into a local disk file;
and the virtual machine starting module is used for starting the virtual machine to be migrated by utilizing the local disk file.
9. A virtual machine migration apparatus, further comprising:
a memory for storing a computer program;
a processor for implementing the steps of the virtual machine migration method according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the virtual machine migration method according to any one of claims 1 to 7.
CN201911332536.2A 2019-12-22 2019-12-22 Virtual machine migration method, device, equipment and computer readable storage medium Pending CN111124615A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911332536.2A CN111124615A (en) 2019-12-22 2019-12-22 Virtual machine migration method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911332536.2A CN111124615A (en) 2019-12-22 2019-12-22 Virtual machine migration method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111124615A true CN111124615A (en) 2020-05-08

Family

ID=70501360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911332536.2A Pending CN111124615A (en) 2019-12-22 2019-12-22 Virtual machine migration method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111124615A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162886A (en) * 2020-09-18 2021-01-01 北京浪潮数据技术有限公司 Method, device, equipment and medium for switching back-end storage equipment
CN112506707A (en) * 2020-12-10 2021-03-16 深信服科技股份有限公司 Disaster recovery method, system, equipment and computer readable storage medium
CN113485787A (en) * 2021-06-30 2021-10-08 南京壹进制信息科技有限公司 Method for agent-free live migration of virtual machine to Openstack
CN114328026A (en) * 2021-12-30 2022-04-12 苏州浪潮智能科技有限公司 Virtual disk backup method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073462A (en) * 2010-11-29 2011-05-25 华为技术有限公司 Virtual storage migration method and system and virtual machine monitor
CN106201702A (en) * 2016-07-19 2016-12-07 浪潮(北京)电子信息产业有限公司 The method of virtual machine (vm) migration, system and cloud computing management platform
CN106227587A (en) * 2016-07-19 2016-12-14 浪潮(北京)电子信息产业有限公司 A kind of band snapshot virtual machine complete machine dynamic migration method and device
CN106569876A (en) * 2016-11-11 2017-04-19 郑州云海信息技术有限公司 Direct device visiting model-based virtual machine migrating method and apparatus
CN109086118A (en) * 2018-07-25 2018-12-25 浪潮(北京)电子信息产业有限公司 VTPM virtual machine migration method, device and equipment based on KVM
CN110532061A (en) * 2019-08-13 2019-12-03 国云科技股份有限公司 A method of migrating virtual machine under cloudy environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073462A (en) * 2010-11-29 2011-05-25 华为技术有限公司 Virtual storage migration method and system and virtual machine monitor
CN106201702A (en) * 2016-07-19 2016-12-07 浪潮(北京)电子信息产业有限公司 The method of virtual machine (vm) migration, system and cloud computing management platform
CN106227587A (en) * 2016-07-19 2016-12-14 浪潮(北京)电子信息产业有限公司 A kind of band snapshot virtual machine complete machine dynamic migration method and device
CN106569876A (en) * 2016-11-11 2017-04-19 郑州云海信息技术有限公司 Direct device visiting model-based virtual machine migrating method and apparatus
CN109086118A (en) * 2018-07-25 2018-12-25 浪潮(北京)电子信息产业有限公司 VTPM virtual machine migration method, device and equipment based on KVM
CN110532061A (en) * 2019-08-13 2019-12-03 国云科技股份有限公司 A method of migrating virtual machine under cloudy environment

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112162886A (en) * 2020-09-18 2021-01-01 北京浪潮数据技术有限公司 Method, device, equipment and medium for switching back-end storage equipment
CN112162886B (en) * 2020-09-18 2023-12-22 北京浪潮数据技术有限公司 Back-end storage device switching method, device, equipment and medium
CN112506707A (en) * 2020-12-10 2021-03-16 深信服科技股份有限公司 Disaster recovery method, system, equipment and computer readable storage medium
CN112506707B (en) * 2020-12-10 2023-12-29 深信服科技股份有限公司 Disaster recovery returning method, system, equipment and computer readable storage medium
CN113485787A (en) * 2021-06-30 2021-10-08 南京壹进制信息科技有限公司 Method for agent-free live migration of virtual machine to Openstack
CN114328026A (en) * 2021-12-30 2022-04-12 苏州浪潮智能科技有限公司 Virtual disk backup method, device, equipment and medium
CN114328026B (en) * 2021-12-30 2023-11-14 苏州浪潮智能科技有限公司 Virtual disk backup method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US10394547B2 (en) Applying update to snapshots of virtual machine
US10613788B2 (en) Data migration between cloud storage systems
CN111124615A (en) Virtual machine migration method, device, equipment and computer readable storage medium
US10073747B2 (en) Reducing recovery time in disaster recovery/replication setup with multitier backend storage
US9386079B2 (en) Method and system of virtual desktop infrastructure deployment studio
US8910172B2 (en) Application resource switchover systems and methods
US8321863B2 (en) Security management device and method
US10346248B2 (en) Failure resistant volume creation in a shared storage environment
US8799602B2 (en) Automated migration to a new target volume via merged bitmaps to maintain consistency
EP3442203B1 (en) Method for migrating a virtual machine, and system
US11886902B2 (en) Physical-to-virtual migration method and apparatus, and storage medium
CN113626133B (en) Virtual machine control method, device, equipment and computer readable storage medium
CN109799998B (en) OpenStack cluster configuration and batch deployment method and system
CN112328365A (en) Virtual machine migration method, device, equipment and storage medium
US10318343B2 (en) Migration methods and apparatuses for migrating virtual machine including locally stored and shared data
US10922305B2 (en) Maintaining storage profile consistency in a cluster having local and shared storage
EP3316518B1 (en) Method and device for upgrading virtual network element, and computer storage medium
US11295018B1 (en) File system modification
CN115174596A (en) Equipment remote copying method, device and medium
US20210357239A1 (en) Methods and systems for managing computing virtual machine instances
CN112463228A (en) Storage pool hybrid deployment method and device
CN114217999A (en) Cloud desktop system and method
CN113934443A (en) Software upgrading system
CN112286626B (en) Method, system, device and medium for fast and safe cloning of cross-storage disk
CN110543385A (en) Virtual backup method and virtual backup restoration method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200508