CN112256397A - Virtual machine cross-platform migration method and system - Google Patents

Virtual machine cross-platform migration method and system Download PDF

Info

Publication number
CN112256397A
CN112256397A CN202011168626.5A CN202011168626A CN112256397A CN 112256397 A CN112256397 A CN 112256397A CN 202011168626 A CN202011168626 A CN 202011168626A CN 112256397 A CN112256397 A CN 112256397A
Authority
CN
China
Prior art keywords
virtual machine
target
disk
platform
source
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
CN202011168626.5A
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.)
Shanghai Yingfang Software Co ltd
Original Assignee
Shanghai Yingfang Software 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 Shanghai Yingfang Software Co ltd filed Critical Shanghai Yingfang Software Co ltd
Priority to CN202011168626.5A priority Critical patent/CN112256397A/en
Publication of CN112256397A publication Critical patent/CN112256397A/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
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • 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

Abstract

The invention discloses a virtual machine cross-platform migration method and a virtual machine cross-platform migration system, wherein the method comprises the following steps: step S1, establishing a migration rule, and after the rule is started, snapping a source virtual machine to obtain configuration information of the source virtual machine and a snap disk; step S2, creating a target disk consistent with the source virtual machine on a target platform according to the configuration information of the source virtual machine, and mounting the target disk created on the target platform to a target agent virtual machine of the target platform; step S3, a migration task is issued to a node server in the target agent virtual machine; step S4, reading the disk data of the source virtual machine by using the node server, and writing the disk data into the mounted disk; and step S5, after the node data transmission is finished, injecting drive to the target virtual machine by using the node server, and pulling up the target virtual machine according to the source virtual machine configuration obtained in the step S1.

Description

Virtual machine cross-platform migration method and system
Technical Field
The invention relates to the technical field of computer data disaster recovery backup, in particular to a virtual machine cross-platform migration method and system.
Background
In recent years, with the rapid development of information technology, enterprises are gradually increasing in information application and requirements, information coverage is increasing, and information is more and more important in life and work of people, so that the information security problem also becomes a key point in the field of computer data security at present. In the modern society, disaster recovery backup has solved the information security problem of the IT industry to a great extent and has been popularized well.
On the other hand, with the advent of the virtualization era, more and more enterprises apply virtualization technologies to core services. Virtualization technology is technology in which a plurality of application servers are collectively operated on one virtualized physical server in the form of Virtual Machines (VMs). Virtualization technology can improve resource utilization rate and has the convenience of centralized management, but also improves data security risk. Since multiple virtual machines run on one physical server (i.e., a virtualization server), once data in a physical storage device is lost, service interruption of the multiple virtual machines is caused, resulting in loss. Therefore, data backup for a virtual machine is also important in virtualization technology.
The esxi is specially designed for running the virtual machine and reducing the configuration requirement to the maximum extent so as to simplify the deployment, and the esxi virtual machine is widely applied to the core service of each enterprise. OpenStack is an open-source cloud computing management platform project, which is a combination of a series of software open-source projects, OpenStack has become mature from birth to now and can basically meet most of the requirements of cloud computing users, OpenStack platform has a plurality of projects for providing different types of services, such as Nova and circular, etc., Nova is generally used for data computing processing, and circular is used for block storage. Currently, enterprises, considering cost and policy, migrate esxi virtual machines to open source OpenStack platforms for management, thereby reducing enterprise cost.
The virtual machine cross-platform migration refers to the fact that a virtual machine consistent with a source machine is migrated from an esxi platform to an OpenStack platform, and data of the source virtual machine and data of a migrated standby virtual machine are completely consistent, so that data security of a user is guaranteed.
However, due to the limitation of the OpenStack platform, if the virtual machine operating system on the esxi platform is windows, the virtual machine cannot be booted after being migrated to the OpenStack platform, which causes enterprise loss.
Disclosure of Invention
In order to overcome the defects in the prior art, the present invention aims to provide a virtual machine cross-platform migration method and apparatus, so that after an esxi virtual machine is migrated to an OpenStack platform, the virtual machine can be normally used and has complete data, thereby improving the integrity of the data.
To achieve the above object, the present invention provides a virtual machine cross-platform migration method, which comprises the following steps:
step S1, establishing a migration rule, and after the rule is started, snapping a source virtual machine to obtain configuration information of the source virtual machine and a snap disk;
step S2, creating a target disk consistent with the source virtual machine on a target platform according to the configuration information of the source virtual machine, and mounting the target disk created on the target platform to a target agent virtual machine of the target platform;
step S3, a migration task is issued to a node server in the target agent virtual machine;
step S4, reading the disk data of the source virtual machine by using the node server, and writing the data into the mounted disk according to the disk mapping table;
and step S5, after the node data transmission is finished, injecting drive to the target virtual machine by using the node server, and pulling up the target virtual machine according to the source virtual machine configuration obtained in the step S1.
Preferably, before step S5, the method further includes the following steps:
and after the node data transmission is finished, unloading the target disk mounted on the target agent virtual machine, and deleting the snapshot in the source virtual machine.
Preferably, the source virtual machine is an esxi virtual machine, the target platform is an OpenStack platform, the target platform creates the target proxy virtual machine in advance, installs an npsvr service in the target proxy virtual machine for virtual machine operation, and installs a node server for data transmission and drive injection.
Preferably, in step S1, a migration rule is established through the npsvr service, and after the migration rule is started, the source vm snapshot is created by operating the esxi platform through the application program interface using the npsvr service, so as to obtain the source vm configuration information and read the disk change block.
Preferably, the migration rules include, but are not limited to, source virtual machine platform, target platform, and part of key information of node servers in the source virtual machine and target proxy virtual machine of the selected source virtual machine platform, for the npsvr service to acquire the required environment-related information.
Preferably, in step S3, the npsvr service issues a migration task to the node server in the target proxy vm, issues a disk mapping table between a source vm disk and a mounted disk to the node server, and in step S4, the node server writes data into the mounted disk according to the disk mapping table.
Preferably, the virtual machine of the target agent is installed with a virtio dependency package, in step S5, the node server calls a designated interface to inject a drive into a system disk of the target disk, and when pulling up a virtual machine, the npsvr service pulls up the target virtual machine according to the configuration of the source virtual machine obtained in step S1.
Preferably, after the data transmission of the node is completed, the disk mounted on the target agent virtual machine is unloaded through the npsvr service, and the snapshot in the source virtual machine is deleted.
In order to achieve the above object, the present invention further provides a virtual machine cross-platform migration system, including:
the source virtual machine is arranged on the source virtual machine platform;
the system comprises a target agent virtual machine, a migration module and a node server, wherein the target agent virtual machine is arranged on a target platform, the migration module is used for establishing a migration rule, after the rule is started, a snapshot is taken on a source virtual machine to obtain source virtual machine configuration information and a snapshot disk, a target disk consistent with the source virtual machine is established according to the source virtual machine configuration information, the established target disk is mounted to the target agent virtual machine, a migration task is issued to the node server, and a disk mapping table of the source virtual machine disk and the mounted disk is issued to the node server; and the node server reads the disk data of the source virtual machine according to the configuration information of the source virtual machine, writes the data into the mounted disk, injects a drive into the target virtual machine after the data transmission is finished, and pulls up the target virtual machine according to the configuration of the source virtual machine.
Preferably, after the node data transmission is completed, the migration module unloads the target disk mounted on the target agent virtual machine, and deletes the snapshot in the source virtual machine.
Compared with the prior art, the virtual machine cross-platform migration method and the virtual machine cross-platform migration system establish the migration rule by utilizing the migration platform, after the rule is started, the source virtual machine is snapshot to obtain the configuration information of the source virtual machine and a snapshot disk, creating a disk consistent with a source virtual machine on a target platform according to the configuration information of the source virtual machine, mounting the created new disk to a target agent virtual machine of the target platform, reading disk data of the source virtual machine according to the configuration information of the source virtual machine by using a node, writing the data into the mounted disk, and injecting a drive into the target agent virtual machine after the data transmission is finished, the target virtual machine is pulled up according to the configuration of the source virtual machine, the invention not only realizes the purpose of migrating the esxi virtual machine to the OpenStack platform, and after the esxi virtual machine is migrated to the OpenStack platform, the virtual machine which can be normally used and has complete data can be used, so that the integrity of the data is improved.
Drawings
FIG. 1 is a flowchart illustrating steps of a cross-platform migration method for virtual machines according to the present invention;
FIG. 2 is a system architecture diagram of a virtual machine cross-platform migration system according to the present invention;
fig. 3 is an architecture diagram of a virtual machine cross-platform migration system according to an embodiment of the present invention.
Detailed Description
Other advantages and capabilities of the present invention will be readily apparent to those skilled in the art from the present disclosure by describing the embodiments of the present invention with specific embodiments thereof in conjunction with the accompanying drawings. The invention is capable of other and different embodiments and its several details are capable of modification in various other respects, all without departing from the spirit and scope of the present invention.
Fig. 1 is a flowchart illustrating steps of a virtual machine cross-platform migration method according to the present invention. As shown in fig. 1, the virtual machine cross-platform migration method of the present invention is applied to a target platform, and includes the following steps:
step S1, establishing a migration rule, and after the rule is started, snapping a source virtual machine of a source platform to obtain configuration information of the source virtual machine and a snap disk. The migration rule includes the source platform, the target platform, and part of key information of the node servers in the virtual machine of the selected source platform and the virtual machine of the target platform proxy, and is used for the npsvr service to acquire the required environment-related information.
In the embodiment of the invention, a source virtual machine is an esxi virtual machine, esxi is a platform where the source machine is located, namely a source platform, a target platform in the invention is an OpenStack, the OpenStack platform creates a target proxy virtual machine in advance (only one proxy virtual machine is needed in the same OpenStack platform), an npsvr service is installed in the target proxy virtual machine for virtual machine operation, a migration rule is established through an npsvr service (the service integrates relevant operation interfaces of the esxi platform and the OpenStack platform and is used for operating the platform virtual machine), and after the rule is started, the npsvr service operates the esxi platform through an api (Application Programming Interface) to create a source machine snapshot, acquire source virtual machine configuration information and read a disk change block.
In the invention, the snapshot is created to ensure the consistency of data and not to influence the inherent state of the original machine, and the complete migration of the source virtual machine is realized based on the snapshot. The created snapshot is a temporary snapshot, and the data and configuration of the new virtual machine are acquired based on the snapshot.
Step S2, creating a disk consistent with the source virtual machine according to the configuration information of the source virtual machine, and mounting the target disk created on the target platform to the target proxy virtual machine.
In the specific embodiment of the invention, when the configuration information of the source virtual machine is obtained from the temporary snapshot of the esxi source virtual machine, a target disk consistent with the disk of the source virtual machine is created on the Openstack platform according to the configuration information of the source virtual machine to be used for storing the data of the source virtual machine for the target virtual machine to use, and the created target disk consistent with the source virtual machine is mounted on the target proxy virtual machine of the Openstack platform to be used for the node server to write in the data.
And step S3, the migration task is issued to the node server in the target agent virtual machine of the target platform, and the disk mapping table of the source virtual machine disk and the mounted disk is issued to the node server in the target agent virtual machine, so as to transmit data through the node service.
That is to say, a node server is also installed in the target proxy virtual machine of the OpenStack platform, so as to be used for data transmission and drive injection, and when a migration task is issued to the node server in the OpenStack platform proxy virtual machine through npsvr service, a disk mapping table of an esxi source virtual machine disk and a disk mounted on the OpenStack platform target proxy virtual machine is issued to the node server, so that the node server is ensured to correctly write data into an OpenStack disk of a new virtual machine corresponding to the source virtual machine disk.
And step S4, reading the disk data of the source virtual machine by using the node server, and writing the data into the mounted disk according to the disk mapping table.
Specifically, when the npsvr service acquires the source Virtual machine configuration and reads the source Virtual machine Disk change block and sends the source Virtual machine Disk change block to the node server, because the node server integrates a Virtual Disk Development Kit (VDDK), the data is read and written into the mounted Disk through the VDDK according to the Disk change block sent by the npsvr service.
Step S5, after the data transmission of the target platform node is completed, the target disk mounted on the target proxy virtual machine in the target platform is unloaded through the npsvr service, and the snapshot of the source virtual machine is deleted.
Specifically, a monitoring thread exists in an npsvr service in a target proxy virtual machine to monitor the running state of a node server at any time, if it is monitored that the node service has completed data transmission writing work, a target disk is unloaded from the target proxy virtual machine, that is, the target disk needs to be unloaded from the target proxy virtual machine after data transmission is completed, the target virtual machine created in this way can use the target disk, and at this time, a snapshot of a source virtual machine is not used, and the npsvr service directly deletes the snapshot by operating an esxi platform through an api interface. Since the target agent virtual machine is on the Openstack platform, the npsvr service can offload the target disk directly. That is, after the data transmission is completed, not only the disk mounted on the target proxy virtual machine needs to be unloaded, but also the temporary snapshot of the source virtual machine on the esxi platform needs to be cleared, so as to ensure that the state of the source virtual machine is normal.
Step S6, injecting a driver into the target virtual machine by using the node server, and pulling up the target virtual machine through the npsvr service according to the source virtual machine configuration obtained in step S1, that is, creating the target virtual machine.
In the specific embodiment of the invention, in order to solve the problem that a source virtual machine in esxi is a Windows operating system and a target virtual machine migrated to an Openstack platform is unavailable, a virtio dependency package needs to be installed in a target agent virtual machine of the Openstack platform, when the target virtual machine is pulled up, a node server calls a specified interface to obtain a drive from the target agent virtual machine, and the drive is injected into a system disk of a target disk to realize the drive injection of the target virtual machine, so that the target virtual machine of a Windows system can be normally used.
Fig. 2 is a system architecture diagram of a virtual machine cross-platform migration system according to the present invention. As shown in fig. 2, the virtual machine cross-platform migration system of the present invention includes:
the source virtual machine 20 is disposed on a source virtual machine platform, and in the specific embodiment of the present invention, the source virtual machine platform 20 is an esxi platform and provides one or more source virtual machines.
A target agent virtual machine 21, which is arranged on the target platform, wherein the target agent virtual machine is provided with a migration module and a node server, the migration module is used for establishing a migration rule, and after the migration rule is started, snapshooting a source virtual machine to obtain configuration information of the source virtual machine and a snapshot disk, creating a target disk consistent with the source virtual machine according to the configuration information of the source virtual machine, and the created target disk is mounted to the target agent virtual machine, and a migration task is issued to the node server, and the disk mapping table of the source virtual machine disk and the mounted disk is issued to the node server, the node server reads the disk data of the source virtual machine according to the configuration information of the source virtual machine, writes the data into the mounted disk, and after the data transmission is finished, injecting a drive into the target agent virtual machine, and pulling up the target agent virtual machine by the migration module according to the configuration of the source virtual machine.
In the present invention, the migration module implements the purpose of operating the platform virtual machine through the npsvr service installed in the target proxy virtual machine 21, and specifically, the migration module further includes:
and the snapshot unit is used for establishing a migration rule, and after the rule is started, taking a snapshot of the source virtual machine to obtain the configuration information of the source virtual machine and a snapshot disk.
In the embodiment of the present invention, the snapshot unit 210 establishes a migration rule through the npsvr service, and after the rule is started, the npsvr service operates the esxi platform through an api (Application Programming Interface) to create a source snapshot, obtain configuration information of a source virtual machine, and read a disk change block.
In the invention, the snapshot is created to ensure the consistency of data and not to influence the inherent state of the original machine, and the complete migration of the source virtual machine is realized based on the snapshot. The created snapshot is a temporary snapshot, and the data and configuration of the new virtual machine are acquired based on the snapshot.
And the target disk creating unit is used for creating a target disk consistent with the source virtual machine according to the configuration information of the source virtual machine and mounting a new disk created on the target platform to the target agent virtual machine.
In the specific embodiment of the present invention, after the snapshot unit obtains the configuration information of the source virtual machine from the temporary snapshot of the esxi source virtual machine, the target disk creating unit creates, according to the configuration information of the source virtual machine, a target disk consistent with the disk of the source virtual machine on the Openstack platform, so as to store the data of the source virtual machine for the target virtual machine to use, and mounts the created new disk consistent with the source virtual machine onto the target proxy virtual machine of the Openstack platform, so as to allow the node server to write in the data.
And the task issuing unit is used for issuing the migration task to a node server in a target agent virtual machine of the target platform, and issuing a disk mapping table of a source virtual machine disk and a mounting disk to the node server so as to transmit data through a node service.
That is to say, when the task issuing unit issues the migration task to the node server in the OpenStack platform proxy virtual machine through the npsvr service, the node server issues the disk mapping table of the esxi source virtual machine disk and the disk mounted on the OpenStack platform target proxy virtual machine to the node server, so as to ensure that the node server correctly writes the data into the OpenStack disk of the new virtual machine corresponding to the source virtual machine disk.
And the snapshot deleting unit is used for unloading the target disk mounted on the target agent virtual machine in the target platform through the npsvr service and deleting the snapshot of the source virtual machine after the data transmission of the target platform node is finished.
In the invention, a snapshot deleting unit monitors the running state of a node server at any time through a monitoring thread existing in an npsvr service, if the node service is monitored to finish data transmission writing work, a target disk is unloaded from a target agent virtual machine, at the moment, a snapshot of a source virtual machine is not used, and the temporary snapshot on the source virtual platform is directly deleted by further operating an esxi platform through the npsvr service through an api interface. Since the target agent virtual machine is on the Openstack platform, the npsvr service can offload the target disk directly. That is, after the data transmission is completed, not only the disk mounted on the target proxy virtual machine needs to be unloaded, but also the temporary snapshot of the source virtual machine on the esxi platform needs to be cleared, so as to ensure that the state of the source virtual machine is normal.
And the target virtual machine pull-up unit is used for pulling up the target virtual machine through the npsvr service according to the acquired source virtual machine configuration after the node server injects drive to the target virtual machine.
In the embodiment of the invention, in order to solve the problem that a source virtual machine in esxi is a Windows operating system and a target virtual machine migrated to an Openstack platform is unavailable, a virtio dependency package needs to be installed in a target agent virtual machine of the Openstack platform, when the target virtual machine is pulled up, a specified interface is called at a node server to realize drive injection of the target virtual machine, and a target virtual machine pulling-up unit pulls up the target virtual machine through npsvr service according to the obtained source virtual machine configuration so as to ensure that the target virtual machine of the Windows system can be normally used.
In the invention, the target agent virtual machine, namely the target agent virtual machine of the OpenStack platform, is also provided with a node server for data transmission and drive injection, and after receiving a migration task issued by a task issuing unit and a disk mapping table of a source virtual machine disk and a mounted disk, the node server reads the disk data of the source virtual machine and writes the data into the mounted disk according to the disk mapping table.
Specifically, after the source Virtual machine configuration is acquired through the npsvr service and the source Virtual machine Disk change block is read and sent to the node server, since the node server integrates a Virtual Disk Development Kit (VDDK), data is read and written into the mounted Disk through the VDDK according to the Disk change block sent by the npsvr service.
When the target virtual machine pull-up unit pulls up the target virtual machine through the npsvr service, the node server calls a specified interface to realize drive injection of the target virtual machine (drive injection into a system disk of a target disk), and then pulls up the target virtual machine through the npsvr service according to source virtual machine configuration acquired by the npsvr service, so as to ensure that the target proxy virtual machine of the windows system can be normally used.
Examples
As shown in fig. 3, in this embodiment, the virtual machine cross-platform migration system of the present invention includes three parts, namely, a source esxi platform, an npsvr service, and an Openstack platform, where esxi is a platform where a source virtual machine is located; the Openstack platform is a target platform, a target agent virtual machine VM is created in advance by the Openstack platform, an agent node VM with an i2node is installed in the target agent virtual machine VM and used for data transmission and drive injection, an npsvr service on the target agent virtual machine operates an esxi platform through an api to create a source machine snapshot, read a disk change block, create and mount a disk on the target agent virtual machine of the Openstack platform, and the like.
According to fig. 3, in this embodiment, the virtual machine cross-platform migration process is as follows:
s1: and establishing a migration rule through npsvr service, and after the rule is started, taking a snapshot on a source virtual machine (VM1 and VM2) in the esxi platform, and obtaining configuration information of the source virtual machine and a snapshot disk.
In the invention, the snapshot is created to ensure the consistency of data and not to influence the inherent state of the original machine, and the complete migration of the source virtual machine is realized based on the snapshot. The snapshot is a temporary snapshot, and the data and configuration of the new virtual machine are acquired based on the snapshot.
S2: the npsvr service creates a target disk consistent with the source virtual machine (VM1 and VM2) at the target Openstack platform according to the source virtual machine configuration information.
Here, a disk with the same size as the source virtual machine disk is created in the Openstack platform, and the source virtual machine data is stored for a new virtual machine (target virtual machine).
S3: and mounting the new disk created on the Openstack platform to the target agent virtual machine.
And mounting the disk created by the S2 on a target proxy virtual machine of the Openstack platform, and writing data into the virtual machine by the proxy node vm with the i2 node.
S4: and issuing a migration task to a proxy node vm with i2node in the Openstack platform proxy virtual machine, and sending a disk corresponding table to the proxy node vm with i2 node.
And the npsvr issues a mapping table of the source machine disk and the disk mounted on the Openstack to the proxy node vm with i2node, so as to ensure that the proxy node vm with i2node correctly writes the data into the Openstack disk corresponding to the source machine disk.
S5: and the proxy virtual machine in the Openstack platform reads the disk data on the source esxi platform by using the proxy node vm with i2node, and writes the data into the specified disk correspondingly mounted on S3. Because the proxy node vm with i2node integrates VDDK (Virtual Disk Development Kit), according to the Disk change block issued by the npsvr service, data is read and written into the mounted Disk through VDDK
S6: after the node data transmission is completed, the target agent virtual machine unloads the target disk mounted on the target agent virtual machine in the Openstack platform through the npsvr service, and deletes the snapshot of the source virtual machine in the esxi platform through the api interface.
That is, after the data transmission is completed, not only the disk mounted on the proxy vm needs to be unloaded, but also the temporary snapshot of the source vm needs to be cleared to ensure that the state of the source vm is normal
S7: and pulling up the virtual machine according to the virtual machine configuration obtained in the step S1.
And the proxy node vm with i2node injects a drive into a target disk system disk created by the Openstack to ensure that the target virtual machine can be normally used after being pulled up, and the target proxy virtual machine pulls up the target virtual machine through npsvr service according to the source virtual machine configuration obtained in the step S1.
Therefore, by the method and the device, during the cross-platform migration of the virtual machine, only one proxy virtual machine needs to be installed on the openstack platform, the node server is installed to perform some simple configuration storage and injection dependence packages, the esxi virtual machine can be migrated to the openstack platform without occupying more physical space to store data, and a lot of resources are saved.
In summary, the virtual machine cross-platform migration method and system of the present invention establish the migration rule by using the migration platform, after the rule is started, the source virtual machine is snapshot to obtain the configuration information of the source virtual machine and a snapshot disk, creating a target disk consistent with the source virtual machine on a target platform according to the configuration information of the source virtual machine, mounting the created new disk to a target agent virtual machine of the target platform, reading the disk data of the source virtual machine according to the configuration information of the source virtual machine by using a node, writing the data into the mounted disk, and injecting a drive into the target agent virtual machine after the data transmission is finished, the target virtual machine is pulled up according to the configuration of the source virtual machine, the invention not only realizes the purpose of migrating the esxi virtual machine to the OpenStack platform, and after the esxi virtual machine is migrated to the OpenStack platform, the virtual machine which can be normally used and has complete data can be used, so that the integrity of the data is improved.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Modifications and variations can be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the present invention. Therefore, the scope of the invention should be determined from the following claims.

Claims (10)

1. A virtual machine cross-platform migration method comprises the following steps:
step S1, establishing a migration rule, and after the rule is started, snapping a source virtual machine to obtain configuration information of the source virtual machine and a snap disk;
step S2, creating a target disk consistent with the source virtual machine on a target platform according to the configuration information of the source virtual machine, and mounting the target disk created on the target platform to a target agent virtual machine of the target platform;
step S3, a migration task is issued to a node server in the target agent virtual machine;
step S4, reading the disk data of the source virtual machine by using the node server, and writing the data into the mounted target disk according to the disk mapping table;
and step S5, after the node data transmission is finished, injecting drive to the target virtual machine by using the node server, and pulling up the target virtual machine according to the source virtual machine configuration obtained in the step S1.
2. The virtual machine cross-platform migration method of claim 1, wherein: before step S5, the method further includes the following steps:
and after the node data transmission is finished, unloading the target disk mounted on the target agent virtual machine, and deleting the snapshot in the source virtual machine.
3. The virtual machine cross-platform migration method of claim 2, wherein: the source virtual machine is an esxi virtual machine, the target platform is an OpenStack platform, the target platform creates the target agent virtual machine in advance, an npsvr service is installed in the target agent virtual machine for virtual machine operation, and a node server is installed for data transmission and drive injection.
4. The virtual machine cross-platform migration method of claim 3, wherein: in step S1, a migration rule is established through the npsvr service, and after the migration rule is started, the source vm snapshot is created by operating the esxi platform through the application program interface using the npsvr service, and the source vm configuration information and the disk change block are obtained.
5. The virtual machine cross-platform migration method of claim 4, wherein: the migration rules include, but are not limited to, the source virtual machine platform, the target platform, and selected portions of the key information of the node servers in the source virtual machine and the target proxy virtual machine of the source virtual machine platform for the npsvr service to obtain the required environment-related information.
6. The virtual machine cross-platform migration method of claim 4, wherein: in step S3, the npsvr service issues a migration task to the node server in the target proxy vm, issues a disk mapping table between a source vm disk and a mounted disk to the node server, and in step S4, the node server writes data into the mounted disk according to the disk mapping table.
7. The virtual machine cross-platform migration method of claim 6, wherein: in step S5, the node server calls a designated interface to inject a drive into a system disk of the target disk, and when pulling up a virtual machine, the npsvr service pulls up the target virtual machine according to the source virtual machine configuration obtained in step S1.
8. The virtual machine cross-platform migration method of claim 7, wherein: and after the node data transmission is finished, unloading the disk mounted on the target agent virtual machine through the npsvr service, and deleting the snapshot in the source virtual machine.
9. A virtual machine cross-platform migration system comprising:
the source virtual machine is arranged on the source virtual machine platform;
the system comprises a target agent virtual machine, a migration module and a node server, wherein the target agent virtual machine is arranged on a target platform, the migration module is used for establishing a migration rule, after the rule is started, a snapshot is taken on a source virtual machine to obtain source virtual machine configuration information and a snapshot disk, a target disk consistent with the source virtual machine is established according to the source virtual machine configuration information, the established target disk is mounted to the target agent virtual machine, a migration task is issued to the node server, and a disk mapping table of the source virtual machine disk and the mounted disk is issued to the node server; and the node server reads the disk data of the source virtual machine according to the configuration information of the source virtual machine, writes the data into the mounted target disk, injects a drive into the target virtual machine after the data transmission is finished, and pulls up the target virtual machine according to the configuration of the source virtual machine.
10. The virtual machine cross-platform migration system of claim 9, wherein: and after the node data transmission is finished, the migration module unloads the target disk mounted on the target agent virtual machine and deletes the snapshot in the source virtual machine.
CN202011168626.5A 2020-10-28 2020-10-28 Virtual machine cross-platform migration method and system Pending CN112256397A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011168626.5A CN112256397A (en) 2020-10-28 2020-10-28 Virtual machine cross-platform migration method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011168626.5A CN112256397A (en) 2020-10-28 2020-10-28 Virtual machine cross-platform migration method and system

Publications (1)

Publication Number Publication Date
CN112256397A true CN112256397A (en) 2021-01-22

Family

ID=74262536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011168626.5A Pending CN112256397A (en) 2020-10-28 2020-10-28 Virtual machine cross-platform migration method and system

Country Status (1)

Country Link
CN (1) CN112256397A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817695A (en) * 2021-02-07 2021-05-18 上海英方软件股份有限公司 Method and system for automatically deploying virtual machine on Openstack platform
CN112817702A (en) * 2021-02-25 2021-05-18 紫光云技术有限公司 Virtual machine automation rapid cross-architecture migration method
CN113282571A (en) * 2021-05-26 2021-08-20 北京金山云网络技术有限公司 Data transfer method and device, electronic equipment and storage medium
CN113515343A (en) * 2021-04-23 2021-10-19 上海英方软件股份有限公司 Virtual machine migration system and method
CN117112072A (en) * 2023-10-25 2023-11-24 成都云祺科技有限公司 Cross-platform virtual machine drive replacement method, system and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279000A (en) * 2015-11-19 2016-01-27 北京北信源软件股份有限公司 Virtual machine software installing method, installing controller and installing agent
CN106775922A (en) * 2016-11-22 2017-05-31 山东浪潮云服务信息科技有限公司 A kind of virtual machine migration method based on Plugin Mechanism
CN108255575A (en) * 2017-12-06 2018-07-06 顺丰科技有限公司 A kind of virtual machine migration method and device
US20190340003A1 (en) * 2018-05-01 2019-11-07 Vmware, Inc. Live migration of virtual machines across heterogeneous virtual machine management domains
CN110737512A (en) * 2019-10-25 2020-01-31 北京浪潮数据技术有限公司 Cross-platform virtual machine online migration method and related components
CN110928728A (en) * 2019-11-27 2020-03-27 上海英方软件股份有限公司 Virtual machine copying and switching method and system based on snapshot
CN111143128A (en) * 2019-12-24 2020-05-12 南京壹进制信息科技有限公司 Openstack cloud host data protection method and system
CN111651238A (en) * 2020-06-03 2020-09-11 上海英方软件股份有限公司 System and method for acquiring effective data in virtual machine protection
CN111679889A (en) * 2020-06-10 2020-09-18 广州市品高软件股份有限公司 Virtual machine conversion migration method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279000A (en) * 2015-11-19 2016-01-27 北京北信源软件股份有限公司 Virtual machine software installing method, installing controller and installing agent
CN106775922A (en) * 2016-11-22 2017-05-31 山东浪潮云服务信息科技有限公司 A kind of virtual machine migration method based on Plugin Mechanism
CN108255575A (en) * 2017-12-06 2018-07-06 顺丰科技有限公司 A kind of virtual machine migration method and device
US20190340003A1 (en) * 2018-05-01 2019-11-07 Vmware, Inc. Live migration of virtual machines across heterogeneous virtual machine management domains
CN110737512A (en) * 2019-10-25 2020-01-31 北京浪潮数据技术有限公司 Cross-platform virtual machine online migration method and related components
CN110928728A (en) * 2019-11-27 2020-03-27 上海英方软件股份有限公司 Virtual machine copying and switching method and system based on snapshot
CN111143128A (en) * 2019-12-24 2020-05-12 南京壹进制信息科技有限公司 Openstack cloud host data protection method and system
CN111651238A (en) * 2020-06-03 2020-09-11 上海英方软件股份有限公司 System and method for acquiring effective data in virtual machine protection
CN111679889A (en) * 2020-06-10 2020-09-18 广州市品高软件股份有限公司 Virtual machine conversion migration method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817695A (en) * 2021-02-07 2021-05-18 上海英方软件股份有限公司 Method and system for automatically deploying virtual machine on Openstack platform
CN112817702A (en) * 2021-02-25 2021-05-18 紫光云技术有限公司 Virtual machine automation rapid cross-architecture migration method
CN113515343A (en) * 2021-04-23 2021-10-19 上海英方软件股份有限公司 Virtual machine migration system and method
CN113282571A (en) * 2021-05-26 2021-08-20 北京金山云网络技术有限公司 Data transfer method and device, electronic equipment and storage medium
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
CN112256397A (en) Virtual machine cross-platform migration method and system
US8359593B2 (en) Computer machine migration of file system images using a redo-log file
US9069465B2 (en) Computer system, management method of computer resource and program
US8635395B2 (en) Method of suspending and resuming virtual machines
US9183099B2 (en) Replication of a write-back cache using a placeholder virtual machine for resource management
US10296423B2 (en) System and method for live virtual incremental restoring of data from cloud storage
US9600373B2 (en) Method and system for cluster resource management in a virtualized computing environment
EP2800303B1 (en) Switch method, device and system for virtual application dual machine in cloud environment
CN108469986B (en) Data migration method and device
US8621461B1 (en) Virtual machine based operating system simulation using host ram-based emulation of persistent mass storage device
US20150111567A1 (en) Apparatus for End-User Transparent Utilization of Computational, Storage, and Network Capacity of Mobile Devices, and Associated Methods
US8924969B2 (en) Virtual machine image write leasing
US10445186B1 (en) Associating a guest application within a virtual machine to create dependencies in backup/restore policy
US11210132B2 (en) Virtual machine migration in virtualization environment having different virtualization systems
WO2003088002A2 (en) Managing multiple virtual machines
US9571584B2 (en) Method for resuming process and information processing system
US10846079B2 (en) System and method for the dynamic expansion of a cluster with co nodes before upgrade
US11886902B2 (en) Physical-to-virtual migration method and apparatus, and storage medium
CN112328365A (en) Virtual machine migration method, device, equipment and storage medium
CN108182128A (en) Based on XEN without Agent virtual back-up restoring method
CN112711469A (en) Cloud host migration method and device, computer equipment and storage medium
CN109308232B (en) Method, device and system for rollback after virtual machine live migration fault
US10891226B1 (en) Virtual address space dump in a computer system
US10606681B2 (en) Incremental dump with fast reboot
CN110688195B (en) Instant restore and instant access of a HYPER-V VM and applications running inside the VM using the data domain boost fs

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

Application publication date: 20210122

WD01 Invention patent application deemed withdrawn after publication