CN111078366B - Virtual machine migration method, system, equipment and computer readable storage medium - Google Patents
Virtual machine migration method, system, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN111078366B CN111078366B CN201911329596.9A CN201911329596A CN111078366B CN 111078366 B CN111078366 B CN 111078366B CN 201911329596 A CN201911329596 A CN 201911329596A CN 111078366 B CN111078366 B CN 111078366B
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- software tool
- migration
- migrated
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000013508 migration Methods 0.000 title claims abstract description 114
- 230000005012 migration Effects 0.000 title claims abstract description 114
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000009434 installation Methods 0.000 claims abstract description 55
- 238000012546 transfer Methods 0.000 claims description 38
- 238000004590 computer program Methods 0.000 claims description 34
- 230000004044 response Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 17
- 238000004891 communication Methods 0.000 description 8
- 230000000875 corresponding effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000001276 controlling effect Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000013144 data compression Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000011900 installation process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
- G06F9/4856—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a virtual machine migration method, a system, equipment and a computer readable storage medium, which are applied to an HCI platform and respond to virtual machine migration instructions; copying data of the virtual machine to be migrated to obtain a virtual machine mirror image; mounting the software tool installation package, copying and storing the software tool installation package to a virtual machine image; calling a software tool installation program, and installing a software tool in the virtual machine image; and sending information representing successful migration of the virtual machine to be migrated. According to the virtual machine migration method, the system, the equipment and the computer readable storage medium, after the HCI platform obtains the virtual machine image, the software tool is installed in the virtual machine image by means of the software tool installation package and the software tool installation program, and then the information representing that migration of the virtual machine to be migrated is successful is sent, so that the function of automatically installing the software tool for the virtual machine to be migrated in the migration process of the virtual machine is realized, a user does not need to manually install the software tool for the virtual machine to be migrated, and user experience is improved.
Description
Technical Field
The present application relates to the field of virtual machine technologies, and in particular, to a virtual machine migration method, system, device, and computer readable storage medium.
Background
The super fusion infrastructure (Hyper-Converged Infrastructure, HCI) refers to resources and technologies such as computing, network, storage, server virtualization and the like in the same set of unit equipment, and further comprises elements such as backup software, snapshot technology, repeated data deletion, online data compression and the like, and multiple sets of unit equipment can be aggregated through the network to realize modularized seamless lateral expansion (scale-out) so as to form a uniform resource pool. However, in the application process of the HCI, when a virtual machine is migrated to the HCI, in order to facilitate management of the migrated virtual machine, a corresponding software tool needs to be installed.
The existing software tool installation method is manual installation, however, a user is required to set a front installation condition in the manual installation process, so that additional operation is brought to the user, and the user experience is affected.
In summary, how to improve the user experience in the migration process of the virtual machine is a problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a virtual machine migration method which can solve the technical problem of how to improve user experience in the virtual machine migration process to a certain extent. The application also provides a virtual machine migration system, equipment and a computer readable storage medium.
In order to achieve the above object, the present application provides the following technical solutions:
a virtual machine migration method is applied to an HCI platform, and comprises the following steps:
Responding to a virtual machine migration instruction;
copying data of the virtual machine to be migrated to obtain a virtual machine mirror image;
mounting a software tool installation package, copying and storing the software tool installation package to the virtual machine image;
Calling a software tool installation program, and installing a software tool in the virtual machine image;
And sending information representing successful migration of the virtual machine to be migrated.
Preferably, the installing and copying the software tool installation package to the virtual machine image includes:
creating a transfer virtual machine, and taking the virtual machine image as an auxiliary disk of the transfer virtual machine;
Commanding the transit virtual machine to mount the software tool installation package and copy and store the software tool installation package to the virtual machine image;
The calling a software tool installer to install a software tool in the virtual machine image includes:
And commanding the transit virtual machine to run the software tool installation program, and installing the software tool in the virtual machine image.
Preferably, the creating a transit virtual machine includes:
Creating the transit virtual machine through guestfish tools;
the HCI platform commands the relay virtual machine, including:
And commanding the transit virtual machine through the guestfish tool.
Preferably, the instructing the relay virtual machine to run the software tool installer, after installing the software tool in the virtual machine image, before sending the information indicating that the migration of the virtual machine to be migrated is successful, further includes:
And controlling the transfer virtual machine to execute a shutdown event.
Preferably, the software tool comprises vmtools tools.
Preferably, after sending the information indicating that the virtual machine to be migrated is migrated successfully, the method further includes:
and starting the migrated virtual machine.
Preferably, the calling the software tool installer installs a software tool in the virtual machine image, including:
And calling a software tool installation script, and installing a software tool in the virtual machine image, wherein a software tool installation program is packaged in the software tool installation script.
A virtual machine migration system, applied to an HCI platform, comprising:
the first response module is used for responding to the virtual machine migration instruction;
The first copying module is used for copying the data of the virtual machine to be migrated to obtain a virtual machine image;
The first setting module is used for mounting the software tool installation package and copying and storing the software tool installation package to the virtual machine image;
The first calling module is used for calling a software tool installation program and installing a software tool in the virtual machine image;
And the first sending module is used for sending information representing successful migration of the virtual machine to be migrated.
A virtual machine migration apparatus applied to an HCI platform, comprising:
A memory for storing a computer program;
And the processor is used for realizing the steps of the virtual machine migration method when executing the computer program.
A computer readable storage medium having stored therein a computer program which when executed by a processor implements the steps of any of the virtual machine migration methods described above.
The virtual machine migration method provided by the application is applied to an HCI platform and responds to virtual machine migration instructions; copying data of the virtual machine to be migrated to obtain a virtual machine mirror image; mounting the software tool installation package, copying and storing the software tool installation package to a virtual machine image; calling a software tool installation program, and installing a software tool in the virtual machine image; and sending information representing successful migration of the virtual machine to be migrated. According to the virtual machine migration method provided by the application, after the HCI platform obtains the virtual machine image, the software tool is installed in the virtual machine image by means of the software tool installation package and the software tool installation program, and then the information representing the migration success of the virtual machine to be migrated is sent, so that the function of automatically installing the software tool for the virtual machine to be migrated in the migration process of the virtual machine is realized, the user does not need to manually install the software tool for the virtual machine to be migrated, and the user experience is improved. The virtual machine migration system, the virtual machine migration equipment and the computer readable storage medium provided by the application also solve the corresponding technical problems.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a first flowchart of a virtual machine migration method according to an embodiment of the present application;
FIG. 2 is a second flowchart of a virtual machine migration method according to an embodiment of the present application;
FIG. 3 is a flow chart of a virtual machine migration method in practical application;
fig. 4 is a schematic structural diagram of a virtual machine migration system according to an embodiment of the present application;
Fig. 5 is a schematic structural diagram of a virtual machine migration device according to an embodiment of the present application;
fig. 6 is another schematic structural diagram of a virtual machine migration apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a first flowchart of a virtual machine migration method according to an embodiment of the present application.
The virtual machine migration method provided by the embodiment of the application is applied to an HCI platform and can comprise the following steps:
Step S101: responding to a virtual machine migration instruction.
In practical applications, before the virtual machine is migrated to the HCI platform, a virtual machine migration instruction is generally sent to the HCI platform, so that the HCI platform needs to perform virtual machine migration, so that the HCI platform needs to receive the virtual machine migration instruction and respond to the virtual machine migration instruction to execute the responding virtual machine migration operation.
Step S102: and copying the data of the virtual machine to be migrated to obtain a virtual machine mirror image.
In practical application, in the process of executing virtual machine migration operation, the HCI needs to copy data of the virtual machine to be migrated because the virtual machines before and after migration are the same, so as to obtain a virtual machine image, and then restart the virtual machine based on the virtual machine image, so as to realize migration of the virtual machine.
Step S103: and mounting the software tool installation package, copying and storing the software tool installation package to the virtual machine image.
Step S104: and calling a software tool installation program, and installing the software tool in the virtual machine image.
In practical application, after a virtual machine to be migrated is migrated to an HCI platform, in order to make the virtual machine to be migrated obey the management of HCI or make the virtual machine to be migrated meet the performance requirement of HCI, a corresponding software tool needs to be installed in the virtual machine to be migrated.
Step S105: and sending information representing successful migration of the virtual machine to be migrated.
In practical application, after the HCI platform installs a software tool for the virtual machine to be migrated, information indicating that the virtual machine to be migrated is migrated successfully can be sent, so that applications such as users migrate to the virtual machine of the HCI platform.
The virtual machine migration method provided by the application is applied to an HCI platform and responds to virtual machine migration instructions; copying data of the virtual machine to be migrated to obtain a virtual machine mirror image; mounting the software tool installation package, copying and storing the software tool installation package to a virtual machine image; calling a software tool installation program, and installing a software tool in the virtual machine image; and sending information representing successful migration of the virtual machine to be migrated. According to the virtual machine migration method provided by the application, after the HCI platform obtains the virtual machine image, the software tool is installed in the virtual machine image by means of the software tool installation package and the software tool installation program, and then the information representing the migration success of the virtual machine to be migrated is sent, so that the function of automatically installing the software tool for the virtual machine to be migrated in the migration process of the virtual machine is realized, the user does not need to manually install the software tool for the virtual machine to be migrated, and the user experience is improved.
Referring to fig. 2, fig. 2 is a second flowchart of a virtual machine migration method according to an embodiment of the present application.
The virtual machine migration method provided by the embodiment of the application is applied to an HCI platform and can comprise the following steps:
Step S201: responding to a virtual machine migration instruction.
Step S202: and copying the data of the virtual machine to be migrated to obtain a virtual machine mirror image.
Step S203: and creating a transfer virtual machine, and taking the virtual machine image as an auxiliary disk of the transfer virtual machine.
Step S204: the command transfer virtual machine mounts the software tool installation package and copies and stores the software tool installation package to the virtual machine image.
In practical application, in the process of mounting, copying and storing the software tool mounting package to the virtual machine image, in order to facilitate the operation on the virtual machine image, a virtual machine may be additionally created to manage the virtual machine image, specifically, the HCI platform may create a transit virtual machine, use the virtual machine image as an auxiliary disk of the transit virtual machine, and instruct the transit virtual machine to mount, copy and store the software tool mounting package to the virtual machine image.
Step S205: the command transfer virtual machine runs a software tool installer and installs the software tool in the virtual machine image.
Correspondingly, the HCI platform invokes the software tool installer, and in the process of installing the software tool in the virtual machine image, the software tool can be installed by means of a virtual machine which is additionally created, namely a transfer virtual machine, and specifically, the HCI platform can instruct the transfer virtual machine to run the software tool installer, and install the software tool in the virtual machine image.
Step S206: and sending information representing successful migration of the virtual machine to be migrated.
The virtual machine migration method provided by the embodiment of the application is applied to the HCI platform, and in order to facilitate management of the additionally created virtual machine, the HCI platform can operate the transfer virtual machine through guestfish tools, namely, when the HCI platform creates the transfer virtual machine, the transfer virtual machine can be created through guestfish tools; correspondingly, when the HCI platform transfers the virtual machine in the command, the HCI platform can transfer the virtual machine in the command through guestfish tools.
It should be noted that guestfish tools related to the present application refer to tools for editing virtual machine images in hosts, and guestfish commands are encapsulation tools for interfacing with open source library libguestfs only; wherein the Libguestfs library mirror virtual machine processing principle is to create a temporary special virtual machine guestfsd and wait for guestfish command instructions
The virtual machine migration method provided by the embodiment of the application is applied to an HCI platform, and in order to ensure that a software tool is truly landed to a virtual machine image, the HCI platform commands the transfer virtual machine to run a software tool installation program, and after the software tool is installed in the virtual machine image, the transfer virtual machine can be controlled to execute a shutdown event before information representing that the virtual machine to be migrated is successfully migrated is sent. Because the transfer virtual machine saves own data when executing the shutdown event, the software tool can be ensured to truly fall into the virtual machine image.
The virtual machine migration method provided by the embodiment of the application is applied to an HCI platform, and the software tool comprises vmtools tools.
It should be noted that the vmtools tool in the present application refers to a virtualization performance optimization tool, which can provide a virtualization implementation auxiliary tool, and after the virtual machine to be migrated is installed with the vmtools tool, a user can conveniently control the virtual machine to be migrated by means of the vmtools tool.
The virtual machine migration method provided by the embodiment of the application is applied to the HCI platform, and after information representing successful migration of the virtual machine to be migrated is sent, the HCI platform can also start the virtual machine after migration so as to deliver the virtual machine after migration to a user for use.
The virtual machine migration method provided by the embodiment of the application is applied to an HCI platform, in order to facilitate management of a software tool installation program, the software tool installation program can be packaged into a software tool installation script, and correspondingly, the HCI platform calls the software tool installation program, and the process of installing the software tool in a virtual machine mirror image can be specifically as follows: and calling a software tool installation script, and installing a software tool in the virtual machine image, wherein a software tool installation program is packaged in the software tool installation script.
For ease of understanding, the virtual machine migration process illustrated in FIG. 3 will now be described as an example. In fig. 3, the HCI platform includes Web, host, guestfish tool, guestsfd, migrate _vm_img, where the migrate_vm_img represents a linux system; the virtual machine to be migrated can be a virtual machine on vmware/h3 c; and communication between guestfish tools and guestsfd can be performed through an RPC tunnel. The virtual machine migration process is as follows:
A user triggers a migration request for migrating the virtual machine on vmware/h3c to the HCI platform through the web, and a vmtools tool is installed when the delivery use is selected;
after receiving the migration request, the host copies the data of the virtual machine to be migrated to obtain a virtual machine image, and executes compatibility processing;
During the compatibility process, host creates special virtual machine guestsfd using guestfish tools and takes the virtual machine image as an auxiliary disk for guestsfd;
host mounts and copies vmtools tool installation package in CDROM drive to virtual machine image through guestfish tool command guestsfd;
host runs vmtools install shell script through guestfish tool command guestsfd;
vmtools is installed and a shutdown event is executed;
guestfish the tool commands the end of the compatibility process and notifies host;
The host receives guestfish the end notice of the tool compatibility processing and updates the state to the web;
and the host starts the virtual machine after the migration is completed and delivers the virtual machine to the user for use.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a virtual machine migration system according to an embodiment of the present application.
The virtual machine migration system provided by the embodiment of the application is applied to an HCI platform and can comprise:
a first response module 101, configured to respond to a virtual machine migration instruction;
The first copying module 102 is configured to copy data of a virtual machine to be migrated to obtain a virtual machine image;
a first setting module 103, configured to mount and copy and save a software tool installation package to a virtual machine image;
a first calling module 104, configured to call a software tool installer, and install a software tool in the virtual machine image;
and the first sending module 105 is used for sending information representing that the virtual machine to be migrated is successfully migrated.
The first setting module of the virtual machine migration system provided by the embodiment of the present application may include:
the first creation sub-module is used for creating a transfer virtual machine and taking the virtual machine image as an auxiliary disk of the transfer virtual machine;
the first command submodule is used for commanding the transfer virtual machine to mount and copy the software tool mounting package to the virtual machine image;
the first calling module may include:
and the second command submodule is used for commanding the transfer virtual machine to run a software tool installation program and installing the software tool in the virtual machine image.
The first creation sub-module of the virtual machine migration system provided by the embodiment of the present application may include:
The first creation unit is used for creating a transit virtual machine through a guestfish tool;
Accordingly, the HCI platform command turns to a virtual machine via guestfish tool commands.
The virtual machine migration system provided by the embodiment of the application can further comprise:
The first control module is used for controlling the transfer virtual machine to execute a shutdown event after the second command sub-module commands the transfer virtual machine to run a software tool installation program and after the software tool is installed in the virtual machine image, the first sending module sends information representing that the virtual machine to be migrated is successfully migrated.
The virtual machine migration system provided by the embodiment of the application, the software tool can comprise vmtools tools.
The virtual machine migration system provided by the embodiment of the application can further comprise:
The first starting module is used for starting the virtual machine after migration after the first sending module sends information representing that the virtual machine to be migrated is successfully migrated.
The first call module of the virtual machine migration system provided by the embodiment of the application may include:
The first calling unit is used for calling a software tool installation script, installing a software tool in the virtual machine image, and packaging a software tool installation program in the software tool installation script.
The application also provides virtual machine migration equipment and a computer readable storage medium, which have the corresponding effects of the virtual machine migration method provided by the embodiment of the application. Referring to fig. 5, fig. 5 is a schematic structural diagram of a virtual machine migration apparatus according to an embodiment of the present application.
The virtual machine migration device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program:
Responding to a virtual machine migration instruction;
copying data of the virtual machine to be migrated to obtain a virtual machine mirror image;
mounting the software tool installation package, copying and storing the software tool installation package to a virtual machine image;
Calling a software tool installation program, and installing a software tool in the virtual machine image;
And sending information representing successful migration of the virtual machine to be migrated.
The virtual machine migration device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program: creating a transfer virtual machine, and taking a virtual machine image as an auxiliary disk of the transfer virtual machine; the command transfer virtual machine mounts the software tool installation package and copies and stores the software tool installation package to a virtual machine image; the command transfer virtual machine runs a software tool installer and installs the software tool in the virtual machine image.
The virtual machine migration device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program: creating a transit virtual machine through guestfish tools; the virtual machine is turned through guestfish tool commands.
The virtual machine migration device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program: and the transfer virtual machine is controlled to execute a shutdown event after the software tool is installed in the virtual machine image and before information representing that the virtual machine to be migrated is successfully migrated is sent.
The virtual machine migration device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program: the software tools include vmtools tools.
The virtual machine migration device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program: and after information representing successful migration of the virtual machine to be migrated is sent, starting the virtual machine after migration.
The virtual machine migration device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program: and calling a software tool installation script, and installing a software tool in the virtual machine image, wherein a software tool installation program is packaged in the software tool installation script.
Referring to fig. 5, another virtual machine migration apparatus provided in an embodiment of the present application may further include: an input port 203 connected to the processor 202 for transmitting an externally input command to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing result of the processor 202 to the outside; and the communication module 205 is connected with the processor 202 and is used for realizing communication between the virtual machine migration equipment and the outside. The display unit 204 may be a display panel, a laser scanning display, or the like; communication means employed by the communication module 205 include, but are not limited to, mobile high definition link technology (HML), universal Serial Bus (USB), high Definition Multimedia Interface (HDMI), wireless connection: wireless fidelity (WiFi), bluetooth communication, bluetooth low energy communication, ieee802.11s based communication.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the following steps are realized:
Responding to a virtual machine migration instruction;
copying data of the virtual machine to be migrated to obtain a virtual machine mirror image;
mounting the software tool installation package, copying and storing the software tool installation package to a virtual machine image;
Calling a software tool installation program, and installing a software tool in the virtual machine image;
And sending information representing successful migration of the virtual machine to be migrated.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the following steps are realized: creating a transfer virtual machine, and taking a virtual machine image as an auxiliary disk of the transfer virtual machine; the command transfer virtual machine mounts the software tool installation package and copies and stores the software tool installation package to a virtual machine image; the command transfer virtual machine runs a software tool installer and installs the software tool in the virtual machine image.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the following steps are realized: creating a transit virtual machine through guestfish tools; the HCI platform turns virtual machines through guestfish tool commands.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the following steps are realized: and the transfer virtual machine is controlled to execute a shutdown event after the software tool is installed in the virtual machine image and before information representing that the virtual machine to be migrated is successfully migrated is sent.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the following steps are realized: the software tools include vmtools tools.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the following steps are realized: and after information representing successful migration of the virtual machine to be migrated is sent, starting the virtual machine after migration.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the following steps are realized: and calling a software tool installation script, and installing a software tool in the virtual machine image, wherein a software tool installation program is packaged in the software tool installation script.
The computer readable storage medium to which the present application relates includes Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The description of the related parts in the virtual machine migration system, the device and the computer readable storage medium provided in the embodiments of the present application is referred to in the detailed description of the corresponding parts in the virtual machine migration method provided in the embodiments of the present application, and will not be repeated here. In addition, the parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of the corresponding technical solutions in the prior art, are not described in detail, so that redundant descriptions are avoided.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (9)
1. The virtual machine migration method is characterized by being applied to an HCI platform and comprising the following steps:
Responding to a virtual machine migration instruction;
copying data of the virtual machine to be migrated to obtain a virtual machine mirror image;
mounting a software tool installation package, copying and storing the software tool installation package to the virtual machine image;
Calling a software tool installation program, and installing a software tool in the virtual machine image;
Transmitting information representing successful migration of the virtual machine to be migrated;
The software tool installation package is installed and copied and stored to the virtual machine image, and the method comprises the following steps:
creating a transfer virtual machine, and taking the virtual machine image as an auxiliary disk of the transfer virtual machine;
Commanding the transit virtual machine to mount the software tool installation package and copy and store the software tool installation package to the virtual machine image;
The calling a software tool installer to install a software tool in the virtual machine image includes:
And commanding the transit virtual machine to run the software tool installation program, and installing the software tool in the virtual machine image.
2. The method of claim 1, wherein creating a staging virtual machine comprises:
Creating the transit virtual machine through guestfish tools;
the HCI platform commands the relay virtual machine, including:
And commanding the transit virtual machine through the guestfish tool.
3. The method of claim 1, wherein the instructing the staging virtual machine to run the software tool installer further comprises, after installing the software tool in the virtual machine image, before the sending the information characterizing that the migration of the virtual machine to be migrated was successful:
And controlling the transfer virtual machine to execute a shutdown event.
4. A method according to any one of claims 1 to 3, wherein the software tool comprises vmtools tool.
5. The method of claim 4, wherein after sending the information indicating that the virtual machine to be migrated was migrated successfully, further comprising:
and starting the migrated virtual machine.
6. The method of claim 4, wherein the calling a software tool installer installs a software tool in the virtual machine image, comprising:
And calling a software tool installation script, and installing a software tool in the virtual machine image, wherein a software tool installation program is packaged in the software tool installation script.
7. A virtual machine migration system, applied to an HCI platform, comprising:
the first response module is used for responding to the virtual machine migration instruction;
The first copying module is used for copying the data of the virtual machine to be migrated to obtain a virtual machine image;
The first setting module is used for mounting the software tool installation package and copying and storing the software tool installation package to the virtual machine image;
The first calling module is used for calling a software tool installation program and installing a software tool in the virtual machine image;
The first sending module is used for sending information representing successful migration of the virtual machine to be migrated;
Wherein, the first setting module includes:
The first creation sub-module is used for creating a transfer virtual machine and taking the virtual machine image as an auxiliary disk of the transfer virtual machine;
The first command submodule is used for commanding the transit virtual machine to mount the software tool installation package and copy and store the software tool installation package to the virtual machine image;
the first calling module comprises:
and the second command submodule is used for commanding the transit virtual machine to run the software tool installation program and installing the software tool in the virtual machine image.
8. A virtual machine migration apparatus, applied to an HCI platform, comprising:
A memory for storing a computer program;
A processor for implementing the steps of the virtual machine migration method according to any one of claims 1 to 6 when executing the computer program.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the virtual machine migration method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911329596.9A CN111078366B (en) | 2019-12-20 | 2019-12-20 | Virtual machine migration method, system, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911329596.9A CN111078366B (en) | 2019-12-20 | 2019-12-20 | Virtual machine migration method, system, equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111078366A CN111078366A (en) | 2020-04-28 |
CN111078366B true CN111078366B (en) | 2024-05-24 |
Family
ID=70316470
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911329596.9A Active CN111078366B (en) | 2019-12-20 | 2019-12-20 | Virtual machine migration method, system, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111078366B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114884905B (en) * | 2022-04-18 | 2023-11-07 | 深信服科技股份有限公司 | Traffic mirroring method, traffic mirroring device, traffic mirroring equipment and computer storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015081766A1 (en) * | 2013-12-04 | 2015-06-11 | 蓝盾信息安全技术有限公司 | Sdn based virtual machine security policy migration system and method |
CN105260226A (en) * | 2015-09-23 | 2016-01-20 | 浙江网新恒天软件有限公司 | Method for automatically migrating virtual machine on the basis of cloud platform |
CN105843682A (en) * | 2016-03-29 | 2016-08-10 | 新浪网技术(中国)有限公司 | Method and apparatus for migrating virtual machine to IaaS cloud platform |
CN107959701A (en) * | 2016-10-17 | 2018-04-24 | 中兴通讯股份有限公司 | Data sharing method, cloud terminal, cloud desktop virtual machine and pass-through proxy server |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104298559B (en) * | 2014-09-30 | 2018-03-02 | 深信服科技股份有限公司 | The method and device of physical host system virtualization |
CN109168328B (en) * | 2017-05-05 | 2020-10-23 | 华为技术有限公司 | Virtual machine migration method and device and virtualization system |
-
2019
- 2019-12-20 CN CN201911329596.9A patent/CN111078366B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015081766A1 (en) * | 2013-12-04 | 2015-06-11 | 蓝盾信息安全技术有限公司 | Sdn based virtual machine security policy migration system and method |
CN105260226A (en) * | 2015-09-23 | 2016-01-20 | 浙江网新恒天软件有限公司 | Method for automatically migrating virtual machine on the basis of cloud platform |
CN105843682A (en) * | 2016-03-29 | 2016-08-10 | 新浪网技术(中国)有限公司 | Method and apparatus for migrating virtual machine to IaaS cloud platform |
CN107959701A (en) * | 2016-10-17 | 2018-04-24 | 中兴通讯股份有限公司 | Data sharing method, cloud terminal, cloud desktop virtual machine and pass-through proxy server |
Non-Patent Citations (2)
Title |
---|
KVM虚拟化动态迁移技术的安全防护模型;范伟 等;《软件学报》;20160122;第27卷(第6期);第1402-1415页 * |
郑楠等.基于CloudStack 和OpenStack 的KVM 虚拟机跨平台迁移方法.《通信学报》.2014,第35卷(第Z1期),第72-75页. * |
Also Published As
Publication number | Publication date |
---|---|
CN111078366A (en) | 2020-04-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102402446B (en) | Method and device for installing application software | |
US10466999B2 (en) | Software hot upgrading method and device | |
US20120144391A1 (en) | Provisioning a virtual machine | |
US11210132B2 (en) | Virtual machine migration in virtualization environment having different virtualization systems | |
WO2013006801A2 (en) | Combined live migration and storage migration using file shares and mirroring | |
JP2008293358A (en) | Distributed processing program, distributed processing method, distributed processing apparatus, and distributed processing system | |
KR101673299B1 (en) | Operating system recovery method and apparatus, and terminal device | |
CN102917055B (en) | The method that virtual machine moves online, device and terminal equipment | |
CN105487869A (en) | Vehicular double-system device and starting method thereof | |
WO2022041507A1 (en) | 3d rendering method and system | |
CN109002346B (en) | Conversion method of Windows virtual machine bootstrap program | |
US11875174B2 (en) | Method and apparatus for virtual machine emulator upgrading virtualization emulator | |
JP2008084029A (en) | Virtual machine management system | |
CN104182257A (en) | Application software installation method and device | |
CN112328365A (en) | Virtual machine migration method, device, equipment and storage medium | |
CN111984261A (en) | Compiling method and compiling system | |
CN114003334A (en) | Virtual machine live migration network interruption optimization method, device, equipment, storage medium and system | |
JP2016004432A (en) | Virtual machine migration program, virtual machine migration system and virtual machine migration method | |
CN111078366B (en) | Virtual machine migration method, system, equipment and computer readable storage medium | |
CN113242175B (en) | Storage gateway based on SPDK and implementation method thereof | |
US20190354392A1 (en) | Preventing interruption during virtual machine reboot | |
CN108108229B (en) | Virtual host migration system, method, computer device and readable storage medium | |
CN109308232B (en) | Method, device and system for rollback after virtual machine live migration fault | |
CN116302337A (en) | Virtual machine migration method, device and storage medium | |
CN107968794B (en) | Virtual CD-ROM mounting method and system, server and terminal |
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 |