CN110673930A - Virtual machine migration method, virtualization device, storage medium and device - Google Patents

Virtual machine migration method, virtualization device, storage medium and device Download PDF

Info

Publication number
CN110673930A
CN110673930A CN201911228028.XA CN201911228028A CN110673930A CN 110673930 A CN110673930 A CN 110673930A CN 201911228028 A CN201911228028 A CN 201911228028A CN 110673930 A CN110673930 A CN 110673930A
Authority
CN
China
Prior art keywords
virtual machine
migrated
preset
installation package
tool
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
CN201911228028.XA
Other languages
Chinese (zh)
Other versions
CN110673930B (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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201911228028.XA priority Critical patent/CN110673930B/en
Publication of CN110673930A publication Critical patent/CN110673930A/en
Application granted granted Critical
Publication of CN110673930B publication Critical patent/CN110673930B/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
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of virtualization, and discloses a virtual machine migration method, a virtualization device, a storage medium and a device. The method comprises the steps of obtaining a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform; storing a preset tool installation package into a target disk of a virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool; and starting the virtual machine to be migrated to run a preset tool installation package, and performing installation operation of the virtual machine performance optimization tool. Obviously, the installation package is automatically installed in the virtual machine, and the installation process of the installation package is started in a virtual machine starting mode, so that the automatic installation of the virtual machine performance optimization tool is realized, the virtual machine migration efficiency is improved, the manual installation operation of the virtual machine performance optimization tool is avoided, and the technical problem that the time consumption of the virtual machine migration process is long is solved.

Description

Virtual machine migration method, virtualization device, storage medium and device
Technical Field
The present invention relates to the field of virtualization technologies, and in particular, to a virtual machine migration method, a virtualization device, a storage medium, and an apparatus.
Background
In terms of a service scenario of virtual machine migration, if a physical machine or a virtual machine on a virtualization platform is migrated to another virtualization platform, where the virtualization platform from which the virtual machine is migrated may be a VMware platform or an H3C (huasan) platform, after the virtual machine is migrated, it is mostly necessary to manually click and install some virtual machine performance optimization tools. The virtual machine performance optimization tool is an auxiliary tool for providing virtualization implementation.
However, it is considered that if the number of migrated virtual machines is large, it takes a long time to perform manual installation of the virtual machine performance optimization tool.
Therefore, it can be considered that the virtual machine migration process has a technical problem of being time-consuming.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a virtual machine migration method, a virtualization device, a storage medium and a device, and aims to solve the technical problem that the time consumption of a virtual machine migration process is long.
In order to achieve the above object, the present invention provides a virtual machine migration method, which includes the following steps:
the method comprises the steps of obtaining a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform;
storing a preset tool installation package into a target disk of the virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool;
and starting the virtual machine to be migrated to run the preset tool installation package, and performing installation operation of the virtual machine performance optimization tool.
Preferably, after the virtual machine to be migrated is obtained and copied to a preset virtualization platform, the virtual machine migration method further includes:
creating a virtual machine to be used;
determining a target disk of the virtual machine to be migrated through the virtual machine to be used;
the step of storing the preset tool installation package into the target disk of the virtual machine to be migrated includes:
and storing a preset tool installation package into a target disk of the virtual machine to be migrated through the virtual machine to be used.
Preferably, the storing, by the virtual machine to be used, the preset tool installation package to the target disk of the virtual machine to be migrated includes:
loading a preset tool installation package from the CD-ROM device of the virtual machine to be used;
and storing the preset tool installation package into a target disk of the virtual machine to be migrated.
Preferably, after the virtual machine to be used stores the preset tool installation package in the target disk of the virtual machine to be migrated, the virtual machine migration method further includes:
indicating the virtual machine to be used to perform shutdown operation;
enabling the virtual machine to be migrated to monitor shutdown notification of the virtual machine to be used;
and if the shutdown notification is not received within a preset time period, performing forced shutdown on the virtual machine to be used.
Preferably, after the virtual machine to be used stores the preset tool installation package in the target disk of the virtual machine to be migrated, the virtual machine migration method further includes:
loading a registry file of the virtual machine to be migrated through the virtual machine to be used, and adding agent installation information into the registry file;
enabling the virtual machine to be migrated to run the preset tool installation package, and performing installation operation of the virtual machine performance optimization tool, wherein the installation operation comprises:
and starting the virtual machine to be migrated to trigger the agent installation information, and operating the preset tool installation package through the agent installation information to perform installation operation of the virtual machine performance optimization tool.
Preferably, the obtaining a virtual machine to be migrated and copying the virtual machine to be migrated to a preset virtualization platform include:
if a virtual machine migration request is received, acquiring a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform;
after the virtual machine to be migrated is enabled to run the preset tool installation package and the installation operation of the virtual machine performance optimization tool is performed, the virtual machine migration method further includes:
and displaying prompt information, wherein the prompt information is used for prompting the completion of the migration of the virtual machine.
Preferably, after the virtual machine to be migrated is obtained and copied to a preset virtualization platform, the virtual machine migration method further includes:
and changing the virtual machine configuration corresponding to the virtual machine to be migrated into the virtual machine configuration corresponding to the preset virtualization platform.
In addition, to achieve the above object, the present invention further provides a virtualization device, where the virtualization device includes a memory, a processor, and a virtual machine migration program stored in the memory and executable on the processor, and the virtual machine migration program is configured to implement the steps of the virtual machine migration method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium, where a virtual machine migration program is stored, and the virtual machine migration program, when executed by a processor, implements the steps of the virtual machine migration method as described above.
In addition, to achieve the above object, the present invention further provides a virtual machine migration apparatus, including:
the virtual machine determining module is used for acquiring a virtual machine to be migrated and copying the virtual machine to be migrated to a preset virtualization platform;
the installation package storage module is used for storing a preset tool installation package into a target disk of the virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool;
and the tool installation module is used for starting the virtual machine to be migrated to run the preset tool installation package and carrying out installation operation of the virtual machine performance optimization tool.
The method comprises the steps of obtaining a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform; storing a preset tool installation package into a target disk of a virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool; and starting the virtual machine to be migrated to run a preset tool installation package, and performing installation operation of the virtual machine performance optimization tool. Obviously, the installation package is automatically installed in the virtual machine, and the installation process of the installation package is started in a virtual machine starting mode, so that the automatic installation of the virtual machine performance optimization tool is realized, the virtual machine migration efficiency is improved, the manual installation operation of the virtual machine performance optimization tool is avoided, and the technical problem that the time consumption of the virtual machine migration process is long is solved.
Drawings
FIG. 1 is a schematic diagram of a virtualization device structure of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a virtual machine migration method according to the present invention;
FIG. 3 is a schematic flow chart illustrating a virtual machine migration method according to another embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating another process of the virtual machine migration method according to the present invention;
fig. 5 is a block diagram of a virtual machine migration apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a virtualization device of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the virtualization apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), the optional user interface 1003 may also include a standard wired interface and a wireless interface, and the wired interface of the user interface 1003 may be a Universal Serial Bus (USB) interface in the present invention. The network interface 1004 may optionally include a standard wired interface as well as a wireless interface (e.g., WI-FI interface). The Memory 1005 may be a high speed Random Access Memory (RAM); or a stable Memory, such as a Non-volatile Memory (Non-volatile Memory), and may be a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in FIG. 1 does not constitute a limitation of a virtualization appliance, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a virtual machine migration program.
In the virtualization device shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting peripheral equipment; the virtualization device calls, through the processor 1001, the virtual machine migration program stored in the memory 1005, and performs the following operations:
the method comprises the steps of obtaining a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform;
storing a preset tool installation package into a target disk of the virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool;
and starting the virtual machine to be migrated to run the preset tool installation package, and performing installation operation of the virtual machine performance optimization tool.
Further, the processor 1001 may call a virtual machine migration program stored in the memory 1005, and further perform the following operations:
creating a virtual machine to be used;
determining a target disk of the virtual machine to be migrated through the virtual machine to be used;
accordingly, the following operations are also performed:
and storing a preset tool installation package into a target disk of the virtual machine to be migrated through the virtual machine to be used.
Further, the processor 1001 may call a virtual machine migration program stored in the memory 1005, and further perform the following operations:
loading a preset tool installation package from the CD-ROM device of the virtual machine to be used;
and storing the preset tool installation package into a target disk of the virtual machine to be migrated.
Further, the processor 1001 may call a virtual machine migration program stored in the memory 1005, and further perform the following operations:
indicating the virtual machine to be used to perform shutdown operation;
enabling the virtual machine to be migrated to monitor shutdown notification of the virtual machine to be used;
and if the shutdown notification is not received within a preset time period, performing forced shutdown on the virtual machine to be used.
Further, the processor 1001 may call a virtual machine migration program stored in the memory 1005, and further perform the following operations:
loading a registry file of the virtual machine to be migrated through the virtual machine to be used, and adding agent installation information into the registry file;
accordingly, the following operations are also performed:
and starting the virtual machine to be migrated to trigger the agent installation information, and operating the preset tool installation package through the agent installation information to perform installation operation of the virtual machine performance optimization tool.
Further, the processor 1001 may call a virtual machine migration program stored in the memory 1005, and further perform the following operations:
if a virtual machine migration request is received, acquiring a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform;
accordingly, the following operations are also performed:
and displaying prompt information, wherein the prompt information is used for prompting the completion of the migration of the virtual machine.
Further, the processor 1001 may call a virtual machine migration program stored in the memory 1005, and further perform the following operations:
and changing the virtual machine configuration corresponding to the virtual machine to be migrated into the virtual machine configuration corresponding to the preset virtualization platform.
In this embodiment, a virtual machine to be migrated is obtained, and the virtual machine to be migrated is copied to a preset virtualization platform; storing a preset tool installation package into a target disk of a virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool; and starting the virtual machine to be migrated to run a preset tool installation package, and performing installation operation of the virtual machine performance optimization tool. Obviously, in the embodiment, the installation package is automatically installed in the virtual machine, and the installation process of the installation package is started in a manner of starting the virtual machine, so that the automatic installation of the virtual machine performance optimization tool is realized, the virtual machine migration efficiency is also improved, the manual installation operation of the virtual machine performance optimization tool is avoided, and the technical problem that the time consumption of the virtual machine migration process is long is solved.
Based on the hardware structure, the embodiment of the virtual machine migration method is provided.
Referring to fig. 2, fig. 2 is a flow chart illustrating a virtual machine migration method according to the present invention.
In this embodiment, the virtual machine migration method includes the following steps:
step S10: the method comprises the steps of obtaining a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform.
It can be understood that the execution subject of this embodiment is a virtualization device, and the virtualization device may be a server or a server cluster.
It should be appreciated that, in order to reduce the time consumption of the virtual machine migration process, the manual installation operation of the virtual machine performance optimization tool may be bypassed, and instead, the automated installation of the virtual machine performance optimization tool may be used.
In a specific implementation, a virtual machine to be migrated in an original virtualization platform may be obtained first, where the original virtualization platform may be denoted as a platform a, and the platform a may be a VMware platform, which is a virtualization platform provided by a third party. Then, the virtual machine to be migrated is copied to another virtualization platform, i.e., a preset virtualization platform, which can be recorded as platform B.
It should be understood that the server as the execution subject of the present embodiment may be one of the servers of the execution platform B, and a virtual machine may be executed on the server.
In addition, a preset virtualization platform providing a virtualization function can be built based on a Hyper-Converged Infrastructure (HCI). The HCI means that the same unit device not only has resources and technologies such as computation, network, storage and server virtualization, but also comprises elements such as backup software, snapshot technology, data de-duplication, online data compression and the like, and multiple sets of unit devices can be aggregated through the network to realize modular seamless horizontal expansion (scale-out) to form a uniform resource pool.
Step S20: and storing a preset tool installation package into the target disk of the virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool.
It can be understood that, after the virtual machine to be migrated is copied, the operation is not finished, and the installation process of the virtual machine performance optimization tool is directly and automatically entered. Specifically, the preset tool installation package is stored in the target disk of the virtual machine to be migrated. The target disk of the virtual machine to be migrated may be a system disk in the virtual machine to be migrated.
Further, the virtual machine performance optimization tool may be denoted vmtools.
Step S30: and starting the virtual machine to be migrated to run the preset tool installation package, and performing installation operation of the virtual machine performance optimization tool.
It should be appreciated that the virtual machine to be migrated may be run after the installation package is saved in the system disk. Because the preset tool installation package exists in the system disk of the virtual machine to be migrated, the installation package can be operated by operating the virtual machine to be migrated, and then the installation operation of vmtools is carried out.
Therefore, in the embodiment, the installation package is automatically installed in the virtual machine, and the installation process of the installation package is started in a virtual machine starting mode, so that the automatic installation of the virtual machine performance optimization tool is realized, and the virtual machine migration efficiency is improved.
Further, compared with some installation methods of automatic installation, the installation method needs the intervention of an operator and the input of an automatic installation command and configuration, and the embodiment also does not need to input the automatic installation command and configuration in the middle. In addition, the embodiment does not need prerequisites, for example, the installation can be realized without starting a power supply to trigger an installation request, a user does not need to log in the system, and the operation of an administrator is not required.
In this embodiment, a virtual machine to be migrated is obtained, and the virtual machine to be migrated is copied to a preset virtualization platform; storing a preset tool installation package into a target disk of a virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool; and starting the virtual machine to be migrated to run a preset tool installation package, and performing installation operation of the virtual machine performance optimization tool. Obviously, in the embodiment, the installation package is automatically installed in the virtual machine, and the installation process of the installation package is started in a manner of starting the virtual machine, so that the automatic installation of the virtual machine performance optimization tool is realized, the virtual machine migration efficiency is also improved, the manual installation operation of the virtual machine performance optimization tool is avoided, and the technical problem that the time consumption of the virtual machine migration process is long is solved.
Referring to fig. 3, fig. 3 is a schematic flow chart of a virtual machine migration method according to another embodiment of the present invention, which is provided based on the embodiment shown in fig. 2.
In this embodiment, after step S10, the virtual machine migration method further includes:
step S101: a virtual machine to be used is created.
It can be understood that, in order to promote stable operation of the automatic installation process of the virtual machine performance optimization tool after the virtual machine to be migrated is copied to the platform B, the present embodiment will additionally create a virtual machine to execute the automatic installation process of the virtual machine performance optimization tool. The virtual machine created additionally here can be marked as the virtual machine to be used.
Furthermore, the virtual machine to be used may be based on a Windows preinstallation environment (Windows preinstallation)
n Environment, Windows PE), the Windows preinstalled Environment system may be referred to as a WinPE system. The virtual machine to be used in this state may be denoted as a WinPE virtual machine.
Step S102: and determining a target disk of the virtual machine to be migrated through the virtual machine to be used.
It should be understood that the subsequent flows can all be implemented by the WinPE virtual machine. For example, a system disk in a virtual machine to be migrated is identified by a WinPE virtual machine.
The step S20 includes:
step S201: and storing a preset tool installation package into a target disk of the virtual machine to be migrated through the virtual machine to be used.
It should be noted that the WinPE virtual machine then stores the preset tool installation package into the system disk of the virtual machine to be migrated.
Further, the storing a preset tool installation package to a target disk of the virtual machine to be migrated through the virtual machine to be used includes:
loading a preset tool installation package from the CD-ROM device of the virtual machine to be used;
and storing the preset tool installation package into a target disk of the virtual machine to be migrated.
In specific implementation, the preset tool installation package can be acquired from the optical drive device of the WinPE virtual machine, and then the preset tool installation package is copied to a system disk of the virtual machine to be migrated. The optical Disc drive device of the WinPE virtual machine may be a Compact Disc Read-Only Memory (CD-ROM) of the WinPE virtual machine.
Further, after the virtual machine to be used stores the preset tool installation package in the target disk of the virtual machine to be migrated, the virtual machine migration method further includes:
indicating the virtual machine to be used to perform shutdown operation;
enabling the virtual machine to be migrated to monitor shutdown notification of the virtual machine to be used;
and if the shutdown notification is not received within a preset time period, performing forced shutdown on the virtual machine to be used.
In specific implementation, after the WinPE virtual machine stores the preset tool installation package to the target disk of the virtual machine to be migrated, the created WinPE virtual machine can be closed, and system resources are saved. After the WinPE virtual machine is indicated to be shut down, whether the WinPE virtual machine is actually shut down is not determined, at the moment, the virtual machine to be migrated can be started, and the virtual machine to be migrated monitors the shut-down state of the WinPE virtual machine. If a shutdown notification indicating that the WinPE virtual machine is actually shut down is not received within a period of time, the virtual machine to be migrated can forcibly shut down the WinPE virtual machine.
Further, after the virtual machine to be used stores the preset tool installation package in the target disk of the virtual machine to be migrated, the virtual machine migration method further includes:
loading a registry file of the virtual machine to be migrated through the virtual machine to be used, and adding agent installation information into the registry file;
enabling the virtual machine to be migrated to run the preset tool installation package, and performing installation operation of the virtual machine performance optimization tool, wherein the installation operation comprises:
and starting the virtual machine to be migrated to trigger the agent installation information, and operating the preset tool installation package through the agent installation information to perform installation operation of the virtual machine performance optimization tool.
In the specific implementation, the WinPE virtual machine loads a registry file of the virtual machine to be migrated, and inserts the agent installation information into the registry file. The agent installation information is an agent installation service (Proxy install service) component, and the agent installation service component is automatically operated subsequently when the virtual machine to be migrated is operated, so that the automatic installation of the virtual machine performance optimization tool is performed.
The proxy installation service is started along with the system starting, and the operation is not influenced by whether a user logs in the operating system or not.
It can be understood that after the agent installation information is inserted into the registry file in the virtual machine to be migrated, if the virtual machine to be migrated is started, the agent installation information will be automatically triggered. The agent installation service component will automatically perform agent installation of vmtools.
In this embodiment, a virtual machine is additionally created to ensure stable operation of the automatic installation process of the virtual machine performance optimization tool. In addition, after the preset tool installation package is stored to the target disk of the virtual machine to be migrated, the additionally created virtual machine to be used can be closed, so that system resources are saved.
Referring to fig. 4, fig. 4 is a schematic flow chart of a virtual machine migration method according to another embodiment of the present invention, which is based on the embodiment shown in fig. 2.
In this embodiment, the step S10 includes:
step S103: and if a virtual machine migration request is received, acquiring a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform.
It can be understood that, after a user initiates a virtual machine migration request, if a virtualization device receives the virtual machine migration request, the virtual machine is copied first, and then the installation operation of the virtual machine performance optimization tool is automatically performed.
After step S30, the virtual machine migration method further includes:
step S40: and displaying prompt information, wherein the prompt information is used for prompting the completion of the migration of the virtual machine.
In a specific implementation, after both the virtual machine copying operation and the virtual machine performance optimization tool installation operation are finished, prompt information is fed back to a user to represent the end of virtual machine migration, so that the user does not perceive the virtual machine performance optimization tool installation operation, which belongs to the migration process.
Therefore, for the user, when the prompt information is acquired on the webpage, the migration is completed, and the virtual machine performance optimization tool is installed.
Further, after the virtual machine to be migrated is obtained and copied to a preset virtualization platform, the virtual machine migration method further includes:
and changing the virtual machine configuration corresponding to the virtual machine to be migrated into the virtual machine configuration corresponding to the preset virtualization platform.
It will be appreciated that compatibility processing will be enabled after the virtual machine replication is successful. The compatibility processing means that the migrated virtual machine can be adapted to the current virtualization platform, that is, the virtual machine in the platform a is adapted to the platform B. Therefore, the virtual machine configuration of the virtual machine to be migrated is adaptively adjusted to be adapted to the platform B. And after the configuration of the virtual machine is changed, the step of starting the virtual machine to be migrated to run the preset tool installation package and carrying out the installation operation of the virtual machine performance optimization tool is carried out, wherein the virtual machine to be migrated after the configuration of the virtual machine is changed is started.
In this embodiment, by introducing compatibility processing, automatic adaptation of virtual machine configuration can be performed.
In addition, an embodiment of the present invention further provides a storage medium, where a virtual machine migration program is stored on the storage medium, and when executed by a processor, the virtual machine migration program implements the following operations:
the method comprises the steps of obtaining a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform;
storing a preset tool installation package into a target disk of the virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool;
and starting the virtual machine to be migrated to run the preset tool installation package, and performing installation operation of the virtual machine performance optimization tool.
Further, the virtual machine migration program when executed by the processor further performs the following operations:
creating a virtual machine to be used;
determining a target disk of the virtual machine to be migrated through the virtual machine to be used;
accordingly, the following operations are also implemented:
and storing a preset tool installation package into a target disk of the virtual machine to be migrated through the virtual machine to be used.
Further, the virtual machine migration program when executed by the processor further performs the following operations:
loading a preset tool installation package from the CD-ROM device of the virtual machine to be used;
and storing the preset tool installation package into a target disk of the virtual machine to be migrated.
Further, the virtual machine migration program when executed by the processor further performs the following operations:
indicating the virtual machine to be used to perform shutdown operation;
enabling the virtual machine to be migrated to monitor shutdown notification of the virtual machine to be used;
and if the shutdown notification is not received within a preset time period, performing forced shutdown on the virtual machine to be used.
Further, the virtual machine migration program when executed by the processor further performs the following operations:
loading a registry file of the virtual machine to be migrated through the virtual machine to be used, and adding agent installation information into the registry file;
accordingly, the following operations are also implemented:
and starting the virtual machine to be migrated to trigger the agent installation information, and operating the preset tool installation package through the agent installation information to perform installation operation of the virtual machine performance optimization tool.
Further, the virtual machine migration program when executed by the processor further performs the following operations:
if a virtual machine migration request is received, acquiring a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform;
accordingly, the following operations are also implemented:
and displaying prompt information, wherein the prompt information is used for prompting the completion of the migration of the virtual machine.
Further, the virtual machine migration program when executed by the processor further performs the following operations:
and changing the virtual machine configuration corresponding to the virtual machine to be migrated into the virtual machine configuration corresponding to the preset virtualization platform.
In this embodiment, a virtual machine to be migrated is obtained, and the virtual machine to be migrated is copied to a preset virtualization platform; storing a preset tool installation package into a target disk of a virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool; and starting the virtual machine to be migrated to run a preset tool installation package, and performing installation operation of the virtual machine performance optimization tool. Obviously, in the embodiment, the installation package is automatically installed in the virtual machine, and the installation process of the installation package is started in a manner of starting the virtual machine, so that the automatic installation of the virtual machine performance optimization tool is realized, the virtual machine migration efficiency is also improved, the manual installation operation of the virtual machine performance optimization tool is avoided, and the technical problem that the time consumption of the virtual machine migration process is long is solved.
In addition, referring to fig. 5, an embodiment of the present invention further provides a virtual machine migration apparatus, where the virtual machine migration apparatus includes:
the virtual machine determining module 10 is configured to acquire a virtual machine to be migrated, and copy the virtual machine to be migrated to a preset virtualization platform.
It should be appreciated that, in order to reduce the time consumption of the virtual machine migration process, the manual installation operation of the virtual machine performance optimization tool may be bypassed, and instead, the automated installation of the virtual machine performance optimization tool may be used.
In a specific implementation, a virtual machine to be migrated in an original virtualization platform may be obtained first, where the original virtualization platform may be denoted as a platform a, and the platform a may be a VMware platform, which is a virtualization platform provided by a third party. Then, the virtual machine to be migrated is copied to another virtualization platform, i.e., a preset virtualization platform, which can be recorded as platform B.
It should be understood that the server as the execution subject of the present embodiment may be one of the servers of the execution platform B, and a virtual machine may be executed on the server.
In addition, a preset virtualization platform providing a virtualization function can be built based on a Hyper-Converged Infrastructure (HCI). The HCI means that the same unit device not only has resources and technologies such as computation, network, storage and server virtualization, but also comprises elements such as backup software, snapshot technology, data de-duplication, online data compression and the like, and multiple sets of unit devices can be aggregated through the network to realize modular seamless horizontal expansion (scale-out) to form a uniform resource pool.
And the installation package storage module 20 is configured to store a preset tool installation package to the target disk of the virtual machine to be migrated, where the preset tool installation package is used to install a virtual machine performance optimization tool.
It can be understood that, after the virtual machine to be migrated is copied, the operation is not finished, and the installation process of the virtual machine performance optimization tool is directly and automatically entered. Specifically, the preset tool installation package is stored in the target disk of the virtual machine to be migrated. The target disk of the virtual machine to be migrated may be a system disk in the virtual machine to be migrated.
Further, the virtual machine performance optimization tool may be denoted vmtools.
And the tool installation module 30 is configured to enable the virtual machine to be migrated to run the preset tool installation package, and perform installation operation of the virtual machine performance optimization tool.
It should be appreciated that the virtual machine to be migrated may be run after the installation package is saved in the system disk. Because the preset tool installation package exists in the system disk of the virtual machine to be migrated, the installation package can be operated by operating the virtual machine to be migrated, and then the installation operation of vmtools is carried out.
Therefore, in the embodiment, the installation package is automatically installed in the virtual machine, and the installation process of the installation package is started in a virtual machine starting mode, so that the automatic installation of the virtual machine performance optimization tool is realized, and the virtual machine migration efficiency is improved.
Further, compared with some installation methods of automatic installation, the installation method needs the intervention of an operator and the input of an automatic installation command and configuration, and the embodiment also does not need to input the automatic installation command and configuration in the middle. In addition, the embodiment does not need prerequisites, for example, the installation can be realized without starting a power supply to trigger an installation request, a user does not need to log in the system, and the operation of an administrator is not required.
In this embodiment, a virtual machine to be migrated is obtained, and the virtual machine to be migrated is copied to a preset virtualization platform; storing a preset tool installation package into a target disk of a virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool; and starting the virtual machine to be migrated to run a preset tool installation package, and performing installation operation of the virtual machine performance optimization tool. Obviously, in the embodiment, the installation package is automatically installed in the virtual machine, and the installation process of the installation package is started in a manner of starting the virtual machine, so that the automatic installation of the virtual machine performance optimization tool is realized, the virtual machine migration efficiency is also improved, the manual installation operation of the virtual machine performance optimization tool is avoided, and the technical problem that the time consumption of the virtual machine migration process is long is solved.
In one embodiment, the virtual machine migration apparatus includes:
the virtual machine creating module is used for creating a virtual machine to be used; determining a target disk of the virtual machine to be migrated through the virtual machine to be used;
the installation package storage module 20 is further configured to store a preset tool installation package to the target disk of the virtual machine to be migrated through the virtual machine to be used.
In an embodiment, the installation package saving module 20 is further configured to load a preset tool installation package from the optical disc drive device to use the virtual machine; and storing the preset tool installation package into a target disk of the virtual machine to be migrated.
In one embodiment, the virtual machine migration apparatus includes:
the virtual machine shutdown module is used for indicating the virtual machine to be used to perform shutdown operation; enabling the virtual machine to be migrated to monitor shutdown notification of the virtual machine to be used; and if the shutdown notification is not received within a preset time period, performing forced shutdown on the virtual machine to be used.
In one embodiment, the virtual machine migration apparatus includes:
the agent information adding module is used for loading the registry file of the virtual machine to be migrated through the virtual machine to be used and adding agent installation information into the registry file;
the tool installation module 30 is further configured to start the virtual machine to be migrated to trigger the agent installation information, run the preset tool installation package through the agent installation information, and perform installation operation of the virtual machine performance optimization tool.
In one embodiment, the virtual machine migration apparatus includes:
the virtual machine determining module 10 is further configured to, if a virtual machine migration request is received, acquire a virtual machine to be migrated, and copy the virtual machine to be migrated to a preset virtualization platform;
and the prompt module is used for displaying prompt information, and the prompt information is used for prompting the completion of the migration of the virtual machine.
In one embodiment, the virtual machine migration apparatus includes:
and the compatibility processing module is used for changing the virtual machine configuration corresponding to the virtual machine to be migrated into the virtual machine configuration corresponding to the preset virtualization platform.
Other embodiments or specific implementation manners of the virtual machine migration apparatus according to the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order, but rather the words first, second, third, etc. are to be interpreted as names.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory, a RAM, a magnetic disk, and an optical disk), and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A virtual machine migration method is characterized by comprising the following steps:
the method comprises the steps of obtaining a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform;
storing a preset tool installation package into a target disk of the virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool;
starting the virtual machine to be migrated to run the preset tool installation package, and performing installation operation of the virtual machine performance optimization tool;
after the virtual machine to be migrated is obtained and copied to a preset virtualization platform, the virtual machine migration method further includes:
creating a virtual machine to be used;
determining a target disk of the virtual machine to be migrated through the virtual machine to be used;
determining a target disk of the virtual machine to be migrated through the virtual machine to be used includes:
and identifying a system disk in the virtual machine to be migrated through the virtual machine to be used, and taking the system disk as a target disk.
2. The virtual machine migration method according to claim 1, wherein after the virtual machine to be migrated is acquired and copied to a preset virtualization platform, the virtual machine migration method further comprises:
and storing a preset tool installation package into a target disk of the virtual machine to be migrated through the virtual machine to be used.
3. The virtual machine migration method according to claim 2, wherein the saving, by the virtual machine to be used, the preset tool installation package to the target disk of the virtual machine to be migrated includes:
loading a preset tool installation package from the CD-ROM device of the virtual machine to be used;
and storing the preset tool installation package into a target disk of the virtual machine to be migrated.
4. The virtual machine migration method according to claim 2, wherein after the virtual machine to be used stores the preset tool installation package in the target disk of the virtual machine to be migrated, the virtual machine migration method further comprises:
indicating the virtual machine to be used to perform shutdown operation;
enabling the virtual machine to be migrated to monitor shutdown notification of the virtual machine to be used;
and if the shutdown notification is not received within a preset time period, performing forced shutdown on the virtual machine to be used.
5. The virtual machine migration method according to claim 2, wherein after the virtual machine to be used stores the preset tool installation package in the target disk of the virtual machine to be migrated, the virtual machine migration method further comprises:
loading a registry file of the virtual machine to be migrated through the virtual machine to be used, and adding agent installation information into the registry file;
enabling the virtual machine to be migrated to run the preset tool installation package, and performing installation operation of the virtual machine performance optimization tool, wherein the installation operation comprises:
and starting the virtual machine to be migrated to trigger the agent installation information, and operating the preset tool installation package through the agent installation information to perform installation operation of the virtual machine performance optimization tool.
6. The virtual machine migration method according to any one of claims 1 to 5, wherein the obtaining of the virtual machine to be migrated and the copying of the virtual machine to be migrated to a preset virtualization platform include:
if a virtual machine migration request is received, acquiring a virtual machine to be migrated, and copying the virtual machine to be migrated to a preset virtualization platform;
after the virtual machine to be migrated is enabled to run the preset tool installation package and the installation operation of the virtual machine performance optimization tool is performed, the virtual machine migration method further includes:
and displaying prompt information, wherein the prompt information is used for prompting the completion of the migration of the virtual machine.
7. The virtual machine migration method according to any one of claims 1 to 5, wherein after the virtual machine to be migrated is acquired and copied to a preset virtualization platform, the virtual machine migration method further comprises:
and changing the virtual machine configuration corresponding to the virtual machine to be migrated into the virtual machine configuration corresponding to the preset virtualization platform.
8. A virtualization device, comprising: memory, a processor and a virtual machine migration program stored on the memory and executable on the processor, the virtual machine migration program when executed by the processor implementing the steps of the virtual machine migration method according to any one of claims 1 to 7.
9. A storage medium having stored thereon a virtual machine migration program which, when executed by a processor, implements the steps of the virtual machine migration method according to any one of claims 1 to 7.
10. A virtual machine migration apparatus, wherein the virtual machine migration apparatus comprises:
the virtual machine determining module is used for acquiring a virtual machine to be migrated and copying the virtual machine to be migrated to a preset virtualization platform;
the installation package storage module is used for storing a preset tool installation package into a target disk of the virtual machine to be migrated, wherein the preset tool installation package is used for installing a virtual machine performance optimization tool;
the tool installation module is used for starting the virtual machine to be migrated to run the preset tool installation package and carrying out installation operation of the virtual machine performance optimization tool;
the virtual machine creating module is used for creating a virtual machine to be used; and identifying a system disk in the virtual machine to be migrated through the virtual machine to be used, and taking the system disk as a target disk.
CN201911228028.XA 2019-12-04 2019-12-04 Virtual machine migration method, virtualization device, storage medium and device Active CN110673930B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911228028.XA CN110673930B (en) 2019-12-04 2019-12-04 Virtual machine migration method, virtualization device, storage medium and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911228028.XA CN110673930B (en) 2019-12-04 2019-12-04 Virtual machine migration method, virtualization device, storage medium and device

Publications (2)

Publication Number Publication Date
CN110673930A true CN110673930A (en) 2020-01-10
CN110673930B CN110673930B (en) 2020-07-17

Family

ID=69088335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911228028.XA Active CN110673930B (en) 2019-12-04 2019-12-04 Virtual machine migration method, virtualization device, storage medium and device

Country Status (1)

Country Link
CN (1) CN110673930B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117290059A (en) * 2023-11-27 2023-12-26 四川中电启明星信息技术有限公司 Cross-chip architecture linux virtual machine transfer method and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8195866B2 (en) * 2007-04-26 2012-06-05 Vmware, Inc. Adjusting available persistent storage during execution in a virtual computer system
CN103109271A (en) * 2012-08-30 2013-05-15 华为技术有限公司 Inter-platform application migration realization method and system
US9098698B2 (en) * 2008-09-12 2015-08-04 George Mason Research Foundation, Inc. Methods and apparatus for application isolation
US20150363219A1 (en) * 2014-03-14 2015-12-17 Avni Networks Inc. Optimization to create a highly scalable virtual netork service/application using commodity hardware
CN106201660A (en) * 2016-07-14 2016-12-07 浪潮电子信息产业股份有限公司 A kind of method of virtual machine automatic upgrading virtual hardware and software
CN107370679A (en) * 2017-07-20 2017-11-21 郑州云海信息技术有限公司 A kind of method and device for realizing migration process
CN108255574A (en) * 2017-12-05 2018-07-06 顺丰科技有限公司 A kind of virtual machine migration method and device
CN108345493A (en) * 2018-03-13 2018-07-31 国云科技股份有限公司 A method of based on cloudy across the cloud migration of system Windows virtual machines under the overall leadership
CN105843682B (en) * 2016-03-29 2019-03-01 新浪网技术(中国)有限公司 It is a kind of migration virtual machine to IaaS cloud platform method and device
CN109739617A (en) * 2018-12-07 2019-05-10 国云科技股份有限公司 A method of across the cloud migration of Linux virtual machine based on cloudy system under the overall leadership
CN105279000B (en) * 2015-11-19 2019-06-21 北京北信源软件股份有限公司 A kind of software virtual machine installation method, installation controller and installation agent

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8195866B2 (en) * 2007-04-26 2012-06-05 Vmware, Inc. Adjusting available persistent storage during execution in a virtual computer system
US9098698B2 (en) * 2008-09-12 2015-08-04 George Mason Research Foundation, Inc. Methods and apparatus for application isolation
CN103109271A (en) * 2012-08-30 2013-05-15 华为技术有限公司 Inter-platform application migration realization method and system
US20150363219A1 (en) * 2014-03-14 2015-12-17 Avni Networks Inc. Optimization to create a highly scalable virtual netork service/application using commodity hardware
CN105279000B (en) * 2015-11-19 2019-06-21 北京北信源软件股份有限公司 A kind of software virtual machine installation method, installation controller and installation agent
CN105843682B (en) * 2016-03-29 2019-03-01 新浪网技术(中国)有限公司 It is a kind of migration virtual machine to IaaS cloud platform method and device
CN106201660A (en) * 2016-07-14 2016-12-07 浪潮电子信息产业股份有限公司 A kind of method of virtual machine automatic upgrading virtual hardware and software
CN107370679A (en) * 2017-07-20 2017-11-21 郑州云海信息技术有限公司 A kind of method and device for realizing migration process
CN108255574A (en) * 2017-12-05 2018-07-06 顺丰科技有限公司 A kind of virtual machine migration method and device
CN108345493A (en) * 2018-03-13 2018-07-31 国云科技股份有限公司 A method of based on cloudy across the cloud migration of system Windows virtual machines under the overall leadership
CN109739617A (en) * 2018-12-07 2019-05-10 国云科技股份有限公司 A method of across the cloud migration of Linux virtual machine based on cloudy system under the overall leadership

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
富宇,等;: "基于异构平台的开源VIRT-V2V虚拟化迁移迁移自动化实现的研究", 《电力信息与通信技术》 *
郑楠,等;: "基于CloudStack和OpenStack的KVM虚拟机跨平台迁移方法", 《通信学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117290059A (en) * 2023-11-27 2023-12-26 四川中电启明星信息技术有限公司 Cross-chip architecture linux virtual machine transfer method and system
CN117290059B (en) * 2023-11-27 2024-03-15 四川中电启明星信息技术有限公司 Cross-chip architecture linux virtual machine transfer method and system

Also Published As

Publication number Publication date
CN110673930B (en) 2020-07-17

Similar Documents

Publication Publication Date Title
US20210216360A1 (en) Virtual machine migration method and apparatus
US7823023B2 (en) Test framework for testing an application
US8214631B2 (en) Host build and rebuild system and method
CN103699398A (en) Terminal equipment and starting control method thereof
WO2021121407A1 (en) Capacity changing method and apparatus for virtual machine
TWI450090B (en) Method and system of changing a startup list of programs to determine whether computer system performance increases
CN103975306A (en) Method and system for creating a virtual appliance
CN109634713B (en) Virtual machine starting method and device
CN106775876B (en) Method for quickly starting application by android system
US10169596B2 (en) Information processing apparatus, method, and storage medium
CN110968331A (en) Method and device for running application program
US10318343B2 (en) Migration methods and apparatuses for migrating virtual machine including locally stored and shared data
CN112612417A (en) Data migration method, device, equipment and storage medium
CN110795162B (en) Method and device for generating container mirror image file
CN110673930B (en) Virtual machine migration method, virtualization device, storage medium and device
CN112328297B (en) Method and device for upgrading Android system running compatibly on Linux
CN112579361A (en) Backup data reconstruction method, device, equipment and storage medium
CN110134546B (en) Batch restarting windows system method, electronic device and storage medium
CN116880877A (en) Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium
WO2014067368A1 (en) Method, apparatus and device for obtaining resource preview image
US9323907B2 (en) Distribution apparatus, device, control method for distribution apparatus, and storage medium
CN110968852B (en) Virtual machine password management method, system, equipment and computer storage medium
CN104516752A (en) Information processing method and electronic equipment
CN113515299A (en) Software development kit SDK hot upgrading method, device, equipment and storage medium
US8918630B1 (en) System, apparatus, and method for initiating a reboot of a personal computer system by pressing a button on an attached storage device and causing the operating system on the attached storage device to be booted

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