CN114296810A - Operating system migration method, device, server and storage medium - Google Patents
Operating system migration method, device, server and storage medium Download PDFInfo
- Publication number
- CN114296810A CN114296810A CN202111633542.9A CN202111633542A CN114296810A CN 114296810 A CN114296810 A CN 114296810A CN 202111633542 A CN202111633542 A CN 202111633542A CN 114296810 A CN114296810 A CN 114296810A
- Authority
- CN
- China
- Prior art keywords
- target
- machine
- disk
- migrated
- operating system
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000013509 system migration Methods 0.000 title claims abstract description 37
- 238000013508 migration Methods 0.000 claims abstract description 38
- 230000005012 migration Effects 0.000 claims abstract description 38
- 230000004048 modification Effects 0.000 claims description 5
- 238000012986 modification Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 17
- 238000012546 transfer Methods 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 241000282326 Felis catus Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention discloses an operating system migration method, an operating system migration device, a server and a storage medium, wherein the method comprises the following steps: determining a target disk corresponding to a target machine; writing data into the target disk according to the source machine to be migrated corresponding to the target machine; and modifying the guide information of the target machine to the target disk to realize the migration of the operating system. The problem of complex operation in the migration process of the operating system is solved, the target disk of the target machine is written with data to complete disk data copying, the guiding information of the target machine is modified, the guiding information of the target machine points to the target disk, so that the target machine can be guided and started according to the information of the target disk after being started, and further the migration of the operating system is realized. After the target machine is established on the cloud platform, the migration of the operating system can be realized only by writing data into the target disk and modifying the guide information of the target machine, the implementation process is simple and convenient, the additional establishment of a transfer machine is not needed, and the migration of the operating system can be efficiently completed.
Description
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an operating system migration method, an operating system migration device, a server and a storage medium.
Background
The traditional operating system installation mode generally adopts the mode of directly installing the operating system on a physical machine server, however, with the increase of the enterprise data scale, more and more servers are needed to meet the data processing requirement, but the cost of deploying a large number of servers by enterprises or individuals is high. In order to solve the problems caused by the increase of the server scale, an emerging cloud computing technology appears. The cloud computing service can provide services of computing resources for users, the users can migrate the local system to the cloud computing platform through cloud computing, the services are provided through the cloud platform, and hardware deployment cost is reduced. However, in the prior art, the efficiency of migrating the local system to the cloud platform is low, the operation is complex, and some existing migration methods also need to establish a transfer machine, and the migration of the operating system is realized through the transfer machine, so that the operation is complex and resources are wasted. Therefore, how to migrate the local system to the cloud computing platform quickly and efficiently becomes important.
Disclosure of Invention
The invention provides an operating system migration method, an operating system migration device, a server and a storage medium, and aims to realize rapid and efficient migration of an operating system.
In a first aspect, an embodiment of the present invention provides an operating system migration method, where the operating system migration method includes:
determining a target disk corresponding to a target machine;
writing data into the target disk according to the source machine to be migrated corresponding to the target machine;
and modifying the guide information of the target machine to the target disk to realize the migration of the operating system.
Further, the size of the target disk is determined according to the size of the disk of the source machine to be migrated.
Further, the resource configuration information of the target machine is determined according to the source machine to be migrated, and the resource configuration information at least includes one or more of the following information: CPU information, memory information, disk information, network card information.
Further, before the writing of data to the target disk according to the to-be-migrated source machine, the method further includes:
configuring a network address of the target machine;
and establishing network connection between the target machine and the source machine to be migrated according to the network addresses of the target machine and the source machine to be migrated.
Further, the writing data into the target disk according to the to-be-migrated source machine corresponding to the target machine includes:
leading the source machine to enter the source machine to be migrated according to a system of the source machine to be migrated;
and copying the disk data of the source machine to be migrated according to a preset read-write command, and writing the copied disk data into the target disk according to the network connection between the source machine to be migrated and the target machine.
Further, the modifying the guidance information of the target machine to the target disk includes:
determining a source pointing address of the guide information of the target machine and a target address of a target disk;
and replacing the source pointing address in the guiding information through the target address so that the guiding information points to the target disk.
Further, the method further comprises:
restarting the target machine;
determining a drive to be installed corresponding to the target machine;
and installing the driver to be installed on the system of the target machine.
In a second aspect, an embodiment of the present invention further provides an operating system migration apparatus, where the operating system migration apparatus includes:
the disk determining module is used for determining a target disk corresponding to the target machine;
the disk writing module is used for writing data into the target disk according to the source machine to be migrated corresponding to the target machine;
and the guide information modification module is used for modifying the guide information of the target machine to the target disk and realizing the migration of the operating system.
Further, the size of the target disk is determined according to the size of the disk of the source machine to be migrated.
Further, the resource configuration information of the target machine is determined according to the source machine to be migrated, and the resource configuration information at least includes one or more of the following information: CPU information, memory information, disk information, network card information.
Further, the apparatus further comprises:
an address configuration module, configured to configure a network address of the target machine before the data is written into the target disk according to the to-be-migrated source machine;
and the network connection module is used for establishing the network connection between the target machine and the source machine to be migrated according to the network addresses of the target machine and the source machine to be migrated.
Further, a disk writing module, comprising:
the source machine entering unit is used for leading the source machine to enter the source machine to be migrated according to the system of the source machine to be migrated;
and the disk copying unit is used for copying the disk data of the source machine to be migrated according to a preset read-write command and writing the copied disk data into the target disk according to the network connection between the source machine to be migrated and the target machine.
Further, the guidance information modification module includes:
the address determination unit is used for determining a source pointing address of the guide information of the target machine and a target address of a target disk;
and the replacing unit is used for replacing the source pointing address in the guiding information according to the target address so that the guiding information points to the target disk.
Further, the apparatus further comprises:
the restarting module is used for restarting the target machine;
the drive determining module is used for determining a drive to be installed corresponding to the target machine;
and the drive mounting module is used for mounting the drive to be mounted on the system of the target machine.
In a third aspect, an embodiment of the present invention further provides a server, where the server includes:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of operating system migration as in any one of the embodiments of the invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements an operating system migration method according to any one of the embodiments of the present invention.
The embodiment of the invention provides an operating system migration method, an operating system migration device, a server and a storage medium, wherein a target disk corresponding to a target machine is determined; writing data into the target disk according to the source machine to be migrated corresponding to the target machine; and modifying the guide information of the target machine to the target disk to realize the migration of the operating system. The problem of complex operation in the migration process of the operating system is solved, the disk data copying is completed by writing data into the target disk of the target machine, and the guiding information of the target machine is pointed to the target disk by modifying the guiding information of the target machine, so that the target machine can be guided and started according to the information of the target disk after being started, and further the migration of the operating system is realized. After the target machine is established on the cloud platform, the migration of the operating system can be realized only by writing data into the target disk and modifying the guide information of the target machine, the implementation process is simple and convenient, the additional establishment of a transfer machine is not needed, and the migration of the operating system can be efficiently completed.
Drawings
FIG. 1 is a flowchart illustrating a method for migrating an operating system according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a method for migrating an operating system according to a second embodiment of the present invention;
fig. 3 is a diagram illustrating an implementation example of migration of a source machine to be migrated in the second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an operating system migration apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server in the fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Example one
Fig. 1 is a flowchart illustrating an operating system migration method according to an embodiment of the present application, where the method is suitable for a case of quickly migrating an operating system. The method may be performed by a server.
As shown in fig. 1, a method for migrating an operating system provided in this embodiment specifically includes the following steps:
and S101, determining a target disk corresponding to the target machine.
In this embodiment, the target machine may be specifically understood as a system machine created on a cloud computing platform. The target disk may be specifically understood as a disk of the target machine, and is used for storing data of the target machine.
Specifically, when operating system migration is performed, a source machine to be migrated, that is, a machine to be migrated, is first determined. And creating a target machine on the cloud computing platform according to the configuration information of the source machine to be migrated so that the target machine replaces the source machine to be migrated to work. After the target machine is created, the target machine is allocated with the resources and the target disk, and the relation between the target machine and the target disk is established. And when the target machine is determined, correspondingly determining a target disk of the target machine.
As an optional embodiment of this embodiment, the optional embodiment further optimizes including: and the size of the target disk is determined according to the size of the disk of the source machine to be migrated.
When the disks are distributed for the target machine, the size of the disks of the source machine to be migrated is determined, and the target disks with the same size are distributed for the target machine.
As an optional embodiment of this embodiment, the optional embodiment further optimizes including: the resource configuration information of the target machine is determined according to the source machine to be migrated, and the resource configuration information at least comprises one or more of the following information: CPU information, memory information, disk information, network card information.
In this embodiment, the resource configuration information may be specifically understood as related information of a working environment when the target machine starts to work or works normally. Because the target machine is the copy of the source machine to be migrated, the resource configuration information of the target machine is the same as the resource configuration information of the source machine to be migrated. And acquiring the resource configuration information of the source machine to be migrated in advance, and configuring the target machine according to the resource configuration information of the source machine to be migrated.
Illustratively, the application provides a resource configuration information obtaining mode, and the following information is obtained from a source machine system to be migrated through a system command
1. CPU information
2. Memory information
root@from#cat/proc/meminfo
MemTotal: 7990124kB
3. Network card information (Single network card)
4. Disk (hard disk) information
The mainboard information can also be obtained by the following codes
root@from#[-d/sys/firmware/efi]&&echo“Installed in UEFI mode”||echo“Installed in Legacy mode”
“Installed in Legacy mode”
Illustratively, the configurations of the target machine created in the embodiments of the present application are BIOS, 1cpu, 1 network card, and 1 disk.
And S102, writing data into the target disk according to the source machine to be migrated corresponding to the target machine.
Specifically, the source machine to be migrated has a corresponding disk, and the disk includes relevant information of the source machine to be migrated, for example, configuration information, operation information, and the like. Determining a source machine to be migrated corresponding to the target machine, further determining data in a magnetic disk of the source machine to be migrated, copying the data in the magnetic disk of the source machine to be migrated, and writing the data into the target magnetic disk to complete data writing of the target machine.
S103, modifying the guide information of the target machine to the target disk, and realizing the migration of the operating system.
Specifically, the guiding information of the target machine points to the host of the cloud computing platform, and the target machine cannot start the system after being started. And directly modifying the guide information of the target machine to enable the guide information of the target machine to point to a target disk allocated to the target machine, and after the guide information of the target machine is modified to the target disk, the target machine can conduct system guide through the guide information after being started to complete system starting, so that the migration of the operating system is realized.
The embodiment of the invention provides an operating system migration method, which comprises the steps of determining a target disk corresponding to a target machine; writing data into the target disk according to the source machine to be migrated corresponding to the target machine; and modifying the guide information of the target machine to the target disk to realize the migration of the operating system. The problem of complex operation in the migration process of the operating system is solved, the disk data copying is completed by writing data into the target disk of the target machine, and the guiding information of the target machine is pointed to the target disk by modifying the guiding information of the target machine, so that the target machine can be guided and started according to the information of the target disk after being started, and further the migration of the operating system is realized. After the target machine is established on the cloud computing platform, the migration of the operating system can be realized only by writing data into the target disk and modifying the guide information of the target machine, the implementation process is simple and convenient, the additional establishment of a transfer machine is not needed, and the migration of the operating system can be efficiently completed.
Example two
Fig. 2 is a flowchart of an operating system migration method according to a second embodiment of the present invention. The technical scheme of the embodiment is further refined on the basis of the technical scheme, and specifically mainly comprises the following steps:
s201, determining a target disk corresponding to the target machine.
S202, configuring the network address of the target machine.
When the target machine works normally, if the target machine needs to access an external server or computer equipment, the target machine can only access the external server or computer equipment by configuring a network address. Illustratively, the network address of the target machine is set to 172.20.7.10.
S203, establishing network connection between the target machine and the source machine to be migrated according to the network addresses of the target machine and the source machine to be migrated.
The network address of the source machine to be migrated is configured in advance, and after the source machine to be migrated is determined, the network address is correspondingly determined. And establishing network connection between the target machine and the source machine to be migrated according to the network address of the target machine and the network address of the source machine to be migrated, so as to realize network communication. According to the method and the device, the target machine needs to copy data from the disk of the source machine to be migrated to realize data backup, and the target machine needs to access the source machine to be migrated when the data is copied from the source machine to be migrated, so that network connection between the target machine and the source machine to be migrated is established, and network communication is realized.
And S204, leading the source machine to enter the source machine to be migrated according to the system of the source machine to be migrated.
In this embodiment, the system booting refers to a process of loading the kernel of the operating system into the memory and starting the system. The system boot is usually performed by a special code called boot loader, which is located in the system ROM and used to perform the whole system boot process of locating the specific location of the kernel code in the external memory, correctly loading the kernel to the internal memory as required, and finally running the kernel. In this process, the boot program is started to complete a plurality of initialization processes, and various services of the system can be used only when these processes are successfully completed. These processes include initial boot, kernel initialization, system wide initialization. And the operating system of each computer is provided with system boot so that the computer finishes the starting process and enters the source machine to be migrated through the recovery system boot of the source machine to be migrated. After entering the source machine to be migrated, the IP address of the source machine to be migrated may be reset, or the original IP address of the source machine to be migrated may be used, and in this embodiment of the present application, the IP address of the source machine to be migrated is set to 172.20.7.11.
S205, copying the disk data of the source machine to be migrated according to a preset read-write command, and writing the copied disk data into the target disk according to the network connection between the source machine to be migrated and the target machine.
In this embodiment, the read/write command may be specifically understood as a preset operation command, and data reading and writing may be performed. Preferably, the read/write command of the present application is a dd command, which copies a file by using a block of a specified size and performs specified conversion while copying.
Specifically, the command type of the read/write command is preset, and the corresponding read/write command is determined according to the specific read and write operations, for example, the dd command corresponding to the local/dev/hdb whole disk backup to/dev/hdd is: dd if/dev/hdb of dev/hdd. And copying the data in the disk of the source machine to be migrated through a preset read-write command, and writing the copied data into the target disk according to the network connection between the source machine to be migrated and the target machine, so as to realize data backup of the target disk of the target machine.
Exemplarily, an embodiment of the present application provides an implementation code for copying disk data of a to-be-migrated source machine by a preset read/write command, and writing the copied data to a target disk:
root@to#nc–v–l–p 2000|gzip–cd>/dev/sdb
root@from#dd if=/dev/sda bs=512count=41943040|gzip–c9|nc–q 2 172.20.7.10 2000
the root @ to code means that a port 2000 is opened, and the port waits for data to be written into a target disk of a target machine. The root @ from code means that data is copied from the disk (dev/sda) of the source machine to be migrated and sent to the target disk of the target machine through the port 2000.
S206, determining the source pointing address of the guide information of the target machine and the target address of the target disk.
In this embodiment, the guidance information may be specifically understood as information for selecting an operating system that is desired to run when the computer is started, and a plurality of operating systems may be installed on the computer at the same time. The source pointing address is specifically understood as an address pointed to by the guidance information after the target machine is created, and the source pointing address is usually a default address after the target machine is created. And determining the source pointing address of the guide information of the target machine by analyzing the guide information of the target machine. And when the target disk is allocated, the target address corresponding to the target disk is correspondingly determined.
And S207, replacing the source pointing address in the guiding information according to the target address so that the guiding information points to the target disk.
And replacing the source pointing address in the guiding information with a target address, wherein the guiding information is correspondingly pointed to the target disk at the moment, namely after the target machine is started, the guiding information can guide the system to start according to the data in the target disk.
Illustratively, the guidance information in this application is grub guidance information. grub is a multiple operating system launcher from the GNU project. grub is an implementation of a multi-boot specification that allows a user to have multiple operating systems simultaneously within a computer and select the operating system that he wishes to run at computer boot. grub may be used to select different kernels on the operating system partition and may also be used to pass boot parameters to these kernels.
And S208, restarting the target machine.
And shutting down and restarting the target machine. The restart may be performed by a system operation command, a key press, a power off and a power on again, etc.
And S209, determining the driver to be installed corresponding to the target machine.
In this embodiment, the driver to be installed may be specifically understood as a driver that needs to be installed when the target machine normally operates on the cloud computing platform. The drive is a configuration file written by a hardware manufacturer according to an operating system, hardware in a computer cannot work without a driver, the operating system is different, and the driver of the hardware is also different. And determining drivers to be installed, which are required by the target machine to work on the cloud computing platform, according to corresponding hardware equipment of the cloud computing platform and an operating system of the target machine. The number of drives to be installed in the present application may be one or more.
And S210, installing a driver to be installed on a system of the target machine.
And installing all the drivers to be installed on the system of the target machine. And after the system of the target machine to which the driver is to be installed corresponding to the cloud computing platform is installed, completing the migration of the operating system.
For example, fig. 3 provides an implementation example of migration of a source machine to be migrated, where a target machine 31 is created on the cloud computing platform 30, the source machine to be migrated 32 takes a Linux operating system as an example, and the target machine 31 performs data replication on the source machine to be migrated 32 through a recoverer boot system.
The embodiment of the invention provides an operating system migration method, which comprises the steps of determining a target disk corresponding to a target machine; writing data into the target disk according to the source machine to be migrated corresponding to the target machine; and modifying the guide information of the target machine to the target disk to realize the migration of the operating system. The problem of complex operation in the migration process of the operating system is solved, the disk data of the to-be-migrated source machine is copied through the preset read-write command and written into the target disk of the target machine, and the disk data is copied quickly and efficiently. The guide information of the target machine is modified to point to the target disk, so that the target machine can be guided and started according to the information of the target disk after being started, the rapid migration of the operating system is realized, and the operation is simple and convenient. After the target machine is established on the cloud computing platform, the migration of the operating system can be realized only by writing data into the target disk and modifying the guide information of the target machine, the implementation process is simple and convenient, the additional establishment of a transfer machine is not needed, and the migration of the operating system can be efficiently completed.
EXAMPLE III
Fig. 4 is a schematic structural diagram of an operating system migration apparatus according to a third embodiment of the present invention, where the apparatus includes: a disk determination module 41, a disk writing module 42, and a boot information modification module 43.
The disk determining module 41 is configured to determine a target disk corresponding to a target machine;
a disk writing module 42, configured to write data into the target disk according to the source machine to be migrated corresponding to the target machine;
and a guiding information modifying module 43, configured to modify the guiding information of the target machine to the target disk, so as to implement operating system migration.
The embodiment of the invention provides an operating system migration device, which is characterized in that a target disk corresponding to a target machine is determined; writing data into the target disk according to the source machine to be migrated corresponding to the target machine; and modifying the guide information of the target machine to the target disk to realize the migration of the operating system. The problem of complex operation in the migration process of the operating system is solved, the disk data copying is completed by writing data into the target disk of the target machine, and the guiding information of the target machine is pointed to the target disk by modifying the guiding information of the target machine, so that the target machine can be guided and started according to the information of the target disk after being started, and further the migration of the operating system is realized. After the target machine is established on the cloud platform, the migration of the operating system can be realized only by writing data into the target disk and modifying the guide information of the target machine, the implementation process is simple and convenient, the additional establishment of a transfer machine is not needed, and the migration of the operating system can be efficiently completed.
Further, the size of the target disk is determined according to the size of the disk of the source machine to be migrated.
Further, the resource configuration information of the target machine is determined according to the source machine to be migrated, and the resource configuration information at least includes one or more of the following information: CPU information, memory information, disk information, network card information.
Further, the apparatus further comprises:
an address configuration module, configured to configure a network address of the target machine before the data is written into the target disk according to the to-be-migrated source machine;
and the network connection module is used for establishing the network connection between the target machine and the source machine to be migrated according to the network addresses of the target machine and the source machine to be migrated.
Further, the disk writing module 42 includes:
the source machine entering unit is used for leading the source machine to enter the source machine to be migrated according to the system of the source machine to be migrated;
and the disk copying unit is used for copying the disk data of the source machine to be migrated according to a preset read-write command and writing the copied disk data into the target disk according to the network connection between the source machine to be migrated and the target machine.
Further, the guiding information modifying module 43 includes:
the address determination unit is used for determining a source pointing address of the guide information of the target machine and a target address of a target disk;
and the replacing unit is used for replacing the source pointing address in the guiding information according to the target address so that the guiding information points to the target disk.
Further, the apparatus further comprises:
the restarting module is used for restarting the target machine;
the drive determining module is used for determining a drive to be installed corresponding to the target machine;
and the drive mounting module is used for mounting the drive to be mounted on the system of the target machine.
The operating system migration device provided by the embodiment of the invention can execute the operating system migration method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 5 is a schematic structural diagram of a server according to a fourth embodiment of the present invention, as shown in fig. 5, the server includes a processor 50, a memory 51, an input device 52, and an output device 53; the number of the processors 50 in the server may be one or more, and one processor 50 is taken as an example in fig. 5; the processor 50, the memory 51, the input device 52 and the output device 53 in the server may be connected by a bus or other means, and the bus connection is exemplified in fig. 5.
The memory 51 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the operating system migration method in the embodiment of the present invention (for example, the disk determination module 41, the disk writing module 42, and the boot information modification module 43 in the operating system migration apparatus). The processor 50 executes various functional applications of the server and data processing by executing software programs, instructions, and modules stored in the memory 51, that is, implements the operating system migration method described above.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 51 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 51 may further include memory located remotely from the processor 50, which may be connected to a server over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 52 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the server. The output device 53 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform an operating system migration method, where the method includes:
determining a target disk corresponding to a target machine;
writing data into the target disk according to the source machine to be migrated corresponding to the target machine;
and modifying the guide information of the target machine to the target disk to realize the migration of the operating system.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the operating system migration method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the operating system migration apparatus, the units and modules included in the embodiment are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. An operating system migration method, comprising:
determining a target disk corresponding to a target machine;
writing data into the target disk according to the source machine to be migrated corresponding to the target machine;
and modifying the guide information of the target machine to the target disk to realize the migration of the operating system.
2. The method of claim 1, wherein the size of the target disk is determined according to the disk size of the source machine to be migrated.
3. The method according to claim 1, wherein the resource configuration information of the target machine is determined according to the source machine to be migrated, and the resource configuration information at least includes one or more of the following information: CPU information, memory information, disk information, network card information.
4. The method according to claim 1, further comprising, before the writing data to the target disk according to the to-be-migrated source machine:
configuring a network address of the target machine;
and establishing network connection between the target machine and the source machine to be migrated according to the network addresses of the target machine and the source machine to be migrated.
5. The method according to claim 4, wherein the writing data to the target disk according to the source machine to be migrated corresponding to the target machine includes:
leading the source machine to enter the source machine to be migrated according to a system of the source machine to be migrated;
and copying the disk data of the source machine to be migrated according to a preset read-write command, and writing the copied disk data into the target disk according to the network connection between the source machine to be migrated and the target machine.
6. The method of claim 1, wherein the modifying the boot information of the target machine to the target disk comprises:
determining a source pointing address of the guide information of the target machine and a target address of a target disk;
and replacing the source pointing address in the guiding information according to the target address so that the guiding information points to the target disk.
7. The method of any one of claims 1-6, further comprising:
restarting the target machine;
determining a drive to be installed corresponding to the target machine;
and installing the driver to be installed on the system of the target machine.
8. An operating system migration apparatus, comprising:
the disk determining module is used for determining a target disk corresponding to the target machine;
the disk writing module is used for writing data into the target disk according to the source machine to be migrated corresponding to the target machine;
and the guide information modification module is used for modifying the guide information of the target machine to the target disk and realizing the migration of the operating system.
9. A server, characterized in that the server comprises:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the operating system migration method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the operating system migration method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111633542.9A CN114296810A (en) | 2021-12-29 | 2021-12-29 | Operating system migration method, device, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111633542.9A CN114296810A (en) | 2021-12-29 | 2021-12-29 | Operating system migration method, device, server and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114296810A true CN114296810A (en) | 2022-04-08 |
Family
ID=80971672
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111633542.9A Pending CN114296810A (en) | 2021-12-29 | 2021-12-29 | Operating system migration method, device, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114296810A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115617489A (en) * | 2022-11-08 | 2023-01-17 | 统信软件技术有限公司 | Operating system migration method, migration application and migration application deployment method |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103246534A (en) * | 2013-04-12 | 2013-08-14 | 深信服网络科技(深圳)有限公司 | Method and device for migrating operating system |
CN103605561A (en) * | 2013-11-28 | 2014-02-26 | 中标软件有限公司 | Cloud computing cluster system and method for on-line migration of physical server thereof |
CN109213570A (en) * | 2018-08-28 | 2019-01-15 | 郑州云海信息技术有限公司 | A kind of virtual machine migration method, device, equipment and readable storage medium storing program for executing |
CN111506386A (en) * | 2020-02-27 | 2020-08-07 | 平安科技(深圳)有限公司 | Virtual machine online migration method, device, equipment and computer readable storage medium |
CN111597145A (en) * | 2020-05-20 | 2020-08-28 | 上海英方软件股份有限公司 | Method, device and system for migrating Windows operating system |
CN112612417A (en) * | 2020-12-24 | 2021-04-06 | 深圳市科力锐科技有限公司 | Data migration method, device, equipment and storage medium |
CN113835644A (en) * | 2021-11-26 | 2021-12-24 | 深圳市科力锐科技有限公司 | Complete machine migration method, device, equipment and storage medium |
-
2021
- 2021-12-29 CN CN202111633542.9A patent/CN114296810A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103246534A (en) * | 2013-04-12 | 2013-08-14 | 深信服网络科技(深圳)有限公司 | Method and device for migrating operating system |
CN103605561A (en) * | 2013-11-28 | 2014-02-26 | 中标软件有限公司 | Cloud computing cluster system and method for on-line migration of physical server thereof |
CN109213570A (en) * | 2018-08-28 | 2019-01-15 | 郑州云海信息技术有限公司 | A kind of virtual machine migration method, device, equipment and readable storage medium storing program for executing |
CN111506386A (en) * | 2020-02-27 | 2020-08-07 | 平安科技(深圳)有限公司 | Virtual machine online migration method, device, equipment and computer readable storage medium |
CN111597145A (en) * | 2020-05-20 | 2020-08-28 | 上海英方软件股份有限公司 | Method, device and system for migrating Windows operating system |
CN112612417A (en) * | 2020-12-24 | 2021-04-06 | 深圳市科力锐科技有限公司 | Data migration method, device, equipment and storage medium |
CN113835644A (en) * | 2021-11-26 | 2021-12-24 | 深圳市科力锐科技有限公司 | Complete machine migration method, device, equipment and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115617489A (en) * | 2022-11-08 | 2023-01-17 | 统信软件技术有限公司 | Operating system migration method, migration application and migration application deployment method |
CN115617489B (en) * | 2022-11-08 | 2023-03-28 | 统信软件技术有限公司 | Operating system migration method, migration application and migration application deployment method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9811369B2 (en) | Method and system for physical computer system virtualization | |
CN101206581B (en) | System and method for guiding using external memory device | |
JP6050262B2 (en) | Virtual disk storage technology | |
EP3518099B1 (en) | Installation of operating system | |
US10572434B2 (en) | Intelligent certificate discovery in physical and virtualized networks | |
CN103412769A (en) | External card parameter configuration method, equipment and system | |
CN102200921A (en) | Intelligent boot device selection and recovery | |
CN102591675A (en) | Method and system for management of multiple software images with shared memory blocks | |
CN109002346B (en) | Conversion method of Windows virtual machine bootstrap program | |
CN104679540A (en) | Computer system and computer system starting method | |
US11138028B1 (en) | Hot growing a cloud hosted block device | |
US10282190B2 (en) | System and method for updating a UEFI image in an information handling system | |
CN102257475A (en) | System and method for booting a computer system using preboot data | |
CN115220797A (en) | Operating system starting and deploying method, device, equipment, medium and program product | |
CN113377445B (en) | Method and device for starting multiple operating systems from online disk | |
CN114296810A (en) | Operating system migration method, device, server and storage medium | |
US7849300B2 (en) | Method for changing booting sources of a computer system and a related backup/restore method thereof | |
US11334367B2 (en) | Placeholder boot option and boot option replacement system | |
US9852029B2 (en) | Managing a computing system crash | |
CN113342365A (en) | Operating system deployment method, device, equipment and computer-readable storage medium | |
US20130097412A1 (en) | Performing A Boot Sequence In A Multi-Processor System | |
US20120284500A1 (en) | Abstraction of computer disk image cloning capabilities from bootable media | |
US20060047927A1 (en) | Incremental provisioning of software | |
WO2023123896A1 (en) | Disc loading control method, apparatus, and device, and readable storage medium | |
US20210034401A1 (en) | Cross-hypervisor virtual machine conversion |
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 |