CN113448688A - Method, system and computer medium for automatically correcting network configuration in cloud migration scene - Google Patents

Method, system and computer medium for automatically correcting network configuration in cloud migration scene Download PDF

Info

Publication number
CN113448688A
CN113448688A CN202110733153.7A CN202110733153A CN113448688A CN 113448688 A CN113448688 A CN 113448688A CN 202110733153 A CN202110733153 A CN 202110733153A CN 113448688 A CN113448688 A CN 113448688A
Authority
CN
China
Prior art keywords
virtual machine
network configuration
cloud
configuration information
hard disk
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
CN202110733153.7A
Other languages
Chinese (zh)
Other versions
CN113448688B (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.)
Huayun Data Holding Group Co Ltd
Original Assignee
Huayun Data Holding Group 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 Huayun Data Holding Group Co Ltd filed Critical Huayun Data Holding Group Co Ltd
Priority to CN202110733153.7A priority Critical patent/CN113448688B/en
Publication of CN113448688A publication Critical patent/CN113448688A/en
Application granted granted Critical
Publication of CN113448688B publication Critical patent/CN113448688B/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/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
    • 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/45595Network integration; Enabling network access in 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)
  • Stored Programmes (AREA)

Abstract

The invention provides a method, a system and a computer medium for automatically correcting network configuration in a cloud migration scene, wherein the method comprises the following steps: a source end deploys an agent program, a transit virtual machine is established on a cloud platform, and the transit virtual machine is mounted on a cloud hard disk; the agent program acquires network configuration information and/or a system partition number of a source end system and sends the network configuration information and/or the system partition number to a cloud hard disk mounted by a transit virtual machine; the migration management module sends the network configuration information of the target virtual machine to the cloud hard disk mounted by the transfer virtual machine; synchronizing source end data to the cloud hard disk; the transfer virtual machine corrects the network configuration information sent to the transfer virtual machine according to the network configuration information of the target virtual machine sent by the migration management module, so that the network configuration information of the target virtual machine can be directly used after cloud migration is achieved, and the technical problems of large labor capacity and low efficiency existing in manual adjustment of the network configuration information in the prior art are solved.

Description

Method, system and computer medium for automatically correcting network configuration in cloud migration scene
Technical Field
The invention relates to the technical field of computers, in particular to a method, a system and a computer medium for automatically correcting network configuration in a cloud migration scene.
Background
With the rise of digital transformation, enterprises, governments, schools, hospitals and other organizations have a new trend to cloud. The cloud migration may be that the user migrates the source X86 physical server to a cloud, or migrates the source virtual machine to a cloud, which is a private cloud or a public cloud. After the migration is completed, the target virtual machine after the migration cannot be directly used due to the difference between the network configuration information of the source end user and the network configuration information of the cloud end, and at present, the target virtual machine needs to be manually logged in through a cloud platform management interface and the network configuration information needs to be modified, and the target virtual machine can be normally used after the network service of the target virtual machine is restarted. The technical problems of large workload and low efficiency exist in the manual adjustment of the network configuration information.
In view of the above, there is a need to improve the method for modifying network configuration in the cloud migration scenario in the prior art to solve the above problems.
Disclosure of Invention
The invention aims to disclose a method, a system and a computer medium for automatically correcting network configuration in a cloud migration scene, which are used for automatically correcting network configuration information of a target virtual machine after migration, avoiding the trouble of manually correcting the network configuration information of the target virtual machine, improving migration efficiency and solving the defects of large labor capacity and low efficiency in manually adjusting the network configuration information in the prior art.
To achieve the first object, the present invention provides a method for automatically correcting network configuration in a cloud migration scenario, including:
s1, deploying an agent program at a source end, and creating a transit virtual machine on a cloud platform, wherein the transit virtual machine is used for mounting a cloud hard disk;
s2, identifying and judging the scene type of the source system by the agent program;
s3, according to the scene type of the source end system, the agent program obtains network configuration information and/or system partition numbers of the source end system, and sends the network configuration information and/or the system partition numbers to the cloud hard disk mounted by the transit virtual machine;
s4, the migration management module sends network configuration information of the target virtual machine to the cloud hard disk mounted by the transfer virtual machine;
s5, synchronizing source end data to the cloud hard disk;
and S6, the transfer virtual machine corrects the network configuration information sent to the transfer virtual machine according to the network configuration information of the target virtual machine sent by the migration management module.
As a further improvement of the present invention, the agent determines the source system scene type through a program language, and the steps S4 and S5 are executed simultaneously or in an unlimited order.
As a further improvement of the present invention, when the agent program determines that the source end is a Linux system, the agent program obtains network configuration information of the source end system through an ifconfig command, obtains an offset of a Linux system partition by accessing "/sys/block/sda/sda 1/start", determines a system partition number according to the offset of the system partition and a partition table of a disk header, and sends the network configuration information and the system partition number to a cloud hard disk mounted on a transit virtual machine through a TCP/IP protocol.
As a further improvement of the present invention, when the disk identifier of the cloud hard disk of the transfer virtual machine is/dev/sdb, the system partition number is 1, and the network configuration information is eth0, modifying configuration items in the "/dev/sdb 1/etc/sysconfig/network-scripts/ifcfg-eth 0" file according to the network configuration information of the target virtual machine, wherein the configuration items include BOOTPROTO, IPADDR, NETMASK, GATEWAY, DNS1, and DNS 2.
As a further improvement of the present invention, the cloud hard disk is restored to the target virtual machine, cloud migration is completed, and the network port of the target virtual machine is automatically configured to the network configuration information of the target virtual machine.
As a further improvement of the present invention, when the agent program determines that the source end is a Windows system, the agent program sends "IOCTL _ DISK _ GET _ LENGTH _ INFO" to the source end system DISK to obtain a migration of a Windows system partition, determines a system partition number according to the migration of the Windows system partition and a partition table of a DISK head, and sends the system partition number to a cloud hard DISK mounted on a relay virtual machine through a TCP/IP protocol, and a user of the target virtual machine inputs network configuration information of the target virtual machine and sends the network configuration information to the cloud hard DISK mounted on the relay virtual machine through a migration management module.
As a further improvement of the invention, when the disk identifier of the cloud hard disk of the transit virtual machine is/dev/sdb and the System partition number is 1, a boot entry script is added under the key of "\\ Microsoft \ Windows \ CurrentVersion \ Run" of the registry file of the cloud hard disk of the transit virtual machine, the network configuration information of the target virtual machine is written in the boot entry script, the/dev/sdb 1/Windows/System32/config/SOFTWARE file is modified through a chntpw tool, and the boot entry script configures the network information through a net command.
As a further improvement of the present invention, the cloud hard disk is restored to the target virtual machine to complete cloud migration, the network port of the target virtual machine is automatically configured to the network configuration information of the target virtual machine through a boot startup script injected by the cloud hard disk of the relay virtual machine, and the boot startup script is automatically deleted after the network configuration information is successful.
Based on the same invention idea and in order to achieve the second invention objective, the application also discloses a system for automatically correcting network configuration based on a cloud migration scene, which comprises a source end, cloud migration software and a cloud platform, wherein the cloud migration software comprises an agent program, a transfer virtual machine and a migration management module, the cloud platform creates the transfer virtual machine, the cloud migration software configures the agent program to the source end, the transfer virtual machine is configured with a cloud hard disk with the same size as a source end disk, the source end operating system is a Linux system or a Windows system, and the method for automatically correcting network configuration based on the cloud migration scene is created by executing the first invention.
Based on the same inventive concept and to achieve the third objective, the present application further discloses a computer medium, in which computer program instructions are stored, and the computer program instructions are read and executed by a processor to execute the system for automatically modifying network configuration based on cloud migration scenario as created in the second invention.
Compared with the prior art, the invention has the beneficial effects that:
by deploying an agent program at a source end, automatically identifying network configuration information and/or a system partition number of the source end, and sending the network configuration information and/or the system partition number of the source end to a cloud hard disk mounted by a transit virtual machine, the transit virtual machine automatically corrects the network configuration information sent to the transit virtual machine according to the network configuration information of a target virtual machine, after cloud migration is achieved, the network configuration information of the target virtual machine can be directly used, the trouble of manually correcting the network configuration information of the target virtual machine is avoided, migration efficiency is improved, and the technical problems of large workload and low efficiency in manual adjustment of the network configuration information in the prior art are solved.
Drawings
FIG. 1 is a flow chart of a method for automatically modifying network configuration in a cloud migration scenario in accordance with the present invention;
FIG. 2 is a topology diagram of a system for automatically modifying network configuration based on a cloud migration scenario according to the present invention;
FIG. 3 is a partition table of a disk header of the present invention;
FIG. 4 is a schematic diagram of a computer media module according to the present invention.
Wherein, 1, cloud platform; 2. cloud migration software.
Detailed Description
The present invention is described in detail with reference to the embodiments shown in the drawings, but it should be understood that these embodiments are not intended to limit the present invention, and those skilled in the art should understand that functional, methodological, or structural equivalents or substitutions made by these embodiments are within the scope of the present invention.
The following describes a specific implementation process of the present invention by using a plurality of embodiments.
The first embodiment is as follows:
referring to fig. 1, this embodiment discloses a specific implementation of a method for automatically correcting network configuration in a cloud migration scenario (hereinafter referred to as "method").
Referring to fig. 1, in the present embodiment, the method includes the following steps S1 to S6, and in the present embodiment, the source end system type is not distinguished, that is, the source end system may be a Linux system or a Windows system.
Step S1, deploying an agent program at a source end, and creating a transit virtual machine on the cloud platform, wherein the transit virtual machine mounts a cloud hard disk. Specifically, a source end is a target to be migrated and can be an X86 physical server, a computer, a physical machine or a source virtual machine, an agent program is deployed for each source end, the agent program is also called an agent program, the agent program can create a consistent snapshot so as to synchronize storage data and configuration information of the source end, in a cloud migration process, cloud migration software is adopted to migrate the storage data and the configuration information of the source end to a target virtual machine of a cloud platform, a transit virtual machine is configured and mounted on the cloud platform, the transit virtual machine is also called a Transport, the transit virtual machine serves as a transit device for cloud migration, and the transit virtual machine can receive consistent snapshot data created by the agent program and store the storage data, the configuration data and the like of the source end in the cloud hard disk.
And step S2, the agent program identifies and judges the scene type of the source system. Specifically, the source end may be an X86 physical server, a computer, a physical machine, or a source virtual machine, and when the source end system scene types are different, the network configuration information of the source end and the acquisition commands and ways of the system partition numbers are different, so that when the agent identifies and determines the specific system scene type of the source end, the subsequent steps are performed.
Step S3, according to the scene type of the source end system, the agent program obtains network configuration information and/or a system partition number of the source end system, and sends the network configuration information and/or the system partition number to a cloud hard disk mounted by a transit virtual machine; specifically, no matter in a Linux system or a Windows system, network configuration information exists in a system partition, in order to obtain the network configuration information, a system partition number in which the network configuration information of a source end exists needs to be determined, and an agent program obtains the network configuration information and/or the system partition number of the source end system through a consistent snapshot operation or inputs a certain command symbol in the agent program and sends the obtained network configuration information and/or the system partition number to the cloud hard disk mounted on the transit virtual machine, so that a basis is provided for automatically correcting the network configuration information in subsequent steps.
Step S4, the migration management module sends the network configuration information of the target virtual machine to the cloud hard disk mounted by the transfer virtual machine; specifically, the migration management module is a management module of cloud migration software, the migration management module is also called a Conductor, and the migration management module sends network configuration information of a target virtual machine, which is required to be configured by the target virtual machine, to the cloud hard disk mounted by the transit virtual machine, at this time, the cloud hard disk mounted by the transit virtual machine has network configuration information and/or a system partition number of a source end, and also has network configuration information of the target virtual machine, which is required to be configured by the target virtual machine.
And step S5, synchronizing source end data to the cloud hard disk. Specifically, when the agent program creates the consistent snapshot data, the agent program synchronizes relevant data including the source-side stored data to the cloud hard disk.
Step S6, the transit virtual machine corrects the network configuration information sent to the transit virtual machine according to the network configuration information of the target virtual machine sent by the migration management module. Specifically, the cloud hard disk mounted by the transit virtual machine has network configuration information and/or a system partition number of a source end, and also has target virtual machine network configuration information required to be configured by the target virtual machine, and the transit virtual machine automatically corrects the network configuration information sent to the transit virtual machine according to the target virtual machine network configuration information, so that manual intervention is not needed, the configuration efficiency is high, and the migration efficiency is improved.
It needs to be further explained that cloud migration is performed on a source end by using cloud migration software, and network configuration information is automatically corrected in a migration process, specifically, the cloud migration software has functions of deploying an agent program and transferring a virtual machine, and also has a migration management module of the cloud migration software; the agent program is deployed at a source end, can perform consistent snapshot operation, synchronizes stored data, network configuration information and the like of the source end to a cloud hard disk mounted on a transit virtual machine, can also acquire a partition number of the source end system through a related command symbol and send the partition number to the cloud hard disk mounted on the transit virtual machine, and simultaneously judges the type of the source end system through a program language, if the agent program is written through a Go language, a program library in the Go language can judge the type of the source end system, if the program library in the Go language can judge whether the source end is a Linux system or a Windows system, if the agent program is written through a python language, the program library in the python language can judge the type of the source end system, if the source end is a Linux system or a Windows system through an 'import platform' program in the python language; the migration management module transmits the network configuration information of the target virtual machine to the cloud hard disk mounted by the transfer virtual machine; under the condition that the transfer virtual machine has the network configuration information, the system partition number and the network configuration information of the source end, the transfer virtual machine directly modifies the network configuration information or modifies the network configuration information by using a third-party tool, and automatically modifies the network configuration information of the source end according to the network configuration information, so that manual intervention is not needed, the configuration efficiency is high, and the migration efficiency is improved.
It should be further noted that the above steps are for explaining an implementation step of the method for automatically correcting the network configuration in the cloud migration scenario, and in an actual process, the implementation step is not fixed, for example, step S4 may be implemented before step S5, or after step S5, or simultaneously.
Example two:
in this embodiment, a specific implementation of a method for automatically correcting network configuration in a cloud migration scenario (hereinafter referred to as "method") is disclosed, and specifically, how to automatically correct network configuration information when a source end system is a Linux system is disclosed.
On the basis of the first embodiment, the source end system is a Linux system as an example, and how to automatically correct the network configuration information is further described.
Specifically, the method comprises the following steps:
s201, when the agent program judges that the source end is a Linux system, the agent program obtains network configuration information of the source end system through an ifconfig command, obtains the offset of a Linux system partition through accessing '/sys/block/sda/sda 1/start', determines a system partition number according to the offset of the system partition and a partition table of a disk head, and sends the network configuration information and the system partition number to a cloud hard disk mounted on a transit device Transport through a TCP/IP protocol. Specifically, when the agent program determines that the source end is a Linux system, the agent program directly obtains network configuration information of the source end system by inputting an ifconfig command, obtains an offset of a Linux system partition, that is, a system start sector number, by accessing "/sys/block/sda/sda 1/start", determines system partition numbers, such as partition one, partition two, partition three, and partition four, according to the offset of the system partition and a partition table of a disk head, and sends the network configuration information and the system partition number to a relay virtual machine of the relay device by using a TCP/IP protocol, where a specific partition table of the disk head is shown in fig. 3.
It should be further noted that "/sys/block/sda/sda 1/start" is a Linux system file path, a partition mounted to a "/" directory in a Linux system is a system partition, and a mount command can be used to see which partition is mounted to the "/" directory, so the "/sys/block/sda/sda 1/start" file path is only an example, and in practical applications, a partition condition needs to be viewed according to the mount command, and the file path may also be "/sys/block/sda/sda 2/start", "/sys/block/sda/sdb 1/start", and the like.
S202, when the disk drive symbol of the cloud hard disk of the transfer virtual machine is/dev/sdb, the system partition number is 1 and the network configuration information is eth0, modifying configuration items in the file of "/dev/sdb 1/etc/sysconfig/network-scripts/ifcfg-eth 0" according to the network configuration information of the target virtual machine, wherein the configuration items comprise BOOTPROTO, IPADDR, NETMASK, GATEWAY, DNS1 and DNS 2. Specifically, under the condition that the disk identifier of the cloud hard disk, the system partition number and the network configuration information are determined, the network configuration information which is sent to the transit virtual machine is directly corrected according to the network configuration information of the target virtual machine, wherein the configuration items comprise BOOTPROTO (address allocation mode), IPADDR (IP address), NETMASK (subnet mask), GATEWAY (GATEWAY address), DNS1(DNS address 1) and DNS2(DNS address 2), and the network configuration information which is sent to the cloud hard disk of the transit virtual machine is corrected into the network configuration information of the target virtual machine.
S203, restoring the cloud hard disk to the target virtual machine, completing cloud migration, and automatically configuring the network port of the target virtual machine into network configuration information of the target virtual machine. Specifically, when the step S202 has implemented that the network configuration information transmitted to the cloud hard disk of the relay virtual machine is modified into the target network configuration information, the cloud hard disk of the relay virtual machine is restored to the target virtual machine, and when the migration is completed, the network port of the target virtual machine is automatically configured to the modified network configuration information, that is, the network configuration information of the target virtual machine, so as to implement automatic modification, without manual operation and intervention, the configuration efficiency is high, and the migration efficiency is improved.
Example three:
in this embodiment, a specific implementation of a method for automatically correcting network configuration in a cloud migration scenario (hereinafter referred to as "method") is disclosed, and specifically, how to automatically correct network configuration information when a source end system is a Windows system is disclosed.
On the basis of the first embodiment, the source system is a Windows system as an example, and how to automatically correct the network configuration information is further described.
Specifically, the method comprises the following steps:
s301, when the agent program judges that the source end is a Windows system, the agent program sends 'IOCTL _ DISK _ GET _ LENGTH _ INFO' to a source end system DISK to obtain the offset of a Windows system partition, a system partition number is determined according to the offset of the Windows system partition and a partition table of a DISK head, the system partition number is sent to a cloud hard DISK mounted by a transfer virtual machine through a TCP/IP protocol, and a target virtual machine user inputs network configuration information of the target virtual machine and sends the network configuration information to the cloud hard DISK mounted by the transfer virtual machine through a migration management module. Specifically, when the agent determines that the source end is a Windows system, because the Windows system identifies the network configuration information through the guid, and a new guid is generated after the target virtual machine is started, the agent does not need to acquire the network configuration information of the source end, and only needs to send "IOCTL _ DISK _ GET _ LENGTH _ INFO" to the source end system DISK (\ \ \), so as to acquire the offset of the Windows system partition, i.e., the system start sector number, determine the system partition numbers, such as partition one, partition two, partition three, and partition four, according to the offset of the system partition and the partition table of the DISK head, and send the system partition numbers to the cloud hard DISK mounted by the relay virtual machine through the TCP/IP protocol, where the partition table of the DISK head is shown in fig. 3.
S302, when the disk identifier of the cloud hard disk of the transfer virtual machine is/dev/sdb, the number of a System partition is 1, adding a boot item script under a key of a registry file of the cloud hard disk of the transfer virtual machine, namely ' Microsoft ', Windows ', Current version ', Run ', writing the boot item script into network configuration information of a target virtual machine, modifying/dev/sdb 1/Windows/System32/config/SOFTWARE files through a chntpw tool, and configuring the network information through a netsh command by the boot item script. Specifically, the chntpw is a third-party tool, and can register a boot self-start script in a cloud hard disk mounted by a transit virtual machine, where the target virtual machine network configuration information is injected into the boot self-start script, and the boot self-start script configures network information by using a netsh command.
And S303, restoring the cloud hard disk to the target virtual machine to complete cloud migration, wherein the network port of the target virtual machine is automatically configured to the network configuration information of the target virtual machine through a startup script injected by the cloud hard disk of the transit virtual machine, and the startup script is automatically deleted after the network configuration information is successful. Specifically, in step S302, the cloud hard disk has registered a boot self-start script and has a function of configuring network information by using a netsh command, when the cloud hard disk is restored to the target virtual machine, the target virtual machine also registers the boot self-start script and has a function of configuring network information by using the netsh command, and when the target virtual machine is powered on, the boot self-start script configures the network information by using the netsh command and automatically deletes the network information after the network configuration information is successfully configured.
Example four:
referring to fig. 2, the embodiment further discloses a system for automatically correcting network configuration based on a cloud migration scenario, which includes a source end, cloud migration software and a cloud platform, where the cloud migration software includes an agent program, a relay virtual machine and a migration management module, the cloud platform creates the relay virtual machine, the cloud migration software configures the agent program to the source end, the relay virtual machine is configured with a cloud hard disk having the same size as a source end disk, the source end operating system is a Linux system or a Windows system, and the method for automatically correcting network configuration based on the cloud migration scenario in any one of the first embodiment, the second embodiment and the third embodiment is executed.
The cloud migration software 2 performs cloud migration on the source end, and specifically, the cloud migration software has the functions of deploying an agent program and transferring a virtual machine, and also has a migration management module; the agent program is deployed at a source end, can perform consistent snapshot operation, synchronizes stored data, network configuration information and the like of the source end to a cloud hard disk mounted on a transit virtual machine, can also acquire a source end system partition number through a related command symbol and send the source end system partition number to the cloud hard disk mounted on the transit virtual machine, and is written through a programming language, and a program library carried by the programming language can judge the system type of the source end, namely can judge whether the source end is a Linux system or a Windows system; the migration management module transmits the network configuration information of the target virtual machine to the cloud hard disk mounted by the transfer virtual machine; under the condition that the transfer virtual machine has the network configuration information, the system partition number and the target network configuration information of the source end at the same time, the transfer virtual machine directly corrects the network configuration information or corrects the network configuration information by using a third-party tool, and automatically corrects the network configuration information of the source end according to the target network configuration information, so that manual intervention is not needed, the configuration efficiency is high, and the migration efficiency is improved.
The system for automatically correcting network configuration based on cloud migration scene disclosed in this embodiment has the same technical solutions as those in the first embodiment, the second embodiment, and the third embodiment, please refer to the description of the first embodiment, the second embodiment, and the third embodiment, and details are not repeated here.
Example five:
referring to fig. 4, a computer-readable medium 900 stores computer program instructions 901, and when the computer program instructions 901 are read and executed by a processor 902, the system for automatically correcting network configuration based on cloud migration scenario according to the fourth embodiment is executed. The computer medium disclosed in this embodiment has the same technical solutions as those in the fourth embodiment, please refer to the fourth embodiment, and details are not described herein.
The various illustrative logical blocks, or elements, described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The above-listed detailed description is only a specific description of a possible embodiment of the present invention, and they are not intended to limit the scope of the present invention, and equivalent embodiments or modifications made without departing from the technical spirit of the present invention should be included in the scope of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (10)

1. The method for automatically correcting the network configuration in the cloud migration scene is characterized by comprising the following steps:
s1, deploying an agent program at a source end, and creating a transit virtual machine on a cloud platform, wherein the transit virtual machine is used for mounting a cloud hard disk;
s2, identifying and judging the scene type of the source system by the agent program;
s3, according to the scene type of the source end system, the agent program obtains network configuration information and/or system partition numbers of the source end system, and sends the network configuration information and/or the system partition numbers to the cloud hard disk mounted by the transit virtual machine;
s4, the migration management module sends network configuration information of the target virtual machine to the cloud hard disk mounted by the transfer virtual machine;
s5, synchronizing source end data to the cloud hard disk;
and S6, the transfer virtual machine corrects the network configuration information sent to the transfer virtual machine according to the network configuration information of the target virtual machine sent by the migration management module.
2. The method for automatically modifying network configuration according to cloud migration scenario of claim 1, wherein the agent determines the type of source system scenario through a programming language, and steps S4 and S5 are executed simultaneously or in an unlimited order.
3. The method for automatically revising network configuration according to the cloud migration scenario of claim 2,
when the agent program judges that the source end is a Linux system, the agent program obtains network configuration information of the source end system through an ifconfig command, obtains the offset of a Linux system partition through accessing '/sys/block/sda/sda 1/start', determines a system partition number according to the offset of the system partition and a partition table of a disk head, and sends the network configuration information and the system partition number to a cloud hard disk mounted by a transit virtual machine through a TCP/IP protocol.
4. The method as claimed in claim 3, wherein when the cloud hard disk drive identifier of the forwarding virtual machine is/dev/sdb, the system partition number is 1, and the network configuration information is eth0, the method modifies configuration items in the "/dev/sdb 1/etc/sysconfig/network work-scripts/ifcfg-eth 0" file according to the network configuration information of the target virtual machine, wherein the configuration items include BOOTPROTO, IP ADDR, NETMASK, GATEWAY, DNS1, and DNS 2.
5. The method for automatically correcting network configuration according to claim 4, wherein the cloud hard disk is restored to the target virtual machine to complete cloud migration, and a network port of the target virtual machine is automatically configured to the network configuration information of the target virtual machine.
6. The method for automatically revising network configuration according to the cloud migration scenario of claim 2,
when the agent program judges that the source end is a Windows system, the agent program sends 'IOCTL _ DISK _ GET _ LENGTH _ INFO' to a source end system DISK to acquire the offset of a Windows system partition, determines a system partition number according to the offset of the Windows system partition and a partition table of a DISK head, sends the system partition number to a cloud hard DISK mounted by a transfer virtual machine through a TCP/IP protocol, and a target virtual machine user inputs network configuration information of the target virtual machine and sends the network configuration information to the cloud hard DISK mounted by the transfer virtual machine through a migration management module.
7. The method for automatically correcting network configuration in cloud migration scenario as claimed in claim 6, wherein the disk identifier of the cloud hard disk of the transit virtual machine is/dev/sdb, the System partition number is 1, a boot startup script is added under key of "\\ Microsoft \ Windows \ CurrentVersion \ Run" in the registry file of the cloud hard disk of the transit virtual machine, the target virtual machine network configuration information is written in the boot startup script, the/dev/sdb 1/Windows/System32/config/SOFTWARE kware modified by a chntpw tool, and the boot startup script configures the network information by a mesh command.
8. The method for automatically correcting network configuration in a cloud migration scenario according to claim 7, wherein the cloud hard disk is restored to the target virtual machine to complete cloud migration, a network port of the target virtual machine is automatically configured to target virtual machine network configuration information through a boot startup script injected by a relay virtual machine cloud hard disk, and the boot startup script is automatically deleted after the network configuration information is successful.
9. The system for automatically correcting network configuration based on a cloud migration scene is characterized by comprising a source end, cloud migration software and a cloud platform, wherein the cloud migration software comprises an agent program, a transfer virtual machine and a migration management module, the cloud platform creates the transfer virtual machine, the cloud migration software configures the agent program to the source end, the transfer virtual machine is configured with a cloud hard disk with the same size as a source end disk, the source end operating system is a Linux system or a Windows system, and the method for automatically correcting network configuration based on the cloud migration scene as claimed in any one of claims 1 to 8 is executed.
10. A computer medium comprising, in combination,
the computer-readable medium has stored therein computer program instructions that, when read and executed by a processor, perform the system for automatically correcting network configuration based on cloud migration scenario of claim 9.
CN202110733153.7A 2021-06-29 2021-06-29 Method, system and computer medium for automatically correcting network configuration of cloud migration scene Active CN113448688B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110733153.7A CN113448688B (en) 2021-06-29 2021-06-29 Method, system and computer medium for automatically correcting network configuration of cloud migration scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110733153.7A CN113448688B (en) 2021-06-29 2021-06-29 Method, system and computer medium for automatically correcting network configuration of cloud migration scene

Publications (2)

Publication Number Publication Date
CN113448688A true CN113448688A (en) 2021-09-28
CN113448688B CN113448688B (en) 2024-02-06

Family

ID=77814318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110733153.7A Active CN113448688B (en) 2021-06-29 2021-06-29 Method, system and computer medium for automatically correcting network configuration of cloud migration scene

Country Status (1)

Country Link
CN (1) CN113448688B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114385091A (en) * 2022-03-24 2022-04-22 天津联想协同科技有限公司 Method and device for realizing network disk drive character, network disk and storage medium
CN114489517A (en) * 2022-02-14 2022-05-13 苏州浪潮智能科技有限公司 Offline accelerated migration method, system, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130034021A1 (en) * 2011-08-05 2013-02-07 International Business Machines Corporation Automated network configuration in a dynamic virtual environment
CN103516802A (en) * 2013-09-30 2014-01-15 中国科学院计算技术研究所 Method and device for achieving seamless transference of across heterogeneous virtual switch
CN103812893A (en) * 2012-11-09 2014-05-21 中国联合网络通信集团有限公司 Virtual desktop external equipment transmission method and system
CN111930707A (en) * 2020-07-10 2020-11-13 江苏安超云软件有限公司 Method and system for correcting drive letter of windows cloud migration

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130034021A1 (en) * 2011-08-05 2013-02-07 International Business Machines Corporation Automated network configuration in a dynamic virtual environment
CN103812893A (en) * 2012-11-09 2014-05-21 中国联合网络通信集团有限公司 Virtual desktop external equipment transmission method and system
CN103516802A (en) * 2013-09-30 2014-01-15 中国科学院计算技术研究所 Method and device for achieving seamless transference of across heterogeneous virtual switch
CN111930707A (en) * 2020-07-10 2020-11-13 江苏安超云软件有限公司 Method and system for correcting drive letter of windows cloud migration

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489517A (en) * 2022-02-14 2022-05-13 苏州浪潮智能科技有限公司 Offline accelerated migration method, system, equipment and storage medium
CN114489517B (en) * 2022-02-14 2023-09-08 苏州浪潮智能科技有限公司 Offline acceleration migration method, system, equipment and storage medium
CN114385091A (en) * 2022-03-24 2022-04-22 天津联想协同科技有限公司 Method and device for realizing network disk drive character, network disk and storage medium
CN114385091B (en) * 2022-03-24 2022-07-26 天津联想协同科技有限公司 Method and device for realizing network disk drive character, network disk and storage medium

Also Published As

Publication number Publication date
CN113448688B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
US8190720B1 (en) Performing an in-service software reload on a network device
US9146769B1 (en) Systems and methods for copying a source machine to a target virtual machine
CA2534792C (en) A system and method for transferring a computing environment between computers of dissimilar configurations
US8356296B1 (en) Method and system for minimal disruption during software upgrade or reload of a network device
US10635428B2 (en) System and method for in-service update of software
CN113448688A (en) Method, system and computer medium for automatically correcting network configuration in cloud migration scene
CN114826913A (en) Method for upgrading virtual switch without service interruption and related equipment
WO2017054626A1 (en) Fault recovery method and device for virtual machine
CN110377314B (en) System upgrading method, device, equipment and medium for distributed storage system
CN102609281A (en) Distributed software patch updating method and distributed software patch updating system
US11671319B2 (en) Disruption minimization for guests when applying changes to a data plane of a packet handler in a host
CN108282369A (en) A kind of physical machine remote deployment method and device based on openstack
CN112311646A (en) Hybrid cloud based on super-fusion system and deployment method
CN108259305A (en) A kind of physical machine remote dummy lan handover method and device based on openstack
US8640127B2 (en) Relocating guest machine using proxy tool having multiple virtual machines where one virtual machines provides host route for relocation
US20240155023A1 (en) Method and system for implementing bare metal inspection process, device, and storage medium
CN110633174A (en) Disaster recovery switching method, device and computer readable storage medium
CN113268254A (en) Cluster system installation method and device, electronic equipment and storage medium
CN112099902A (en) Network adapter configuration method and device of virtual machine, electronic device and storage medium
CN107515760B (en) OpenStack multi-node automatic installation method and system
US8065561B1 (en) Method and apparatus for automating device recovery using device configuration information
US20080259951A1 (en) Method and apparatus for unplanned and uninterrupted network adapter replacement
US11405277B2 (en) Information processing device, information processing system, and network communication confirmation method
US11489712B1 (en) Systems and methods for efficient configuration file management and distribution by network management systems
CN114650213A (en) Method, device and storage medium for configuring Jenkins server cluster

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