[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN116185571B - Data migration method, device, storage medium and apparatus - Google Patents

Data migration method, device, storage medium and apparatus Download PDF

Info

Publication number
CN116185571B
CN116185571B CN202310425880.6A CN202310425880A CN116185571B CN 116185571 B CN116185571 B CN 116185571B CN 202310425880 A CN202310425880 A CN 202310425880A CN 116185571 B CN116185571 B CN 116185571B
Authority
CN
China
Prior art keywords
virtual machine
target virtual
data
type
data migration
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.)
Active
Application number
CN202310425880.6A
Other languages
Chinese (zh)
Other versions
CN116185571A (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.)
Shenzhen Clerware Technology Co ltd
Original Assignee
Shenzhen Clerware Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Clerware Technology Co ltd filed Critical Shenzhen Clerware Technology Co ltd
Priority to CN202310425880.6A priority Critical patent/CN116185571B/en
Publication of CN116185571A publication Critical patent/CN116185571A/en
Application granted granted Critical
Publication of CN116185571B publication Critical patent/CN116185571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Stored Programmes (AREA)

Abstract

The invention discloses a data migration method, equipment, a storage medium and a device, wherein when a data migration instruction is received, the hardware configuration type of a target virtual machine is detected; configuring and adjusting the target virtual machine according to the highest performance supported by the hardware configuration type; and transmitting the data to be migrated to the target virtual machine after configuration adjustment. Compared with the prior art that the source machine does not support the high-performance configuration, which causes the target virtual machine to keep consistent low-performance configuration with the source machine, the method has low data transmission speed and low disaster recovery efficiency.

Description

Data migration method, device, storage medium and apparatus
Technical Field
The present invention relates to the field of data disaster recovery technologies, and in particular, to a data migration method, a device, a storage medium, and a storage device.
Background
Because some operating systems, such as some Linux with low version, the source machine cannot configure high-performance hardware configuration, and the target virtual machine can only use low-performance hardware configuration consistent with the source machine in the data transmission stage, so that the target machine has low performance in the data transmission stage, the data transmission speed is low, and the data pushing duration in the disaster recovery (migration) process is increased.
In the prior art, the types of the hard disk and the network card of the target virtual machine are not changed when the system is pushed and switched, and are generally consistent with those of the source machine, if the source machine is a low-performance hard disk and network card type, the target machine is also a low-performance hard disk and network card type, so that a disaster recovery (migration) task consumes more time in a data transmission pushing stage.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a data migration method, equipment, a storage medium and a device, and aims to solve the technical problems of low data transmission speed and low disaster recovery efficiency in a data transmission stage caused by incapability of dynamically adjusting configuration due to low-performance configuration of a target virtual machine and a source machine which are kept consistent in the prior art.
In order to achieve the above object, the present invention provides a data migration method, including the steps of:
detecting the hardware configuration type of the target virtual machine when a data migration instruction is received;
configuring and adjusting the target virtual machine according to the highest performance supported by the hardware configuration type;
and transmitting the data to be migrated to the target virtual machine after configuration adjustment.
Optionally, the hardware configuration type includes a hard disk type and a network card type; the step of detecting the hardware configuration type of the target virtual machine when the data migration instruction is received comprises the following steps:
when a data migration instruction is received, detecting whether the hard disk type and the network card type of the target virtual machine meet the highest performance configuration condition;
the step of performing configuration adjustment on the target virtual machine according to the highest performance supported by the hardware configuration type comprises the following steps:
and according to the detection result, the target virtual machine is configured and adjusted according to the highest performance supported by the hard disk type and the network card type.
Optionally, after the step of configuring and adjusting the target virtual machine according to the highest performance supported by the hard disk type and the network card type according to the detection result, the method further includes:
judging whether the operating system corresponding to the target virtual machine supports the virtual equipment with the highest performance or not, and changing the operating system corresponding to the target virtual machine according to a judging result.
Optionally, the step of determining whether the operating system corresponding to the target virtual machine supports the virtual device with the highest performance, and changing the operating system corresponding to the target virtual machine according to the determination result includes:
when the operating system corresponding to the target virtual machine does not support the virtual equipment with the highest performance, reading a preset operating system from a preset virtual mirror space;
changing the operating system corresponding to the target virtual machine into the preset operating system.
Optionally, after the step of transmitting the data to be migrated to the target virtual machine after the configuration adjustment, the method further includes:
and when a service system switching instruction is received, detecting whether the current hard disk type and the current network card type of the target virtual machine are matched with the operating system of the target source machine, and deploying the system corresponding to the target virtual machine according to a matching result.
Optionally, when the service system switching instruction is received, detecting whether the current hard disk type and the current network card type of the target virtual machine are matched with the operating system of the target source machine, and deploying the system corresponding to the target virtual machine according to a matching result, where the deploying step includes:
when a service system switching instruction is received, detecting whether the current hard disk type and the current network card type of the target virtual machine are matched with an operating system of a target source machine or not;
when the operating system of the target source machine is not matched with the current hard disk type and the current network card type of the target virtual machine, the hard disk type and the network card type of the target virtual machine are adjusted according to the hardware configuration type corresponding to the target source machine;
and deploying the system corresponding to the target virtual machine according to the source machine operating system corresponding to the target source machine.
Optionally, the step of transmitting the data to be migrated to the target virtual machine after configuration adjustment includes:
writing the data to be migrated in the target source machine into a file of a path corresponding to the target virtual machine after configuration adjustment according to a preset file system mapping relation;
or alternatively, the first and second heat exchangers may be,
and writing the data to be migrated of different block devices in the target source machine into corresponding configured and adjusted target virtual machine block devices according to the same offset according to the preset block device mapping relation.
In addition, in order to achieve the above object, the present invention also proposes a data migration apparatus comprising a memory, a processor, and a data migration program stored on the memory and executable on the processor, the data migration program being configured to implement the steps of data migration as described above.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon a data migration program which, when executed by a processor, implements the steps of the data migration method as described above.
In addition, to achieve the above object, the present invention also proposes a data migration apparatus including:
the configuration detection module is used for detecting the hardware configuration type of the target virtual machine when receiving the data migration instruction;
the configuration adjustment module is used for carrying out configuration adjustment on the target virtual machine according to the highest performance supported by the hardware configuration type;
and the data transmission module is used for transmitting the data to be migrated to the target virtual machine after configuration adjustment.
When a data migration instruction is received, detecting the hardware configuration type of the target virtual machine; configuring and adjusting the target virtual machine according to the highest performance supported by the hardware configuration type; and transmitting the data to be migrated to the target virtual machine after configuration adjustment. Compared with the prior art that the source machine does not support the high-performance configuration, which causes the target virtual machine to keep consistent low-performance configuration with the source machine, the method has low data transmission speed and low disaster recovery efficiency.
Drawings
FIG. 1 is a schematic diagram of a data migration device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a data migration method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a data migration method according to a second embodiment of the present invention;
FIG. 4 is a diagram illustrating hardware configuration adjustment according to a second embodiment of the data migration method of the present invention;
FIG. 5 is a flowchart illustrating a third embodiment of a data migration method according to the present invention;
FIG. 6 is a flowchart illustrating a third embodiment of a data migration method according to the present invention;
fig. 7 is a block diagram of a first embodiment of a data migration apparatus according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a data migration device structure of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the data migration apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), and the optional user interface 1003 may also include a standard wired interface, a wireless interface, and the wired interface for the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) or a stable Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the data migration apparatus, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in FIG. 1, an operating system, network communications module, user interface module, and data migration program may be included in memory 1005, which is considered a type of computer storage medium.
In the data migration apparatus shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server, and performing data communication with the background server; the user interface 1003 is mainly used for connecting user equipment; the data migration device invokes a data migration program stored in the memory 1005 through the processor 1001, and executes the data migration method provided by the embodiment of the present invention.
Based on the above hardware structure, an embodiment of the data migration method of the present invention is presented.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a data migration method according to the present invention.
In this embodiment, the data migration method includes the following steps:
step S10: and detecting the hardware configuration type of the target virtual machine when the data migration instruction is received.
It should be noted that, in this embodiment, the execution body may be a disaster recovery integrated machine connected to the target source machine and the target virtualization platform, where the disaster recovery integrated machine may be a device with a data migration function, and the target source machine may refer to a protected computer device (data transmission end), where the device is as follows: the virtual platform may be a computer and its matched equipment used in the information and system science related engineering and technology field, where the target virtual machine may be used as a data receiving end to receive data sent by the source machine, so as to implement data synchronization operation, and the target virtual machine may refer to a host running on the virtual platform, which is not limited in this embodiment. This embodiment and the following embodiments will be described by taking the disaster recovery integrated machine as an example.
It is understood that the data migration instruction may be an instruction generated by a source machine, or may be an instruction fed back by a virtualization platform, for example: the instruction may be a preset data migration instruction generated according to a push time period, or may be a data migration instruction generated according to push data traffic, or may be an instruction fed back when the virtualization platform receives that the pushed data amount reaches a preset threshold, which is not limited in the application.
It should be appreciated that different types of hardware configurations have very large performance differences. For example: the read-write monitoring of the virtual hard disk is carried out on the high-performance virtio (paravirtualized) type hard disk and the low-performance ide (fully virtualized) type hard disk, so that the performance of the virtio is several times that of the ide (more than ten times can be achieved under a pure SSD cluster environment); the high-performance virtio (paravirtualized) type network card and the low-performance 8139D (fully virtualized) type network card are subjected to receiving and transmitting monitoring of the virtual network card, and the performance of the virtio is more than twenty times of that of 8319D; it can be seen that the high performance hard disk and network card type is faster in data read and write, and the above model is only for illustration and not limitation. Therefore, in order to ensure the transmission speed of the virtual machine in data migration, the hardware configuration type of the target virtual machine needs to be detected before data pushing is performed, so that the target virtual machine is ensured to complete data transmission according to the high-performance configuration under the condition that the high-performance configuration is met.
Step S20: and carrying out configuration adjustment on the target virtual machine according to the highest performance supported by the hardware configuration type.
It should be noted that, in order to ensure the data transmission efficiency, when the hardware configuration type does not meet the highest performance configuration condition, the target virtual machine may be configured and adjusted according to the highest performance supported by the hardware configuration type, so that the hardware configuration type of the target virtual machine supports the highest performance to perform data transmission.
Step S30: and transmitting the data to be migrated to the target virtual machine after configuration adjustment.
It should be noted that, before pushing data, it is detected whether the hardware configuration of the target virtual machine is the highest performance configuration, if so, data is pushed to the target virtual machine.
In specific implementation, pushing data means that disk data of a source machine is migrated to a target machine, so that the target machine data is consistent with the source machine data, thereby achieving the purpose of disaster recovery, one disaster recovery task can push the data for multiple times, before each time of pushing the data, the hardware configuration type of the target virtual machine is detected, and if the current configuration of the target virtual machine is the highest-performance hardware configuration, the data is pushed; otherwise, the hardware configuration type of the target virtual machine needs to be adjusted to be the highest performance configuration, and then data is pushed to the target virtual machine.
Further, the step S30 includes: writing the data to be migrated in the target source machine into a file of a path corresponding to the target virtual machine after configuration adjustment according to a preset file system mapping relation; or writing the data to be migrated of different block devices in the target source machine into the corresponding configured and adjusted target virtual machine block devices according to the same offset according to the preset block device mapping relation.
It should be noted that, the target virtual machine includes a data receiving module, where the data receiving module works in an operating system supporting high-performance virtual devices and is mainly used for writing data from the source machine into a disk of the target virtual machine, where the data pushing stage includes two preset data receiving modes, where the modes include: data reception is performed on a file basis and data reception is performed on a block basis (e.g., a disk data volume).
It should be understood that, since the target virtual machine includes two data receiving modes, two data transmission modes are included in the data pushing stage, that is, the data to be migrated in the target source machine is written into the file of the corresponding path of the target virtual machine after configuration adjustment according to the mapping relation of the preset file system, and the data to be migrated of different block devices in the target source machine is written into the corresponding target virtual machine block device after configuration adjustment according to the same offset according to the mapping relation of the preset block device. The data transmission mode can be set according to actual conditions.
It can be understood that the target virtual machine determines a corresponding data receiving mode according to the data transmission mode, so that if the target virtual machine receives data according to the file, the receiving data module can identify the file system in the disk, establish a mapping relationship from the file system of the source machine to the file system of the target virtual machine, and write the file data in the source machine into the file of the corresponding path; and if the target virtual machine receives data according to the block devices (disk and data volume), establishing a mapping relation between the source machine block device and the block devices in the target virtual machine in the receiving module, and writing different block device data in the source machine into the corresponding target virtual machine block device according to the same offset.
In the embodiment, when a data migration instruction is received, the hardware configuration type of the target virtual machine is detected; configuring and adjusting the target virtual machine according to the highest performance supported by the hardware configuration type; and transmitting the data to be migrated to the target virtual machine after configuration adjustment. Because the hardware configuration type of the target virtual machine is dynamically adjusted, so that the hardware configuration of the target virtual machine supports the highest performance, compared with the low-performance configuration in which the target virtual machine is consistent with the source machine because the source machine does not support the high-performance configuration in the prior art, the data transmission speed is low, and the disaster recovery efficiency is low.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of the data migration method according to the present invention, and the second embodiment of the data migration method according to the present invention is proposed based on the first embodiment shown in fig. 2.
In this embodiment, the hardware configuration type includes a hard disk type and a network card type; the step S10 includes:
step S100: and when receiving the data migration instruction, detecting whether the hard disk type and the network card type of the target virtual machine meet the highest performance configuration condition.
It should be noted that, in the scheme, the hard disk type and the network card type of the target virtual machine are detected before data pushing to judge whether the current configuration of the target virtual machine meets the highest performance configuration condition, so that the hardware configuration of the target virtual machine can be dynamically adjusted in time before data pushing.
The step S20 includes:
step S200: and according to the detection result, the target virtual machine is configured and adjusted according to the highest performance supported by the hard disk type and the network card type.
It should be noted that, if the current hard disk type and the network card type of the target virtual machine are both high performance, no adjustment operation is performed on the target virtual machine; otherwise, the hard disk and/or the network card of the target virtual machine need to be set to a high-performance type.
In a specific implementation, referring to the hardware configuration adjustment schematic diagram described in fig. 4, the hard disk and/or the network card of the target virtual machine are adjusted accordingly according to the detection result. If the hard disk type and the network card type of the target virtual machine are both high-performance, no modification type operation is performed, and if the hard disk type and/or the network card of the target virtual machine are not high-performance, the hardware configuration which does not belong to the high-efficiency type is modified to be high-performance, so that the hard disk type and the network card type of the target virtual machine are both high-performance, and source machine data are pushed to the target virtual machine.
Further, after the step S200, the method further includes: judging whether the operating system corresponding to the target virtual machine supports the virtual equipment with the highest performance or not, and changing the operating system corresponding to the target virtual machine according to a judging result.
It should be noted that, after detecting and adjusting the hardware configuration of the target virtual machine, in order to avoid occurrence of a compatibility failure caused by a mismatch condition between the operating system and the hardware configuration, and affect data transmission, before performing data pushing, it is necessary to detect whether the operating system of the target virtual machine supports a virtual device with the highest performance, where the virtual device refers to a virtual hardware device, for example: disk controller, network adapter, mouse controller, keyboard controller, video card adapter, etc.
It should be understood that the determination result includes two results, that is, the virtual device supporting the highest performance and the virtual device not supporting the highest performance, and if the operating system running in the target virtual machine does not support the high-performance virtual device, the operating system in the target virtual machine is changed.
The step of judging whether the operating system corresponding to the target virtual machine supports the virtual device with the highest performance or not, and changing the operating system corresponding to the target virtual machine according to the judging result comprises the following steps: when the operating system corresponding to the target virtual machine does not support the virtual equipment with the highest performance, reading a preset operating system from a preset virtual mirror space; changing the operating system corresponding to the target virtual machine into the preset operating system.
It should be noted that the preset virtual image space may be a preset virtual image space for storing configuration information related to a preset operating system corresponding to the virtual machine, where the preset operating system includes, but is not limited to, a data receiving system, where the data receiving system refers to an operating system that is used by the target virtual machine to support high-performance virtual devices in a data pushing stage, and running a data receiving module in the operating system, where the operating system and the data receiving module therein are referred to as a data receiving system, and the virtual image space may be a control that stores configuration information in a form of a virtual optical disc image, a virtual magnetic disc image, or a px boot image.
It can be understood that if the operating system running in the target virtual machine does not support the high-performance virtual device, the operating system in the target virtual machine is changed to run the data receiving module in the data receiving system, so that the target virtual machine can be used as a disk to store data.
In a specific implementation, when an operating system corresponding to a target virtual machine does not support a virtual device with highest performance, a preset operating system (such as a data receiving system) is read from a preset virtual image space, a guiding mode of the target virtual machine is modified to be the corresponding image, the operating system corresponding to the target virtual machine is changed to be the preset operating system, and the target virtual machine is restarted.
In the embodiment, when a data migration instruction is received, whether the hard disk type and the network card type of the target virtual machine meet the highest performance configuration condition or not is detected; according to the detection result, the target virtual machine is configured and adjusted according to the highest performance supported by the hard disk type and the network card type; and transmitting the data to be migrated to the target virtual machine after configuration adjustment. Because the hardware configuration type of the target virtual machine is dynamically adjusted, so that the hardware configuration of the target virtual machine supports the highest performance, compared with the low-performance configuration in which the target virtual machine is consistent with the source machine because the source machine does not support the high-performance configuration in the prior art, the data transmission speed is low, and the disaster recovery efficiency is low.
Referring to fig. 5, fig. 5 is a flowchart illustrating a third embodiment of the data migration method according to the present invention, and the third embodiment of the data migration method according to the present invention is proposed based on the first embodiment shown in fig. 2.
In this embodiment, after the step S30, the method further includes:
step S40: and when a service system switching instruction is received, detecting whether the current hard disk type and the current network card type of the target virtual machine are matched with the operating system of the target source machine, and deploying the system corresponding to the target virtual machine according to a matching result.
It should be noted that, after data migration is completed, when the operating system and the service system of the target virtual machine need to be started, the source service needs to be switched to the target data center, so that the continuity of the service is ensured, and the types of the hard disk and the network card of the switched target virtual machine may not be consistent with the use types in the data pushing stage. Thus requiring reconfiguration of the operating system and hardware configuration type of the target virtual machine.
It should be understood that when switching service systems, it is first required to check whether the current hard disk and network card type of the target virtual machine are matched with the operating system of the target source machine, so that the service system switching operation of the source machine can be completed on the target virtual machine, and therefore, the system corresponding to the target virtual machine needs to be deployed according to the matching result.
Further, in order to ensure service continuity, the target virtual machine is configured when the system is switched, and the step S50 further includes: when a service system switching instruction is received, detecting whether the current hard disk type and the current network card type of the target virtual machine are matched with an operating system of a target source machine or not; when the operating system of the target source machine is not matched with the current hard disk type and the current network card type of the target virtual machine, the hard disk type and the network card type of the target virtual machine are adjusted according to the hardware configuration type corresponding to the target source machine; and deploying the system corresponding to the target virtual machine according to the source machine operating system corresponding to the target source machine.
When the service system switching is identified, acquiring the hardware equipment information of the target source machine, and firstly checking whether the current hard disk and network card type of the target virtual machine are matched with the operating system of the source machine; because the disaster recovery (migration) task is a high-performance type hard disk and a network card used in the data pushing stage, if the operating system of the target source machine does not support high performance, the hard disk and the network card type of the target virtual machine are required to be set to be a hardware configuration type matched with the operating system of the source machine by calling the API interface of the application program, so that the service system can normally operate after the target virtual machine is switched; and changing the guiding of the target virtual machine from a data receiving system to a source machine operating system according to the requirement, and shutting down or restarting the target virtual machine.
In the specific implementation, after the hardware configuration type and the corresponding operating system of the target virtual machine are dynamically adjusted, the target virtual machine is powered off or restarted according to the requirement, so that the target virtual machine can operate according to the requirement when the service system is switched. To further illustrate the method for reminding disaster recovery efficiency by dynamically adjusting the hardware configuration type of the target virtual machine in the data pushing stage, reference may be made to a workflow diagram shown in fig. 6, in which before data pushing is performed, the hard disk type and the network card type of the target virtual machine are checked, if the hard disk and the network card of the target virtual machine are found to be not of a high performance type, the hard disk and the network card of the target virtual machine are set to be of a high performance, so that the target virtual machine can perform high performance data pushing, and the data transmission time in the disaster recovery (migration) process is shortened; after the data push is finished, the disaster recovery (migration) task can perform the following steps as required: waiting for the next push, or waiting for switching, or switching immediately, etc.; when the switching system comes, the service system needs to be switched from the source machine to the target virtual machine, the switching stage is indicated to enter, and because the hard disk and the network card are both of high-performance type, but because some operating systems are hard disks and network cards which do not support the high-performance type, whether the operating system of the source machine can use the high-performance hard disk type and the network card type needs to be detected first, if so, the operation is not changed, otherwise, the hard disk and the network card type of the target virtual machine needs to be set to be of a hardware configuration type matched with the operating system of the source machine through calling an API (application program interface), and the target virtual machine and the source machine are ensured to keep consistent, normal disk read-write operation can be performed, and then a conventional switching step is performed.
In the embodiment, when a data migration instruction is received, the hardware configuration type of the target virtual machine is detected; configuring and adjusting the target virtual machine according to the highest performance supported by the hardware configuration type; and transmitting the data to be migrated to the target virtual machine after configuration adjustment. And when a service system switching instruction is received, detecting whether the current hard disk type and the current network card type of the target virtual machine are matched with the operating system of the target source machine, and deploying the system corresponding to the target virtual machine according to a matching result. Because the hardware configuration type of the target virtual machine is dynamically adjusted, so that the hardware configuration of the target virtual machine supports the highest performance, compared with the low-performance configuration in which the target virtual machine is consistent with the source machine because the source machine does not support the high-performance configuration in the prior art, the data transmission speed is low, and the disaster recovery efficiency is low.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon a data migration program which, when executed by a processor, implements the steps of the data migration method as described above.
Referring to fig. 7, fig. 7 is a block diagram illustrating a first embodiment of a data migration apparatus according to the present invention.
As shown in fig. 7, a data migration apparatus according to an embodiment of the present invention includes:
the configuration detection module 10 is configured to detect a hardware configuration type of the target virtual machine when receiving a data migration instruction;
the configuration adjustment module 20 is configured to perform configuration adjustment on the target virtual machine according to the highest performance supported by the hardware configuration type;
the data transmission module 30 is configured to transmit the data to be migrated to the target virtual machine after configuration adjustment.
In the embodiment, when a data migration instruction is received, the hardware configuration type of the target virtual machine is detected; configuring and adjusting the target virtual machine according to the highest performance supported by the hardware configuration type; and transmitting the data to be migrated to the target virtual machine after configuration adjustment. Because the hardware configuration type of the target virtual machine is dynamically adjusted, so that the hardware configuration of the target virtual machine supports the highest performance, compared with the low-performance configuration in which the target virtual machine is consistent with the source machine because the source machine does not support the high-performance configuration in the prior art, the data transmission speed is low, and the disaster recovery efficiency is low.
Optionally, the configuration detection module 10 is further configured to detect, when receiving a data migration instruction, whether the hard disk type and the network card type of the target virtual machine meet a highest performance configuration condition;
the configuration adjustment module 20 is further configured to perform configuration adjustment on the target virtual machine according to the highest performance supported by the hard disk type and the network card type according to the detection result.
Optionally, the configuration adjustment module 20 is further configured to determine whether the operating system corresponding to the target virtual machine supports the virtual device with the highest performance, and change the operating system corresponding to the target virtual machine according to the determination result.
Optionally, the configuration adjustment module 20 is further configured to read a preset operating system from a preset virtual mirror space when the operating system corresponding to the target virtual machine does not support the virtual device with the highest performance; changing the operating system corresponding to the target virtual machine into the preset operating system.
Optionally, the configuration adjustment module 20 is further configured to detect, when a service system switching instruction is received, whether a current hard disk type and a current network card type of the target virtual machine are matched with an operating system of the target source machine, and deploy a system corresponding to the target virtual machine according to a matching result.
Optionally, the configuration adjustment module 20 is further configured to detect, when receiving a service system switching instruction, whether a current hard disk type and a current network card type of the target virtual machine are matched with an operating system of the target source machine; when the operating system of the target source machine is not matched with the current hard disk type and the current network card type of the target virtual machine, the hard disk type and the network card type of the target virtual machine are adjusted according to the hardware configuration type corresponding to the target source machine; and deploying the system corresponding to the target virtual machine according to the source machine operating system corresponding to the target source machine.
Optionally, the data transmission module 30 is further configured to write the data to be migrated in the target source machine into a file of the path corresponding to the target virtual machine after configuration adjustment according to a preset file system mapping relationship; or writing the data to be migrated of different block devices in the target source machine into the corresponding configured and adjusted target virtual machine block devices according to the same offset according to the preset block device mapping relation.
Other embodiments or specific implementations of the data migration apparatus of the present invention may refer to the above method embodiments, and are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the terms first, second, third, etc. do not denote any order, but rather the terms first, second, third, etc. are used to interpret the terms as names.
From the above description of embodiments, it will be clear to a person skilled in the art that the above embodiment method may be implemented by means of software plus a necessary general hardware platform, but may of course also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. read only memory mirror (Read Only Memory image, ROM)/random access memory (Random Access Memory, RAM), magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (8)

1. A data migration method, characterized in that the data migration method comprises:
detecting the hardware configuration type of the target virtual machine when a data migration instruction is received;
configuring and adjusting the target virtual machine according to the highest performance supported by the hardware configuration type;
transmitting the data to be migrated to the target virtual machine after configuration adjustment;
when the operating system corresponding to the target virtual machine does not support the virtual equipment with the highest performance, reading a preset operating system from a preset virtual mirror space;
changing the operating system corresponding to the target virtual machine into the preset operating system.
2. The data migration method of claim 1, wherein the hardware configuration type includes a hard disk type and a network card type; the step of detecting the hardware configuration type of the target virtual machine when the data migration instruction is received comprises the following steps:
when a data migration instruction is received, detecting whether the hard disk type and the network card type of the target virtual machine meet the highest performance configuration condition;
the step of performing configuration adjustment on the target virtual machine according to the highest performance supported by the hardware configuration type comprises the following steps:
and according to the detection result, the target virtual machine is configured and adjusted according to the highest performance supported by the hard disk type and the network card type.
3. The data migration method of claim 1, wherein after the step of transmitting the data to be migrated to the target virtual machine after the configuration adjustment, further comprises:
and when a service system switching instruction is received, detecting whether the current hard disk type and the current network card type of the target virtual machine are matched with the operating system of the target source machine, and deploying the system corresponding to the target virtual machine according to a matching result.
4. The data migration method as claimed in claim 3, wherein the step of detecting whether the current hard disk type and the current network card type of the target virtual machine are matched with the operating system of the target source machine when the service system switching instruction is received, and deploying the system corresponding to the target virtual machine according to the matching result comprises the steps of:
when a service system switching instruction is received, detecting whether the current hard disk type and the current network card type of the target virtual machine are matched with an operating system of a target source machine or not;
when the operating system of the target source machine is not matched with the current hard disk type and the current network card type of the target virtual machine, the hard disk type and the network card type of the target virtual machine are adjusted according to the hardware configuration type corresponding to the target source machine;
and deploying the system corresponding to the target virtual machine according to the source machine operating system corresponding to the target source machine.
5. The data migration method of claim 1, wherein the step of transmitting the data to be migrated to the target virtual machine after configuration adjustment comprises:
writing the data to be migrated in the target source machine into a file of a path corresponding to the target virtual machine after configuration adjustment according to a preset file system mapping relation;
or alternatively, the first and second heat exchangers may be,
and writing the data to be migrated of different block devices in the target source machine into corresponding configured and adjusted target virtual machine block devices according to the same offset according to the preset block device mapping relation.
6. A data migration apparatus, characterized in that the data migration apparatus comprises: memory, a processor and a data migration program stored on the memory and running on the processor, which when executed by the processor implements the steps of the data migration method according to any one of claims 1 to 5.
7. A storage medium having stored thereon a data migration program which, when executed by a processor, implements the steps of the data migration method according to any one of claims 1 to 5.
8. A data migration apparatus, the data migration apparatus comprising:
the configuration detection module is used for detecting the hardware configuration type of the target virtual machine when receiving the data migration instruction;
the configuration adjustment module is used for carrying out configuration adjustment on the target virtual machine according to the highest performance supported by the hardware configuration type;
the data transmission module is used for transmitting the data to be migrated to the target virtual machine after configuration adjustment;
the configuration adjustment module is further configured to read a preset operating system from a preset virtual mirror space when the operating system corresponding to the target virtual machine does not support the virtual device with the highest performance; changing the operating system corresponding to the target virtual machine into the preset operating system.
CN202310425880.6A 2023-04-20 2023-04-20 Data migration method, device, storage medium and apparatus Active CN116185571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310425880.6A CN116185571B (en) 2023-04-20 2023-04-20 Data migration method, device, storage medium and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310425880.6A CN116185571B (en) 2023-04-20 2023-04-20 Data migration method, device, storage medium and apparatus

Publications (2)

Publication Number Publication Date
CN116185571A CN116185571A (en) 2023-05-30
CN116185571B true CN116185571B (en) 2023-07-21

Family

ID=86438742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310425880.6A Active CN116185571B (en) 2023-04-20 2023-04-20 Data migration method, device, storage medium and apparatus

Country Status (1)

Country Link
CN (1) CN116185571B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991546B (en) * 2023-09-28 2024-01-23 杭州优云科技有限公司 Cross-platform storage heat migration method and device

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8711851B1 (en) * 2007-07-19 2014-04-29 American Megatrends, Inc. Multi-protocol data transfers
EP2701064B1 (en) * 2012-08-24 2019-04-10 Hasso-Plattner-Institut für Softwaresystemtechnik GmbH Robust tenant placement and migration in database-as-a-service environments
CN104142861B (en) * 2013-05-10 2018-06-08 中国电信股份有限公司 The configuration processing method and device of server resource
CN107038059A (en) * 2016-02-03 2017-08-11 阿里巴巴集团控股有限公司 virtual machine deployment method and device
CN107967164B (en) * 2016-10-19 2021-08-13 阿里巴巴集团控股有限公司 Method and system for live migration of virtual machine
CN106610616B (en) * 2016-11-30 2019-12-03 交控科技股份有限公司 A kind of performance automated tuning method and device based on big data analysis
CN109992350B (en) * 2017-12-29 2023-12-01 北京华胜天成科技股份有限公司 Migration method and device for virtual machines in resource pool of cloud computing system
CN113127133B (en) * 2019-12-30 2023-09-05 中国移动通信集团山西有限公司 Cross-platform virtual machine hot migration method, device, equipment and medium
US12045466B2 (en) * 2020-04-29 2024-07-23 Intel Corporation Adaptive storage scheduler for SSD
CN112612417B (en) * 2020-12-24 2023-08-08 深圳市科力锐科技有限公司 Data migration method, device, equipment and storage medium
CN113157435B (en) * 2021-03-01 2023-11-24 长沙学院 Virtual machine deployment method and system with energy efficiency as target of cloud data center
CN113835644B (en) * 2021-11-26 2022-03-01 深圳市科力锐科技有限公司 Complete machine migration method, device, equipment and storage medium
CN115226132B (en) * 2022-07-19 2023-05-16 凌锐蓝信科技(北京)有限公司 Data transmission method, device, computer equipment and storage medium
CN115686758B (en) * 2023-01-03 2023-03-21 麒麟软件有限公司 VirtIO-GPU performance controllable method based on frame statistics

Also Published As

Publication number Publication date
CN116185571A (en) 2023-05-30

Similar Documents

Publication Publication Date Title
US10999139B2 (en) Online upgrade method, apparatus, and system
US8402200B2 (en) Method and apparatus for storing and restoring state of virtual machine
US20210182052A1 (en) Method, device, and apparatus for updating application program, and storage medium
US20110213954A1 (en) Method and apparatus for generating minimum boot image
US10055273B2 (en) Method for checking whether hardware of intelligent terminal runs abnormally and intelligent terminal
CN110879742B (en) Method, device and storage medium for asynchronously creating internal snapshot by virtual machine
US10997099B2 (en) I/O request processing method in virtual machine, device and computer readable medium
CN112433812B (en) Virtual machine cross-cluster migration method, system, equipment and computer medium
CN112612417B (en) Data migration method, device, equipment and storage medium
CN116185571B (en) Data migration method, device, storage medium and apparatus
US9557980B2 (en) Seamless application integration apparatus and method
CN112596950B (en) Virtual machine data backup method, device, equipment and storage medium
CN110941516B (en) Operating system restoration method, device, equipment and storage medium
CN114765051A (en) Memory test method and device, readable storage medium and electronic equipment
CN112433669A (en) Method, system, equipment and medium for online migration of distributed storage volume
CN113485755B (en) Device driver verification method, device and storage medium
CN107688479B (en) Android system network cluster, construction method thereof, and Android system network cluster data processing method and system
CN100448202C (en) Method and device for detecting conflict of IP addresses in networked computers
CN108874318A (en) The data reconstruction method and solid state hard disk of solid state hard disk
EP2835737A1 (en) Data terminal running mode switching method, device, and data terminal
US8209443B2 (en) System and method for identifying lost/stale hardware in a computing system
CN111767082A (en) Computing chip starting method and device and computer system
CN111953753B (en) Communication device connection method, device, computer device and storage medium
CN112596954B (en) Data backup and reconstruction method, device, equipment and storage medium
EP3695311A1 (en) Initializing hardware components using parallel driver loading and serial access granting

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