CN110737512A - Cross-platform virtual machine online migration method and related components - Google Patents

Cross-platform virtual machine online migration method and related components Download PDF

Info

Publication number
CN110737512A
CN110737512A CN201911025091.3A CN201911025091A CN110737512A CN 110737512 A CN110737512 A CN 110737512A CN 201911025091 A CN201911025091 A CN 201911025091A CN 110737512 A CN110737512 A CN 110737512A
Authority
CN
China
Prior art keywords
virtual machine
migrated
disk
snapshot
data
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.)
Withdrawn
Application number
CN201911025091.3A
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 CN201911025091.3A priority Critical patent/CN110737512A/en
Publication of CN110737512A publication Critical patent/CN110737512A/en
Withdrawn 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
    • 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/45562Creating, deleting, cloning virtual machine instances
    • 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
    • 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/45575Starting, stopping, suspending or resuming virtual machine instances

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

According to the cross-platform virtual machine online migration method, an agent program does not need to be installed in the virtual machine, the threat to the disk file caused by illegal utilization of the agent program in the virtual machine is avoided, and the safety of the disk file is guaranteed; meanwhile, in the execution process, firstly reading the disk data in the virtual machine to be migrated, writing the disk data into a new platform, and not influencing the normal operation of the virtual machine in the data reading and writing processes, namely, the virtual machine migration is executed under the condition that the virtual machine is not powered off, the virtual machine to be migrated is controlled to pause after the disk change data relative to the disk data in the operation of the virtual machine to be migrated is determined, at the moment, the service pause time is equivalent to the writing time of the disk change data, the service pause time of the virtual machine is greatly shortened, and the operation continuity of the running service application can be effectively ensured. The application also provides a cross-platform virtual machine online migration device, equipment and a readable storage medium, and has the beneficial effects.

Description

Cross-platform virtual machine online migration method and related components
Technical Field
The application relates to the technical field of cloud computing management, in particular to cross-platform virtual machine online migration methods, devices, equipment and readable storage media.
Background
The virtual machine migration refers to a process of migrating a virtual machine from places to places, and can be migration between platforms of the same kind or migration between platforms of different kinds.
When migrating the virtual machine from the VMware platform to the OpenStack platform, is realized by two ways, namely is realized by manually downloading a disk file of the VMware vSphere virtual machine by a user, converting the VMDK file into a disk file in a QCOW2 format by using a qemu-img tool, uploading the disk file to an image library of the OpenStack, and creating a new virtual machine by specifying the image in the OpenStack, and realized by adopting a virt-v2v tool developed by Redhat company, which is a script written by perl language and can automatically copy the virtual machine created on the VMware vSphere to a host of the OpenStack platform, but the virtual machine still needs to be shut down before copying.
In the two implementation modes, the virtual machine needs to be shut down and then started to migrate in the migration process of the virtual machine, and the migration process of the virtual machine is long, so that the service pause time of the virtual machine is long, the operation continuity of the service is greatly influenced, and the service response efficiency and the user experience are influenced; in the whole implementation process, an agent program pre-installed in the virtual machine is required to read the file in the virtual machine and write the file into a new platform, and the intervention of the agent program easily causes the file in the virtual machine to be in a greater threat, so that the security of the file in the virtual machine is influenced.
Therefore, how to ensure the security of the file in the virtual machine, and simultaneously ensure the continuity of the virtual machine service as much as possible, and reduce the influence of the virtual machine migration on the running service application is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide cross-platform virtual machine online migration methods, the methods can realize virtual machine migration under the condition that a virtual machine is not shut down, and can guarantee the security of files in the virtual machine, and another aims to provide cross-platform virtual machine online migration devices, equipment and readable storage media.
In order to solve the above technical problem, the present application provides methods for online migration of a cross-platform virtual machine, including:
mounting the target storage space to an OpenStack platform;
reading disk data in a virtual machine to be migrated, and writing the disk data into the target storage space;
determining the disk change data relative to the disk data in the running of the virtual machine to be migrated;
controlling the virtual machine to be migrated to pause, and synchronizing the disk change data to the target storage space;
and creating a new virtual machine in the OpenStack platform according to the target storage space to obtain the migrated virtual machine.
Optionally, before reading the disk data in the virtual machine to be migrated, the method further includes:
utilizing a snapshot technology to snapshot a virtual machine to be migrated as a first snapshot;
accordingly, the reading the disk data in the virtual machine to be migrated includes: reading the disk data of the virtual machine to be migrated before the first snapshot;
correspondingly, determining the disk change data relative to the disk data in the running of the virtual machine to be migrated includes:
performing incremental snapshot on the virtual machine to be migrated after a preset time period;
and determining the disk change data according to the incremental snapshot.
Optionally, performing incremental snapshot on the virtual machine to be migrated after the preset time period includes:
after the preset time period, making an incremental snapshot on the virtual machine to be migrated so as to read the disk change data block generated in the period;
judging whether the change data volume is smaller than a threshold value according to the disk change data block;
if so, performing final incremental snapshot on the virtual machine to be migrated;
and if not, performing incremental snapshot on the virtual machine to be migrated after the preset time period is executed so as to read the disk change data block generated in the period.
Optionally, creating a new virtual machine in the OpenStack platform according to the target storage space to obtain a migrated virtual machine, where the creating includes:
creating a virtual machine interface according to the target storage space to obtain a new virtual machine;
and appointing the IP and the MAC of the virtual machine to be migrated for the new virtual machine to obtain the migrated virtual machine.
The application discloses kind of cross platform virtual machine online migration device includes:
the space mounting unit is used for mounting the target storage space to the OpenStack platform;
the data writing unit is used for reading the disk data in the virtual machine to be migrated and writing the disk data into the target storage space;
the change determining unit is used for determining the disk change data relative to the disk data in the running of the virtual machine to be migrated;
the change synchronization unit is used for controlling the virtual machine to be migrated to pause and synchronizing the disk change data to the target storage space;
and the virtual machine creating unit is used for creating a new virtual machine in the OpenStack platform according to the target storage space to obtain the migrated virtual machine.
Optionally, the cross-platform virtual machine online migration apparatus further includes: the output end of the snapshot obtaining unit is connected with the data writing unit and is used for: utilizing a snapshot technology to snapshot a virtual machine to be migrated as a first snapshot;
correspondingly, the data writing unit connected with the snapshot obtaining unit is specifically an th writing unit, and the th writing unit is configured to read the disk data of the virtual machine to be migrated before the first snapshot;
correspondingly, the change determining unit connected with the th writing unit is specifically a th determining unit, and the th determining unit includes an incremental snapshot subunit configured to perform incremental snapshot on the virtual machine to be migrated after a preset time period, and a snapshot determining subunit configured to determine the disk change data according to the incremental snapshot.
Optionally, the incremental snapshot subunit includes:
snapshot subunit, configured to make an incremental snapshot on the virtual machine to be migrated after the preset time period, so as to read a disk change data block generated in the period;
the variable quantity judging subunit is used for judging whether the variable data quantity is smaller than a threshold value according to the disk variable data block, if so, triggering the second snapshot subunit, and if not, triggering the th snapshot subunit;
and the second snapshot subunit is used for performing final incremental snapshot on the virtual machine to be migrated.
Optionally, the virtual machine creating unit includes:
the interface creating subunit is used for creating a virtual machine interface according to the target storage space to obtain a new virtual machine;
and the IP setting subunit is used for appointing the IP and the MAC of the virtual machine to be migrated for the new virtual machine to obtain the migrated virtual machine.
The application discloses kind of cross platform virtual machine online migration equipment includes:
a memory for storing a program;
and the processor is used for realizing the steps of the cross-platform virtual machine online migration method when the program is executed.
readable storage medium having a program stored thereon, which when executed by a processor, performs the steps of the cross-platform virtual machine online migration method.
The cross-platform virtual machine online migration method provided by the application comprises the following steps: mounting the target storage space to an OpenStack platform; reading disk data in a virtual machine to be migrated, and writing the disk data into the target storage space; determining the disk change data relative to the disk data in the running of the virtual machine to be migrated; controlling the virtual machine to be migrated to pause, and synchronizing the disk change data to the target storage space; and creating a new virtual machine in the OpenStack platform according to the target storage space to obtain the migrated virtual machine.
The method does not need to install an agent program in the virtual machine, and only needs to use any control terminal which can realize the functions outside the virtual machine, thereby avoiding the threat to the disk file caused by the illegal utilization of the agent program in the virtual machine and ensuring the safety of the disk file; meanwhile, in the execution process, firstly reading the disk data in the virtual machine to be migrated, writing the disk data into a new platform, and not influencing the normal operation of the virtual machine in the data reading and writing processes, namely, the virtual machine migration is executed under the condition that the virtual machine is not shut down, the virtual machine to be migrated is controlled to pause after the disk change data relative to the disk data in the operation of the virtual machine to be migrated is determined, at the moment, the service pause time is equivalent to the writing time of the disk change data, compared with the service pause time of the traditional integral virtual machine migration, the method greatly shortens the service pause time of the virtual machine, and can effectively ensure the operation continuity of the running service application.
The application also provides cross-platform virtual machine online migration devices, equipment and readable storage media, which have the beneficial effects described above 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 flowchart of an online migration method for a cross-platform virtual machine according to an embodiment of the present application;
fig. 2 is a schematic diagram of specific implementation flows of a scheme for online migration of a virtual machine from a VMware vSphere to an OpenStack cloud platform according to an embodiment of the present application;
fig. 3 is a block diagram illustrating a structure of a cross-platform virtual machine online migration apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a cross-platform virtual machine online migration device according to an embodiment of the present application.
Detailed Description
The method has the core of providing cross-platform virtual machine online migration methods, can realize the virtual machine migration under the condition that the virtual machine is not shut down, and can guarantee the security of files in the virtual machine, and the other core of the method is providing cross-platform virtual machine online migration devices, equipment and readable storage media.
For purposes of making the objects, solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail and completely with reference to the drawings of the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of of the present application.
Referring to fig. 1, fig. 1 is a flowchart of an online migration method of a cross-platform virtual machine according to the present embodiment; it should be noted that, in this embodiment, the execution subject is not limited, and any control end that can implement the following steps, such as any third party migration tool, may be implemented. The method mainly comprises the following steps:
step s110, mounting the target storage space to an OpenStack platform;
it should be noted that the cross-platform virtual machine online migration method provided by the present application is mainly applicable to a scheme for migrating a virtual machine from vmwartsphere ( virtualization platforms) to an OpenStack cloud platform (a cloud computing management platform implemented based on KVM virtualization), that is, a virtual machine to be migrated is mounted on VMware vSphere, and a virtual machine after migration is mounted on an OpenStack cloud platform.
In the NAS Storage structure, the Storage system is not Attached to a certain server or client through an I/O bus any more, but is directly connected to a Network through a Network interface, and a user accesses the Storage system through a Network to support NFS and CIFS Storage protocols), fast Storage, lc Storage, and the like. In this embodiment, only NAS storage is taken as an example for description, and other types of storage spaces can refer to the description of this embodiment, and are not described herein again.
The target storage space is mounted to the OpenStack platform, and specifically can be mounted to a physical server where a shader component of the OpenStack platform is located, and storage multi-backend support is started for the shader component (the purpose is to enable the shader to recognize a plurality of pieces of storage), the shader component is a component used for managing a cloud hard disk and fast storage in the OpenStack platform, in this embodiment, processing of storage data realized by the component is called, and certainly, components which can realize a data processing function by other components can also be called, which is not limited herein.
Step s120, reading the disk data in the virtual machine to be migrated, and writing the disk data into a target storage space;
the purpose of reading the disk data in the virtual machine to be migrated is to determine the real-time data in the current virtual machine, and the virtual machine may continuously and normally operate while the read disk data is written into the target storage space, thereby ensuring the online migration of the virtual machine.
Since the data in the virtual machine may also change during the reading process, to ensure that the read disk data has a self consistency, the I/O may be temporarily stopped while the disk data is read.
Step s130, determining disk change data relative to disk data in the running of the virtual machine to be migrated;
because the virtual machine continuously operates while data is written into the target storage space, new disk data can be continuously generated and stored in the virtual machine in the operation process, and disk change data generated in the operation process of the virtual machine to be migrated after the disk data is written into the target storage space needs to be determined in order to ensure that the data stored in the target storage space is the same as the disk data in the virtual machine.
The acquiring process of the disk change data may refer to a conventional acquiring mode of the change data, for example, the change data may be directly read through an external interface, and the like, which is not limited herein.
Step s140, controlling the virtual machine to be migrated to pause, and synchronizing the disk change data to the target storage space;
after the change data between the current disk to be migrated and the write-in target storage space is determined, in order to avoid the continuous change of the change data caused by the continuous operation of the virtual machine, the data migration time is shortened, the suspension work of the migration virtual machine needs to be controlled, and the continuous update of the change data is avoided, in the application, the change data write-in process only needs to be suspended for a short time of , compared with the traditional write-in time for suspending the complete data of the virtual machine, the service dead time can be greatly shortened, meanwhile, only the service needs to be suspended in the process, the shutdown is not needed, the service application in the next half year after the service is restarted and the service application in operation cannot be influenced, compared with the traditional virtual machine migration process which needs to be shut down for the virtual machine, the continuity of the service can be ensured.
And s150, creating a new virtual machine in the OpenStack platform according to the target storage space to obtain the migrated virtual machine.
The process of creating the new virtual machine can refer to the traditional creating process, the new virtual machine is created according to the target storage space written in all the running data of the current virtual machine to be migrated, the new virtual machine which has the same function as the original virtual machine to be migrated and is positioned on the OpenStack platform can be obtained, and therefore online migration of the cross-platform virtual machine is achieved.
To deepen understanding of the process of creating a new virtual machine, methods for creating a new virtual machine according to a target storage space in an OpenStack platform to obtain an implementation manner of a migrated virtual machine are introduced, as follows:
step s151, creating a virtual machine interface according to the target storage space to obtain a new virtual machine;
and step s152, appointing the IP and the MAC of the virtual machine to be migrated for the new virtual machine, and obtaining the migrated virtual machine.
In order to ensure service continuity and application availability of the newly created virtual machine and the virtual machine to be migrated, it is necessary to ensure that the new virtual machine is invoked to continue the virtual machine to be migrated, in this embodiment, IP and MAC are specified as service continuation means, specifically, in OpenStack, an interface of the sender component that creates the virtual machine through a volume (specifying the QCOW2 file) may be invoked to create the new virtual machine, and the original IP and MAC are specified for the virtual machine.
Based on the introduction, the cross-platform virtual machine online migration method provided by the embodiment does not need to install an agent program in the virtual machine, and only needs to use any control terminal outside the virtual machine to realize the functions, so that the threat of the agent program in the virtual machine to the disk file caused by illegal utilization is avoided, and the security of the disk file is ensured; meanwhile, in the execution process, firstly reading the disk data in the virtual machine to be migrated, writing the disk data into a new platform, and not influencing the normal operation of the virtual machine in the data reading and writing processes, namely, the virtual machine migration is executed under the condition that the virtual machine is not shut down, the virtual machine to be migrated is controlled to pause after the disk change data relative to the disk data in the operation of the virtual machine to be migrated is determined, at the moment, the service pause time is equivalent to the writing time of the disk change data, compared with the service pause time of the traditional integral virtual machine migration, the method greatly shortens the service pause time of the virtual machine, and can effectively ensure the operation continuity of the running service application.
Based on the above embodiment, to increase the reading speed of the disk data in the virtual machine to be migrated, preferably, before reading the disk data in the virtual machine to be migrated, steps may be further performed to snapshot the virtual machine to be migrated by using a snapshot technique, as a first snapshot, that is, before reading the disk file of the virtual machine to be migrated on the VMware vSphere platform, snapshots are performed on the virtual machine by using a snapshot technique, and accordingly, reading the disk data in the virtual machine to be migrated at step s120 specifically includes reading the disk data before the first snapshot of the virtual machine to be migrated, reading the disk data before the time point of the 1 st snapshot (i.e., the first snapshot) of the virtual machine and writing the disk data into a target storage space, taking the target storage space as NAS storage as an example, writing the read data into a QCOW2 disk file in NAS storage, and accordingly, determining disk change data in operation of the virtual machine to be migrated at step s130 specifically includes performing migration after a preset time period and determining incremental data change of the disk data according to the snapshot.
When a snapshot of a running Virtual Machine (VM) is generated, its storage information (data on the hard disk drive) and metadata (configuration information) are also saved simultaneously, if necessary, I/O is temporarily stopped when the snapshot is generated to ensure that a disk image with self consistency is captured.
It should be noted that, before controlling the virtual machine to be migrated to pause, a plurality of time periods may be set, that is, incremental snapshots are performed on the virtual machine to be migrated for a plurality of times to determine data changes in each time period, and of course, only time periods may be set, that is, a service pause of the virtual machine to be migrated is started after a single incremental snapshot is performed on the virtual machine to be migrated, and data is written into the changed data after the pause.
In addition, the preset time period is not limited in this embodiment, and a floating time period may be set, for example, when a plurality of time periods are set, the time period may be set to time periods after the disk change data write determined by the previous incremental snapshots is completed, or a fixed time period may be set, for example, 2s is used as the time period.
In addition, when a plurality of time periods are set for performing incremental snapshots, the number of the incremental snapshots is not limited in this embodiment, that is, the incremental snapshot of the fifth time is used as the last disk snapshots and the service approval of the virtual machine to be migrated is controlled, which is not limited in this embodiment, preferably, to reduce the service suspension time as much as possible and ensure the maximum service continuity, the process of performing the incremental snapshot on the virtual machine to be migrated after the preset time period may specifically be:
after a preset time period, making an incremental snapshot on the virtual machine to be migrated so as to read a disk change data block generated in the period;
judging whether the change data volume is smaller than a threshold value according to the disk change data block;
if so, performing final incremental snapshot on the virtual machine to be migrated;
and if not, after a preset time period is executed, making an incremental snapshot on the virtual machine to be migrated so as to read the disk change data block generated in the period.
When the read change data amount is smaller than a certain specified value, such as 1KB, making last snapshots for the virtual machine, synchronizing the change data before the time point of the last snapshots into a target storage space (such as a QCOW2 file in NAS storage), performing a pause operation on the virtual machine, and performing last snapshots when the disk change data converges, wherein the fact that the disk change data amount is smaller than the threshold means that the write time is short, and the service pause time can be greatly reduced to ensure the service continuity under the maximum condition.
In order to deepen understanding of the online migration method of the cross-platform virtual machine provided by the present application, in this embodiment, specific implementation flow diagrams of a scheme for online migrating a virtual machine from a VMware vSphere to an OpenStack cloud platform are described, the flow diagrams are shown in fig. 2.
1. NAS blocks are mounted for the existing OpenStack cluster and stored in a physical server where a shader component of the OpenStack cluster is located;
2. the storage multi-backend support is started in the shader component, so that the shader can identify and use a plurality of pieces of backend storage;
3. taking a snapshot for the 1 st time of the virtual machine to be migrated;
4. reading the disk data before the 1 st snapshot time point of the virtual machine, and writing the disk data into the QCOW2 disk file in the NAS storage;
5. after the data is read for times, making incremental snapshots for the virtual machine periodically, reading times of disk change data blocks generated in each timing period, and synchronously writing the disk change data blocks into the QCOW2 files in the NAS storage;
6. when the amount of the read change data is less than a certain specified value, such as 1KB, making snapshots of the virtual machine, and synchronously writing the change data before the time point of the last snapshots into a QCOW2 file in NAS storage;
7. performing a pause or shutdown operation on the virtual machine;
8. in OpenStack, an interface of a file creator virtual machine is called (the volume is designated as the QCOW2 file), the original IP and MAC are designated for the virtual machine, and a new virtual machine is created and started.
It should be noted that, if there are multiple disks in the source virtual machine, multiple volumes may be generated, and the volume generated by the th disk is used as a bootable volume for booting the virtual machine by default, and other volumes are mounted as data.
In the online migration process introduced in this embodiment, an agent does not need to be installed in the virtual machine, and in the cross-platform migration process of the virtual machine, the virtual machine does not need to be shut down, and only after the migration is completed, the virtual machine is shut down or suspended for switching the virtual machine, so that the minimum influence on the service running in the virtual machine in the migration process can be effectively ensured, the original IP and MAC of the virtual machine after the migration can be ensured to be unchanged, and the availability of the application can be ensured.
Referring to fig. 3, fig. 3 is a block diagram of a cross-platform virtual machine online migration apparatus provided in this embodiment; the apparatus may include: a space mounting unit 210, a data writing unit 220, a change determining unit 230, a change synchronizing unit 240, and a virtual machine creating unit 250. The cross-platform virtual machine online migration device provided by the embodiment can be compared with the cross-platform virtual machine online migration method.
The space mounting unit 210 is mainly used for mounting a target storage space to an OpenStack platform;
the data writing unit 220 is mainly used for reading the disk data in the virtual machine to be migrated and writing the disk data into a target storage space;
the change determining unit 230 is mainly configured to determine disk change data relative to disk data in the operation of the virtual machine to be migrated;
the change synchronization unit 240 is mainly used to control the virtual machine to be migrated to pause, and synchronize the disk change data to the target storage space;
the virtual machine creating unit 250 is mainly used for creating a new virtual machine in the OpenStack platform according to the target storage space, so as to obtain a migrated virtual machine.
Optionally, the online migration apparatus of a cross-platform virtual machine provided in this embodiment may further include a snapshot obtaining unit, where an output end of the snapshot obtaining unit is connected to the data writing unit, and is configured to snapshot the virtual machine to be migrated by using a snapshot technique, as a first snapshot;
correspondingly, the data writing unit connected with the snapshot obtaining unit is specifically an th writing unit, and the th writing unit is used for reading the disk data of the virtual machine to be migrated before the first snapshot;
correspondingly, the change determining unit connected with the th writing unit is specifically a th determining unit, and the th determining unit includes an incremental snapshot subunit configured to perform incremental snapshot on the virtual machine to be migrated after a preset time period, and a snapshot determining subunit configured to determine the disk change data according to the incremental snapshot.
Optionally, the incremental snapshot subunit includes:
snapshot subunit, configured to make an incremental snapshot on the virtual machine to be migrated after a preset time period, so as to read a disk change data block generated in the period;
the variable quantity judging subunit is used for judging whether the variable data quantity is smaller than a threshold value according to the disk variable data block, if so, triggering the second snapshot subunit, and if not, triggering the th snapshot subunit;
and the second snapshot subunit is used for performing final incremental snapshot on the virtual machine to be migrated.
Optionally, the virtual machine creating unit includes:
the interface creating subunit is used for creating a virtual machine interface according to the target storage space to obtain a new virtual machine;
and the IP setting subunit is used for appointing the IP and the MAC of the virtual machine to be migrated for the new virtual machine to obtain the migrated virtual machine.
The cross-platform virtual machine online migration device provided by the embodiment can execute virtual machine migration under the condition that the virtual machine is not powered off, and meanwhile, the security of files in the virtual machine can be guaranteed.
The embodiment provides kinds of cross-platform virtual machine online migration devices, which comprise a memory and a processor.
Wherein, the memory is used for storing programs;
when the processor is used to execute a program, the steps of the online migration method of the cross-platform virtual machine described in the above embodiments may be specifically referred to the description of the online migration method of the cross-platform virtual machine.
Referring to fig. 4, a schematic structural diagram of an online migration device of a cross-platform virtual machine provided in this embodiment may include or or more processors (CPUs) 322 (e.g., 0 or 1 or more processors) and memory 332, 2 or or more storage media 330 (e.g., or or more mass storage devices) storing an application 342 or data 344, where the memory 332 and the storage media 330 may be temporarily stored or persistently stored, the program stored in the storage media 330 may include or or more modules (not shown), each of which may include a series of instruction operations in a data processing device, and further , the central processor 322 may be configured to communicate with the storage media 330, and execute the series of instruction operations in the storage media 330 on the online migration device 301.
The cross-platform virtual machine online migration apparatus 301 may further include or or more power sources 326, or or more wired or wireless network interfaces 350, or or more input/output interfaces 358, and/or or or more operating systems 341, such as Windows server, Mac OS XTM, UnixTM, linux, FreeBSDTM, and the like.
The steps in the online migration method of the cross-platform virtual machine described in fig. 1 above may be implemented by the structure of the online migration device of the cross-platform virtual machine introduced in this embodiment.
The present embodiment discloses readable storage media, on which programs are stored, and when the programs are executed by a processor, the steps of the online migration method of the cross-platform virtual machine described in the foregoing embodiment are implemented, which may specifically refer to the description of the online migration method of the cross-platform virtual machine in the foregoing embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
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.
further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein can 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 functionality for clarity of explanation of interchangeability of hardware and software.
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 cross-platform virtual machine online migration method, device, equipment and readable storage medium provided by 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 such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1, A cross-platform virtual machine online migration method, comprising:
mounting the target storage space to an OpenStack platform;
reading disk data in a virtual machine to be migrated, and writing the disk data into the target storage space;
determining the disk change data relative to the disk data in the running of the virtual machine to be migrated;
controlling the virtual machine to be migrated to pause, and synchronizing the disk change data to the target storage space;
and creating a new virtual machine in the OpenStack platform according to the target storage space to obtain the migrated virtual machine.
2. The online migration method of the cross-platform virtual machine according to claim 1, before reading the disk data in the virtual machine to be migrated, further comprising:
utilizing a snapshot technology to snapshot a virtual machine to be migrated as a first snapshot;
accordingly, the reading the disk data in the virtual machine to be migrated includes: reading the disk data of the virtual machine to be migrated before the first snapshot;
correspondingly, determining the disk change data relative to the disk data in the running of the virtual machine to be migrated includes:
performing incremental snapshot on the virtual machine to be migrated after a preset time period;
and determining the disk change data according to the incremental snapshot.
3. The online migration method of the cross-platform virtual machine according to claim 2, wherein performing the incremental snapshot on the virtual machine to be migrated after the preset time period comprises:
after the preset time period, making an incremental snapshot on the virtual machine to be migrated so as to read the disk change data block generated in the period;
judging whether the change data volume is smaller than a threshold value according to the disk change data block;
if so, performing final incremental snapshot on the virtual machine to be migrated;
and if not, performing incremental snapshot on the virtual machine to be migrated after the preset time period is executed so as to read the disk change data block generated in the period.
4. The online migration method of a cross-platform virtual machine according to claim 1, wherein creating a new virtual machine in the OpenStack platform according to the target storage space to obtain a migrated virtual machine includes:
creating a virtual machine interface according to the target storage space to obtain a new virtual machine;
and appointing the IP and the MAC of the virtual machine to be migrated for the new virtual machine to obtain the migrated virtual machine.
5, A cross-platform virtual machine online migration device, comprising:
the space mounting unit is used for mounting the target storage space to the OpenStack platform;
the data writing unit is used for reading the disk data in the virtual machine to be migrated and writing the disk data into the target storage space;
the change determining unit is used for determining the disk change data relative to the disk data in the running of the virtual machine to be migrated;
the change synchronization unit is used for controlling the virtual machine to be migrated to pause and synchronizing the disk change data to the target storage space;
and the virtual machine creating unit is used for creating a new virtual machine in the OpenStack platform according to the target storage space to obtain the migrated virtual machine.
6. The cross-platform virtual machine online migration apparatus according to claim 5, further comprising: the output end of the snapshot obtaining unit is connected with the data writing unit and is used for: utilizing a snapshot technology to snapshot a virtual machine to be migrated as a first snapshot;
correspondingly, the data writing unit connected with the snapshot obtaining unit is specifically an th writing unit, and the th writing unit is configured to read the disk data of the virtual machine to be migrated before the first snapshot;
correspondingly, the change determining unit connected with the th writing unit is specifically a th determining unit, and the th determining unit includes an incremental snapshot subunit configured to perform incremental snapshot on the virtual machine to be migrated after a preset time period, and a snapshot determining subunit configured to determine the disk change data according to the incremental snapshot.
7. The cross-platform virtual machine online migration apparatus according to claim 6, wherein the incremental snapshot subunit comprises:
snapshot subunit, configured to make an incremental snapshot on the virtual machine to be migrated after the preset time period, so as to read a disk change data block generated in the period;
the variable quantity judging subunit is used for judging whether the variable data quantity is smaller than a threshold value according to the disk variable data block, if so, triggering the second snapshot subunit, and if not, triggering the th snapshot subunit;
and the second snapshot subunit is used for performing final incremental snapshot on the virtual machine to be migrated.
8. The cross-platform virtual machine online migration apparatus according to claim 5, wherein the virtual machine creation unit includes:
the interface creating subunit is used for creating a virtual machine interface according to the target storage space to obtain a new virtual machine;
and the IP setting subunit is used for appointing the IP and the MAC of the virtual machine to be migrated for the new virtual machine to obtain the migrated virtual machine.
9, A cross-platform virtual machine online migration device, comprising:
a memory for storing a program;
a processor configured to execute the program to implement the steps of the cross-platform virtual machine online migration method according to any of claims 1-4.
10, readable storage medium, characterized in that the readable storage medium has stored thereon a program which, when being executed by a processor, carries out the steps of the cross-platform virtual machine online migration method according to any of claims 1 to 4.
CN201911025091.3A 2019-10-25 2019-10-25 Cross-platform virtual machine online migration method and related components Withdrawn CN110737512A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911025091.3A CN110737512A (en) 2019-10-25 2019-10-25 Cross-platform virtual machine online migration method and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911025091.3A CN110737512A (en) 2019-10-25 2019-10-25 Cross-platform virtual machine online migration method and related components

Publications (1)

Publication Number Publication Date
CN110737512A true CN110737512A (en) 2020-01-31

Family

ID=69271425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911025091.3A Withdrawn CN110737512A (en) 2019-10-25 2019-10-25 Cross-platform virtual machine online migration method and related components

Country Status (1)

Country Link
CN (1) CN110737512A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797059A (en) * 2020-07-07 2020-10-20 优刻得科技股份有限公司 Method for online cloud host migration across clouds, migration controller and cloud server
CN112068930A (en) * 2020-08-24 2020-12-11 苏州浪潮智能科技有限公司 Method for migrating virtual machine across platforms
CN112256397A (en) * 2020-10-28 2021-01-22 上海英方软件股份有限公司 Virtual machine cross-platform migration method and system
CN112527452A (en) * 2020-12-03 2021-03-19 北京浪潮数据技术有限公司 Virtual machine migration method, device and medium across OpenStack
CN113485787A (en) * 2021-06-30 2021-10-08 南京壹进制信息科技有限公司 Method for agent-free live migration of virtual machine to Openstack
CN113515344A (en) * 2021-05-17 2021-10-19 中国工商银行股份有限公司 Method and device for automatically migrating virtual machine across technical platforms
CN114296649A (en) * 2021-12-27 2022-04-08 天翼云科技有限公司 Inter-cloud service migration system
CN116132441A (en) * 2022-12-30 2023-05-16 中国人寿保险股份有限公司上海数据中心 Cloud desktop data intercommunication method and system
CN116755835A (en) * 2023-06-05 2023-09-15 广州鼎甲计算机科技有限公司 Method, apparatus, computer device, medium and program product for migrating virtual machine
CN117112072A (en) * 2023-10-25 2023-11-24 成都云祺科技有限公司 Cross-platform virtual machine drive replacement method, system and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821158A (en) * 2012-08-20 2012-12-12 广州杰赛科技股份有限公司 Method and cloud system for realizing virtual machine migration
CN103577249A (en) * 2013-11-13 2014-02-12 中国科学院计算技术研究所 Method and system for virtual machine online migration
US20150378831A1 (en) * 2014-06-28 2015-12-31 Vmware, Inc. Using a recovery snapshot during live migration
CN107678831A (en) * 2017-09-25 2018-02-09 郑州云海信息技术有限公司 It is a kind of to realize the V2V methods migrated between virtual platform
CN108763405A (en) * 2018-05-22 2018-11-06 深信服网络科技(深圳)有限公司 A kind of business datum moving method, device, system and readable storage medium storing program for executing
CN109739617A (en) * 2018-12-07 2019-05-10 国云科技股份有限公司 A method of across the cloud migration of Linux virtual machine based on cloudy system under the overall leadership

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821158A (en) * 2012-08-20 2012-12-12 广州杰赛科技股份有限公司 Method and cloud system for realizing virtual machine migration
CN103577249A (en) * 2013-11-13 2014-02-12 中国科学院计算技术研究所 Method and system for virtual machine online migration
US20150378831A1 (en) * 2014-06-28 2015-12-31 Vmware, Inc. Using a recovery snapshot during live migration
CN107678831A (en) * 2017-09-25 2018-02-09 郑州云海信息技术有限公司 It is a kind of to realize the V2V methods migrated between virtual platform
CN108763405A (en) * 2018-05-22 2018-11-06 深信服网络科技(深圳)有限公司 A kind of business datum moving method, device, system and readable storage medium storing program for executing
CN109739617A (en) * 2018-12-07 2019-05-10 国云科技股份有限公司 A method of across the cloud migration of Linux virtual machine based on cloudy system under the overall leadership

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797059A (en) * 2020-07-07 2020-10-20 优刻得科技股份有限公司 Method for online cloud host migration across clouds, migration controller and cloud server
CN112068930A (en) * 2020-08-24 2020-12-11 苏州浪潮智能科技有限公司 Method for migrating virtual machine across platforms
CN112068930B (en) * 2020-08-24 2022-09-20 苏州浪潮智能科技有限公司 Method for migrating virtual machine across platforms
CN112256397A (en) * 2020-10-28 2021-01-22 上海英方软件股份有限公司 Virtual machine cross-platform migration method and system
CN112527452A (en) * 2020-12-03 2021-03-19 北京浪潮数据技术有限公司 Virtual machine migration method, device and medium across OpenStack
CN113515344B (en) * 2021-05-17 2024-05-28 中国工商银行股份有限公司 Cross-technology-platform virtual machine automatic migration method and device
CN113515344A (en) * 2021-05-17 2021-10-19 中国工商银行股份有限公司 Method and device for automatically migrating virtual machine across technical platforms
CN113485787A (en) * 2021-06-30 2021-10-08 南京壹进制信息科技有限公司 Method for agent-free live migration of virtual machine to Openstack
CN114296649A (en) * 2021-12-27 2022-04-08 天翼云科技有限公司 Inter-cloud service migration system
CN114296649B (en) * 2021-12-27 2024-01-02 天翼云科技有限公司 Inter-cloud service migration system
CN116132441A (en) * 2022-12-30 2023-05-16 中国人寿保险股份有限公司上海数据中心 Cloud desktop data intercommunication method and system
CN116755835A (en) * 2023-06-05 2023-09-15 广州鼎甲计算机科技有限公司 Method, apparatus, computer device, medium and program product for migrating virtual machine
CN116755835B (en) * 2023-06-05 2024-05-14 广州鼎甲计算机科技有限公司 Method, apparatus, computer device, medium and program product for migrating virtual machine
CN117112072A (en) * 2023-10-25 2023-11-24 成都云祺科技有限公司 Cross-platform virtual machine drive replacement method, system and storage medium
CN117112072B (en) * 2023-10-25 2023-12-22 成都云祺科技有限公司 Cross-platform virtual machine drive replacement method, system and storage medium

Similar Documents

Publication Publication Date Title
CN110737512A (en) Cross-platform virtual machine online migration method and related components
CN109558215B (en) Backup method, recovery method and device of virtual machine and backup server cluster
US10379967B2 (en) Live rollback for a computing environment
US9811369B2 (en) Method and system for physical computer system virtualization
US8527990B1 (en) Systems and methods for migrating virtual machines
AU2014374256B2 (en) Systems and methods for improving snapshot performance
US9052949B2 (en) Scheduling a processor to support efficient migration of a virtual machine
US8621461B1 (en) Virtual machine based operating system simulation using host ram-based emulation of persistent mass storage device
JP5547727B2 (en) System and method for tracking changes to volumes
EP2840495A1 (en) Container-based processing method, device and system
US11886902B2 (en) Physical-to-virtual migration method and apparatus, and storage medium
CN107924324B (en) Data access accelerator
US11016861B2 (en) Crash recoverability for graphics processing units (GPU) in a computing environment
CN111352700A (en) Method, system, terminal and storage medium for online migration of virtual machine across clouds
CN112328365A (en) Virtual machine migration method, device, equipment and storage medium
US9645841B2 (en) Dynamic virtual machine storage usage monitoring, provisioning, and migration
US10185573B2 (en) Caching based operating system installation
US9058196B2 (en) Host machine level template caching in virtualization environments
CN106775846B (en) Method and device for online migration of physical server
US11106380B2 (en) Migration of storage for workloads between desktop and cloud environments
CN110928624A (en) Cloud desktop calling method and device for user terminal and terminal
CN114138424B (en) Virtual machine memory snapshot generation method and device and electronic equipment
CN114168263A (en) Method and application for live migration of virtual machines among multiple clusters of cloud platform
CN113986451A (en) Virtual machine migration method and device, electronic equipment and storage medium
CN114490176A (en) Disaster recovery system and disaster recovery method for Linux cross-disk volume group

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20200131

WW01 Invention patent application withdrawn after publication