CN113515344A - Method and device for automatically migrating virtual machine across technical platforms - Google Patents

Method and device for automatically migrating virtual machine across technical platforms Download PDF

Info

Publication number
CN113515344A
CN113515344A CN202110536197.0A CN202110536197A CN113515344A CN 113515344 A CN113515344 A CN 113515344A CN 202110536197 A CN202110536197 A CN 202110536197A CN 113515344 A CN113515344 A CN 113515344A
Authority
CN
China
Prior art keywords
virtual machine
disk
target virtual
file
technical
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.)
Granted
Application number
CN202110536197.0A
Other languages
Chinese (zh)
Other versions
CN113515344B (en
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110536197.0A priority Critical patent/CN113515344B/en
Publication of CN113515344A publication Critical patent/CN113515344A/en
Application granted granted Critical
Publication of CN113515344B publication Critical patent/CN113515344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • GPHYSICS
    • G06COMPUTING; 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

A cross-technology-platform automatic virtual machine migration method and a device relate to the technical field of virtualization and cloud computing, can be applied to the financial field and other fields, and comprises the following steps: calling a first technical platform API to close the target virtual machine according to the source IP address srcIP and acquiring identity information of the target virtual machine and position information of the host machine; calling a host machine API (application program interface) through a remote command according to the identity information and the position information to generate a target virtual machine export file, and converting the export file into a disk file with a preset first format; importing the disk file into a second technical platform, and performing corresponding format conversion and renaming on the disk file through the second technical platform to generate a data file; and acquiring configuration information of a target virtual machine of the second technical platform, splicing a starting command of the target virtual machine according to the configuration information, and starting the target virtual machine on the second technical platform through the starting command and the data file.

Description

Method and device for automatically migrating virtual machine across technical platforms
Technical Field
The invention relates to the technical field of virtualization and cloud computing, can be applied to the financial field and other fields, and particularly relates to a cross-technology-platform automatic virtual machine migration method and device.
Background
In the process of transforming the technical architecture, a new technical platform is used to replace an old technical platform, for example, a virtualization technology is changed from VMware to Openstack, and in order to ensure service continuity and shorten downtime, system and data migration needs to be performed between different technical platforms.
In the prior art, each platform is internally provided with a richer migration or copy function, but in the technical scheme of cross-technology platform migration, the steps are manual steps, a large amount of background operations are needed, data conversion, parameter transmission and long-time waiting are carried out, and the problems of complex operation, easy occurrence of operation errors and the like exist.
Disclosure of Invention
The invention aims to provide a cross-technology-platform automatic virtual machine migration method and a cross-technology-platform automatic virtual machine migration device, which overcome the defects in the prior art, enable the automatic virtual machine migration between two different technology platforms, and reduce the time consumption of manual operation and the possibility of manual error; and by means of parameterization, simultaneous migration of multiple virtual machines can be supported, and migration efficiency is improved.
To achieve the above object, the present invention provides a method for automatically migrating a virtual machine across technology platforms, the method comprising: calling a first technical platform API to close a target virtual machine according to a source IP address srcIP and acquiring identity information of the target virtual machine and position information of a host machine; calling a host machine API (application program interface) through a remote command according to the identity information and the position information to generate a target virtual machine export file, and converting the export file into a disk file with a preset first format; importing the disk file into a second technical platform, and performing corresponding format conversion and renaming on the disk file through the second technical platform to generate a data file; the method comprises the steps of obtaining configuration information of a target virtual machine of a second technical platform, splicing a starting command of the target virtual machine according to the configuration information, and starting the target virtual machine on the second technical platform through the starting command and a data file.
In the above method for automatically migrating a virtual machine across technical platforms, preferably, the importing the disk file into a second technical platform further includes: acquiring the disk capacity, and importing the disk file into preset distributed storage when the disk capacity meets a preset rule; and generating a block disk, recording the disk number, and deleting the block disk file.
In the above method for automatically migrating a virtual machine across technology platforms, preferably, before obtaining configuration information of a target virtual machine of a second technology platform, the method further includes: and acquiring boot disk information, and setting a boot disk of the target virtual machine on the second technical platform according to the boot disk information and the data file.
In the above method for automatically migrating a virtual machine across technical platforms, preferably, the start command includes: the system comprises specification parameters of a target virtual machine, network card parameters, magnetic disk parameters, starting disk parameters and virtual machine name parameters.
In the above method for automatically migrating a virtual machine across technical platforms, preferably, the location information of the host includes a host address, a host user name, and a host password.
The invention also provides a cross-technology platform automatic virtual machine migration device, which is used for migrating virtual machines of different technology platforms, and comprises a master control node module and a configuration management module; the master control node module is used for calling a first technical platform API to close the target virtual machine according to the source IP address srcIP; calling a host machine API (application program interface) through a remote command according to the identity information and the position information of the target virtual machine to generate a target virtual machine export file, and converting the export file into a disk file with a preset first format; importing the disk file into a second technical platform, and performing corresponding format conversion and renaming on the disk file through the second technical platform to generate a data file; splicing a starting command of a target virtual machine according to configuration information of the target virtual machine of a second technical platform, and starting the target virtual machine on the second technical platform through the starting command and the data file; the configuration management module is used for acquiring the identity information of the target virtual machine and the position information of the host machine; and acquiring configuration information of a target virtual machine of the second technical platform.
In the above device for automatically migrating a virtual machine across technical platforms, preferably, the master control node module further includes a derivation unit, where the derivation unit is configured to obtain a disk capacity, and when the disk capacity meets a preset rule, import the disk file into a preset distributed storage; and generating a block disk, recording the disk number, and deleting the block disk file.
In the above device for automatically migrating a virtual machine across technical platforms, preferably, the general control node module further includes an analysis unit, where the analysis unit is configured to obtain boot disk information, and set a boot disk of a target virtual machine on a second technical platform according to the boot disk information and the data file.
In the above apparatus for automatically migrating a virtual machine across technology platforms, preferably, the total control node module is in communication connection with the first technology platform and the second technology platform in a ssh mutual communication manner.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the computer program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
The invention has the beneficial technical effects that: the problem of virtual machine migration across technical platforms is solved, and automatic migration can be achieved through simple commands. Migration of VMware to Openstack platform and between different Openstack platforms is supported. The used parameters only comprise a source IP address and a target IP address, all parameters required in the migration process are obtained through commands or APIs, complex operation steps and commands do not need to be memorized, various lengthy id values do not need to be concerned, the operation and the use can be carried out without professional backgrounds, and the possibility of manual misoperation is reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
fig. 1 is a schematic flowchart of a cross-technology platform virtual machine auto-migration method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a disk file processing according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of virtual machine migration according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for automatically migrating a virtual machine across technical platforms according to an embodiment of the present invention;
fig. 5 is a schematic application flow diagram of an apparatus for automatically migrating a virtual machine across technology platforms according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following detailed description of the embodiments of the present invention will be provided with reference to the drawings and examples, so that how to apply the technical means to solve the technical problems and achieve the technical effects can be fully understood and implemented. It should be noted that, unless otherwise specified, the embodiments and features of the embodiments of the present invention may be combined with each other, and the technical solutions formed are within the scope of the present invention.
Additionally, the steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions and, although a logical order is illustrated in the flow charts, in some cases, the steps illustrated or described may be performed in an order different than here.
Referring to fig. 1, the method for automatically migrating a virtual machine across technical platforms according to the present invention includes:
s101, calling a first technical platform API to close a target virtual machine according to a source IP address srcIP and acquiring identity information of the target virtual machine and position information of a host machine;
s102, calling a host machine API (application program interface) through a remote command according to the identity information and the position information to generate a target virtual machine export file, and converting the export file into a disk file with a preset first format;
s103, importing the disk file into a second technical platform, and performing corresponding format conversion and renaming on the disk file through the second technical platform to generate a data file;
s104, acquiring configuration information of a target virtual machine of a second technical platform, splicing a starting command of the target virtual machine according to the configuration information, and starting the target virtual machine on the second technical platform through the starting command and the data file.
In the above embodiment, the start command includes: the system comprises specification parameters of a target virtual machine, network card parameters, magnetic disk parameters, starting disk parameters and virtual machine name parameters. The position information of the host machine comprises a host machine address, a host machine user name and a host machine password. Therefore, in actual work, a master control node can be created, a source end and a target end technical platform are controlled, a data transfer and format conversion platform is provided, and all operations are concentrated on the same node; through parameter transmission and splicing, commands required by all the steps are generated and automatically executed according to the flow, and the migration of the whole flow can be completed only by one command at the master control node, so that the time consumption of manual operation and the possibility of manual error are reduced; and by means of parameterization, simultaneous migration of multiple virtual machines can be supported, and migration efficiency is improved.
Referring to fig. 2, in an embodiment of the present invention, importing the disk file into a second technology platform further includes:
s201, acquiring the disk capacity, and importing the disk file into a preset distributed storage when the disk capacity meets a preset rule;
s202, generating a block disk, recording a disk number, and deleting a block disk file.
In actual work, each virtual machine export file corresponds to more than one disk file, and a plurality of virtual machines have a plurality of disk files, so that the files corresponding to different virtual machines can be determined by the method in order to determine the files corresponding to the different virtual machines; meanwhile, the embodiment can realize batch migration of the virtual machines, so that the efficiency is greatly saved.
In an embodiment of the present invention, before obtaining the configuration information of the target virtual machine of the second technology platform, the method further includes: and acquiring boot disk information, and setting a boot disk of the target virtual machine on the second technical platform according to the boot disk information and the data file. In order to make the overall application of the above embodiments provided by the present invention more clearly understood, the following will be made by taking actual work as an example to integrally describe the above embodiments, and it should be understood by those skilled in the art that this example is only for facilitating understanding of the application flow of the above embodiments, and is not limited in any way.
Referring to fig. 3, in actual work, the migration flow is as follows:
s301, finding a virtual machine to be migrated in an old technical platform, and shutting down the virtual machine;
s302, according to the ip, inquiring the id of the virtual machine and the ip of the host machine;
s303, exporting the virtual machine into a plurality of disk files;
s304, copying the plurality of disk files to a new technical platform;
s305, converting the plurality of disk files into a data format supported by a new technical platform;
s306, importing the disk file into distributed storage;
s307, renaming the imported disk data into a format required by the new technical platform;
s308, creating a network card required by the new virtual machine, and configuring a new IP address;
s309, inquiring the flavoID corresponding to the new virtual machine specification through the configuration management system;
s310, spelling a command for creating the virtual machine, wherein the command comprises parameters such as specification, network card, disk, starting disk information, virtual machine name and the like;
s311 executes the create command to complete the start of the new virtual machine.
Referring to fig. 4, the present invention further provides an automatic migration apparatus for a cross-technology platform virtual machine, which is used for migrating virtual machines of different technology platforms, and includes a general control node module and a configuration management module; the master control node module is used for calling a first technical platform API to close the target virtual machine according to the source IP address srcIP; calling a host machine API (application program interface) through a remote command according to the identity information and the position information of the target virtual machine to generate a target virtual machine export file, and converting the export file into a disk file with a preset first format; importing the disk file into a second technical platform, and performing corresponding format conversion and renaming on the disk file through the second technical platform to generate a data file; splicing a starting command of a target virtual machine according to configuration information of the target virtual machine of a second technical platform, and starting the target virtual machine on the second technical platform through the starting command and the data file; the configuration management module is used for acquiring the identity information of the target virtual machine and the position information of the host machine; and acquiring configuration information of a target virtual machine of the second technical platform. The master control node module is in communication connection with the first technical platform and the second technical platform in a ssh mutual communication mode.
In the above embodiment, the master control node module further includes a exporting unit, where the exporting unit is configured to obtain a disk capacity, and when the disk capacity meets a preset rule, import the disk file into a preset distributed storage; and generating a block disk, recording the disk number, and deleting the block disk file. Further, the master control node module further includes an analysis unit, where the analysis unit is configured to obtain boot disk information, and set a boot disk of the target virtual machine on the second technology platform according to the boot disk information and the data file.
Referring to fig. 5, in actual work, the operation flow of the cross-technology-platform virtual machine auto-migration apparatus provided by the present invention is as follows:
1. calling an API (application program interface) of an old technical platform according to the source IP address srcIP, and closing the virtual machine;
2. calling a configuration management system API according to the source IP address srcIP, and inquiring a virtual machine name vmName, a host machine address hostIP, a host machine user name hostUser and a host machine password hostPass;
3. according to the name vmName of the virtual machine and the hostIP of the host machine, calling the API of the host machine through a remote command, executing an ovattool-nonsLVerify vi:// $ hostUser $ hostPass @ $ hostIP/$ vmName $ srcIP. ova command, and generating an ova file exported by the virtual machine;
4. execute the/libgusestfs/run virt-v2v-i ova $ srcIP. ova-o local-os. -of qcow2 commands to convert the ova files to disk files in qcow2 format, such as $ srcIP-sda and $ srcIP-sdb;
5. executing a qemu-img info $ srcIP-sda command to obtain the disk capacity $ sda-size;
6. executing a qemu-img convert-f qcow2-O raw $ srcIP-sdarbd command, and importing a disk file in a qcow2 format into distributed storage Ceph;
7. executing the circumferentially create $ sda-size command, generating a block disk, and recording the circumferentially ID;
8. executing an rbd rm volumes/volume-circumferentially ID command, and deleting a block disk file;
9. executing rbd rename volumes/$ srCIPIP-sda volumes/volumes- $ circenderID, and renaming the imported file;
10. by analogy, introducing other multiple disks into Ceph and completing renaming;
11. setting sda to be a boot disk according to the boot disk information, and executing a shader set-bootable $ circular ID-sda true command;
12. acquiring the specification information flavoID and the NICD of the network card information of the new virtual machine by calling the API of the configuration management system;
13. a new virtual machine starting command nova boot-navigator id-nic net-id ═ netID, v4-fixed-ip ═ tarIP-block-device id ═ circular id-sda, source ═ circular, dest ═ circular, bootindex ═ 0-block-device id ═ circular id-sdb, source ═ circular, dest ═ circular, bootindex ═ 1 ═ vmName;
14. the new virtual machine completes creation and starts.
The invention has the beneficial technical effects that:
the method solves the problem of virtual machine migration of a cross-technology platform, and automatic migration can be realized through a simple command. Migration of VMware to Openstack platform and between different Openstack platforms is supported.
And secondly, the used parameters are only the source IP address and the target IP address, and all the parameters required in the migration process are obtained through commands or APIs (application program interfaces), so that complicated operation steps and commands do not need to be memorized, various lengthy id values do not need to be concerned, the operation and the use can be realized without professional backgrounds, and the possibility of manual misoperation is reduced.
And thirdly, a master control node is constructed to execute and schedule commands, and various nodes of the new and old technology platforms do not need to be logged in, so that the operation complexity is reduced, and the professional knowledge of the new and old technology platforms does not need to be known.
And fourthly, the data export and the transfer storage are intensively deployed on the master control node, a large amount of temporary storage space does not need to be prepared on each host of the old technical platform, the resource investment is saved, and the effect is more obvious on a large-scale cluster.
And fifthly, multiple groups of virtual machines can be migrated concurrently, and migration efficiency is improved.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the computer program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
As shown in fig. 6, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in FIG. 6; furthermore, the electronic device 600 may also comprise components not shown in fig. 6, which may be referred to in the prior art.
As shown in fig. 6, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method for automatic migration of a virtual machine across technology platforms, the method comprising:
calling a first technical platform API to close a target virtual machine according to a source IP address srcIP and acquiring identity information of the target virtual machine and position information of a host machine;
calling a host machine API (application program interface) through a remote command according to the identity information and the position information to generate a target virtual machine export file, and converting the export file into a disk file with a preset first format;
importing the disk file into a second technical platform, and performing corresponding format conversion and renaming on the disk file through the second technical platform to generate a data file;
the method comprises the steps of obtaining configuration information of a target virtual machine of a second technical platform, splicing a starting command of the target virtual machine according to the configuration information, and starting the target virtual machine on the second technical platform through the starting command and a data file.
2. The method for automatically migrating a virtual machine across technology platforms according to claim 1, wherein importing the disk file into a second technology platform further comprises:
acquiring the disk capacity, and importing the disk file into preset distributed storage when the disk capacity meets a preset rule;
and generating a block disk, recording the disk number, and deleting the block disk file.
3. The method for automatically migrating a virtual machine across technology platforms according to claim 1, wherein obtaining configuration information of a target virtual machine of a second technology platform further comprises:
and acquiring boot disk information, and setting a boot disk of the target virtual machine on the second technical platform according to the boot disk information and the data file.
4. The method for automatically migrating a virtual machine across technical platforms according to claim 3, wherein the start command comprises: the system comprises specification parameters of a target virtual machine, network card parameters, magnetic disk parameters, starting disk parameters and virtual machine name parameters.
5. The method for automatically migrating the virtual machine across the technical platforms according to claim 1, wherein the location information of the host comprises a host address, a host user name and a host password.
6. A cross-technology-platform automatic virtual machine migration device is used for migrating virtual machines of different technology platforms, and is characterized by comprising a master control node module and a configuration management module;
the master control node module is used for calling a first technical platform API to close the target virtual machine according to the source IP address srcIP; calling a host machine API (application program interface) through a remote command according to the identity information and the position information of the target virtual machine to generate a target virtual machine export file, and converting the export file into a disk file with a preset first format; importing the disk file into a second technical platform, and performing corresponding format conversion and renaming on the disk file through the second technical platform to generate a data file; splicing a starting command of a target virtual machine according to configuration information of the target virtual machine of a second technical platform, and starting the target virtual machine on the second technical platform through the starting command and the data file;
the configuration management module is used for acquiring the identity information of the target virtual machine and the position information of the host machine; and acquiring configuration information of a target virtual machine of the second technical platform.
7. The device for automatically migrating the virtual machine across the technical platforms according to claim 6, wherein the master control node module further comprises a exporting unit, the exporting unit is used for acquiring the disk capacity, and when the disk capacity meets a preset rule, the disk file is imported to a preset distributed storage; and generating a block disk, recording the disk number, and deleting the block disk file.
8. The device for automatically migrating the virtual machines across the technical platforms according to claim 6, wherein the general control node module further includes an analysis unit, and the analysis unit is configured to obtain boot disk information and set a boot disk of a target virtual machine on a second technical platform according to the boot disk information and the data file.
9. The device for automatically migrating the virtual machine across the technical platforms according to claim 6, wherein the central control node module is communicatively connected to the first technical platform and the second technical platform through ssh mutual communication.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 5 when executing the computer program.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 5 by a computer.
CN202110536197.0A 2021-05-17 2021-05-17 Cross-technology-platform virtual machine automatic migration method and device Active CN113515344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110536197.0A CN113515344B (en) 2021-05-17 2021-05-17 Cross-technology-platform virtual machine automatic migration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110536197.0A CN113515344B (en) 2021-05-17 2021-05-17 Cross-technology-platform virtual machine automatic migration method and device

Publications (2)

Publication Number Publication Date
CN113515344A true CN113515344A (en) 2021-10-19
CN113515344B CN113515344B (en) 2024-05-28

Family

ID=78064288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110536197.0A Active CN113515344B (en) 2021-05-17 2021-05-17 Cross-technology-platform virtual machine automatic migration method and device

Country Status (1)

Country Link
CN (1) CN113515344B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115390996A (en) * 2022-10-28 2022-11-25 安超云软件有限公司 Virtual machine migration method and device, computing equipment and storage medium
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
CN106406979A (en) * 2016-09-04 2017-02-15 国云科技股份有限公司 Method of migrating virtual machine of XenServer platform to KVM virtual platform
CN106874066A (en) * 2017-01-20 2017-06-20 中兴通讯股份有限公司 A kind of virtual machine migration method and device, electronic equipment
CN107102890A (en) * 2017-07-12 2017-08-29 郑州云海信息技术有限公司 The moving method and moving apparatus of a kind of virtual machine
CN107678831A (en) * 2017-09-25 2018-02-09 郑州云海信息技术有限公司 It is a kind of to realize the V2V methods migrated between virtual platform
CN109522088A (en) * 2018-09-30 2019-03-26 华为技术有限公司 A kind of virtual machine migration method and device
CN110737512A (en) * 2019-10-25 2020-01-31 北京浪潮数据技术有限公司 Cross-platform virtual machine online migration method and related components

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406979A (en) * 2016-09-04 2017-02-15 国云科技股份有限公司 Method of migrating virtual machine of XenServer platform to KVM virtual platform
CN106874066A (en) * 2017-01-20 2017-06-20 中兴通讯股份有限公司 A kind of virtual machine migration method and device, electronic equipment
WO2018133578A1 (en) * 2017-01-20 2018-07-26 中兴通讯股份有限公司 Method and device for migrating virtual machine, computer storage medium, and electronic apparatus
CN107102890A (en) * 2017-07-12 2017-08-29 郑州云海信息技术有限公司 The moving method and moving apparatus of a kind of virtual machine
CN107678831A (en) * 2017-09-25 2018-02-09 郑州云海信息技术有限公司 It is a kind of to realize the V2V methods migrated between virtual platform
CN109522088A (en) * 2018-09-30 2019-03-26 华为技术有限公司 A kind of virtual machine migration method and device
CN110737512A (en) * 2019-10-25 2020-01-31 北京浪潮数据技术有限公司 Cross-platform virtual machine online migration method and related components

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115390996A (en) * 2022-10-28 2022-11-25 安超云软件有限公司 Virtual machine migration method and device, computing equipment and storage medium
CN115390996B (en) * 2022-10-28 2024-02-02 安超云软件有限公司 Virtual machine migration method and device, computing 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

Also Published As

Publication number Publication date
CN113515344B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN111491332B (en) Dynamic service migration method and device
CN113515344B (en) Cross-technology-platform virtual machine automatic migration method and device
CN110427385B (en) Block chain data updating method, related node and block chain
CN109460827A (en) A kind of deep learning environment is built and optimization method and system
CN111467805A (en) Method and device for realizing dynamic change of virtual scene, medium and electronic equipment
WO2022142601A1 (en) Application program construction method and apparatus, and computer device
CN114237519A (en) Method, device, equipment and medium for migrating object storage data
CN108319441B (en) Audio playing control method, device, system, processor and storage medium
CN112181580A (en) Application theme switching method, device and system
CN111949614A (en) Bank system file conversion method and device
CN102148714A (en) Method and device for upgrading software
CN103780942A (en) Information configuration method and device thereof
CN111930843B (en) Database-based data system and processing method
CN102662617A (en) Implementing method for VGA (video graphics array) signal switching in KVM (kernel-based virtual machine)
RU2523123C2 (en) Media portability and compatibility for different destination platforms
WO2023273528A1 (en) Polling communication method and apparatus
CN115145634A (en) System management software self-adaption method, device and medium
CN113507390A (en) Distributed system cluster online fragmentation and capacity expansion method and device
CN113505176A (en) Distributed system cluster online fragmentation and capacity expansion method and device
WO2016095491A1 (en) Equipment upgrading method and transport network equipment
CN110069417B (en) A/B test method and device
CN110554906A (en) virtual machine configuration management method and device
CN110827133A (en) Bank business system change commissioning and account-supplementing method and device
US10925104B2 (en) Method and device for network connection download
CN105302853A (en) Data reconstruction method and apparatus

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
GR01 Patent grant