CN106339254B - Method and device for quickly starting virtual machine and management node - Google Patents

Method and device for quickly starting virtual machine and management node Download PDF

Info

Publication number
CN106339254B
CN106339254B CN201510415019.7A CN201510415019A CN106339254B CN 106339254 B CN106339254 B CN 106339254B CN 201510415019 A CN201510415019 A CN 201510415019A CN 106339254 B CN106339254 B CN 106339254B
Authority
CN
China
Prior art keywords
virtual machine
mirror image
affinity
image
machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510415019.7A
Other languages
Chinese (zh)
Other versions
CN106339254A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510415019.7A priority Critical patent/CN106339254B/en
Priority to PCT/CN2016/083688 priority patent/WO2017008584A1/en
Publication of CN106339254A publication Critical patent/CN106339254A/en
Application granted granted Critical
Publication of CN106339254B publication Critical patent/CN106339254B/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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method, a device and a management node for quickly starting a virtual machine, wherein the method comprises the following steps: the management node sends a mirror image analysis request to the mirror image server so that the mirror image server analyzes the affinity characteristic value of the mirror image of the virtual machine to be created; the management node determines a host machine where the mirror image affinity virtual machine of the source virtual machine is located according to the resource requirement of the virtual machine and the mirror image affinity characteristic value of the virtual machine, and the host machine where the mirror image affinity virtual machine is located is used as a target host machine; and the management node copies the mirror image data part of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to restore the complete mirror image data of the source virtual machine and realize the quick start of the virtual machine. According to the method provided by the invention, the mirror image data of the source virtual machine is partially copied to the target host machine according to the existing data on the target host machine, so that the remote data copy quantity is reduced, the virtual machine is rapidly deployed and started, the deployment efficiency is improved, and the problems in the prior art are solved.

Description

Method and device for quickly starting virtual machine and management node
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for quickly starting a virtual machine, and a management node.
Background
Cloud computing is a computing mode for conveniently accessing a shared resource pool anytime and anywhere as required by utilizing the internet. Key features of cloud computing include multi-tenancy, resource pooling, on-demand self-service, fast resiliency and scalability, measurable services, wide network access.
Virtualization and its related technologies are one of the major technologies currently implementing these features. The cloud computing platform needs to meet different user requirements by flexibly deploying and building virtualization clusters of different scales and types, so that elastic service of the cloud computing platform is achieved.
The typical virtual machine deployment method is that a management node selects a host machine meeting requirements from a cluster as a target host machine according to a deployment request and constraint conditions, the target host machine copies virtual machine image files from a virtual machine image template library to the local in a full amount, and the virtual machine is started after the copying is finished.
The virtual machine deployment method has the following three limitations:
a) generally, the capacity of a virtual machine template image provided with an operating system and various application service software is more than several or even dozens of GB, and it usually takes a long time to transmit such a large-size image file, which reduces the overall deployment efficiency;
b) transmission of large size images results in higher network transmission overhead;
c) most virtual machine template libraries rely on centralized storage, which often becomes the bottleneck of data throughput, and single point of failure also has a key impact on the overall operation of the platform.
Particularly, in a hybrid cloud mode, the application is deployed in a local private cloud in a conventional state, and when a periodic load or a burst load comes, the application is expanded to a public cloud, so that the resource is greatly expanded. However, a large amount of virtual machine data needs to be transmitted through a network between relatively low-speed public and private clouds, which often needs several hours or even several days, and elasticity and agility of cloud computing are seriously affected.
In summary, with the rapid increase of the number of users and the increase of services, cloud computing puts higher requirements on the rapid deployment of large-scale and large-capacity virtual machines, and the existing virtual machine deployment mode cannot meet the requirements.
Disclosure of Invention
The invention provides a method and a device for quickly starting a virtual machine and a management node, which are used for solving the problems that in the prior art, cloud computing puts higher requirements on quick deployment of large-scale and large-capacity virtual machines and the existing virtual machine deployment mode cannot meet the requirements.
In order to solve the above technical problem, in one aspect, the present invention provides a method for quickly starting a virtual machine, including: the method comprises the steps that a management node sends a mirror image analysis request to a mirror image server, so that the mirror image server analyzes an affinity characteristic value of a virtual machine mirror image to be created; the management node determines a host machine where a mirror image affinity virtual machine of a source virtual machine is located according to the resource requirement of the virtual machine and the mirror image affinity characteristic value of the virtual machine, so that the host machine where the mirror image affinity virtual machine is located is used as a target host machine; and the management node partially copies the mirror image data of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to restore the complete mirror image data of the source virtual machine and realize the quick start of the virtual machine.
Further, the management node sends an image analysis request to the image server, so that the analysis of the affinity characteristic value of the image of the virtual machine to be created by the image server includes: the management node receives a virtual machine creating request from a client and registers a mirror image to the mirror image server; the management node sends a mirror image analysis request to a mirror image server so that the mirror image server performs mirror image affinity characteristic value analysis on the virtual machine mirror image and stores an analysis result in a mirror image characteristic value database.
Further, the method for determining, by the management node, a host where the mirror image affinity virtual machine of the source virtual machine is located according to the resource demand of the virtual machine and the mirror image affinity eigenvalue of the virtual machine, and taking the host where the mirror image affinity virtual machine is located as a target host includes: the management node acquires real-time resource use information of each computing node, and filters out nodes with sufficient resources according to the resource demand information of the virtual machine; the management node sends a mirror image affinity analysis instruction of the virtual machine to be deployed and the virtual machine on the alternative node to the mirror image server, so that the mirror image server analyzes and determines the mirror image similarity according to the mirror image affinity characteristic value; and the management node determines the node to be deployed and the affinity virtual machine on the node to be deployed according to the node resource abundance and the mirror image similarity.
Further, the management node, in combination with existing data on the target host, copies a part of the mirror image data of the source virtual machine to the target host to restore the mirror image data of the complete source virtual machine, and implementing quick start of the virtual machine includes: the management node sends a virtual machine mirror image preparation request to a target host machine; and the management node copies part of the mirror image data of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to ensure that the target host machine realizes the local reconstruction of the mirror image of the virtual machine in combination with the incremental data of the mirror image of the virtual machine to be deployed.
Further, the mirror image server performs mirror image affinity characteristic value analysis on the virtual machine mirror image, and stores the analysis result in a mirror image characteristic value database, including: constructing a mirror image affinity characteristic value digit array with m bits, and setting all the positions as 0; defining a group of hash functions from 1 to n; decomposing mirror image data of the virtual machine into a plurality of fixed-length data blocks with the length of L; sequentially passing the ith data block through n hash functions to map the ith data block into a mirror image affinity characteristic value bit array; setting i as i +1, repeatedly passing through n hash functions until all data blocks are mapped, so as to generate a mirror image affinity characteristic value digit array of the current virtual machine, realize the analysis process of the mirror image affinity characteristic value, and store the analysis result in a mirror image characteristic value database; wherein i is initially 1, and m and n are both positive integers greater than or equal to 1.
Further, the step of sending, by the management node, an image affinity analysis instruction of the virtual machine to be deployed and the virtual machine on the alternative node to the image server, so that the image server determines the image similarity according to the image affinity characteristic value analysis includes: setting a maximum mirror image affinity value as a first preset value, wherein the first preset value is an unlikely affinity value; sequentially selecting nodes v from alternative nodes with sufficient resources; sequentially selecting virtual machines on the node v according to a pre-stored virtualized cluster node information table, and acquiring a virtual machine image uuid corresponding to the virtual machine v from the pre-stored virtual machine information table; the management node searches a source virtual machine mirror image uuid from the virtual machine information table according to the uuid of the source virtual machine; the management node sends a source virtual machine and virtual machine v image affinity analysis request to the image server to determine affinity of the source virtual machine and the virtual machine v image affinity in a preset mode, wherein request parameters are a source virtual machine image uuid and a virtual machine v image uuid.
Further, determining the affinity of the affinity source virtual machine and the affinity of the virtual machine v mirror image in a preset mode comprises the following steps: the mirror image server extracts mirror image OS attributes according to the stored virtual machine mirror image description information so as to determine affinity through the mirror image OS attributes; under the condition that the source virtual machine and the v mirror image OS are in inverse affinity, directly returning to the first preset value; under the condition that a source virtual machine and a v mirror image OS are not in inverse affinity, searching a source virtual machine mirror image and v mirror image affinity relation numerical value from the mirror image characteristic value database, directly reading the numerical value under the condition of query, and under the condition that the numerical value is not queried, respectively reading mirror image affinity bit arrays of the source virtual machine and the virtual machine v from the mirror image characteristic value database according to a mirror image uuid so as to calculate the mirror image affinity of the source virtual machine and the virtual machine v; judging whether the image affinity relationship value is larger than the current maximum value or not; and under the condition that the current maximum value is larger than the maximum value, updating the maximum mirror image affinity value, and recording the uuid of the virtual machine v corresponding to the maximum mirror image affinity value and the host machine address of the node where the uuid is located.
Further, the process that the management node copies the mirror image data part of the source virtual machine to the target host machine and then copies the mirror image data part of the source virtual machine to the target host machine in combination with the existing data on the target host machine includes: successively decomposing the mirror image data of the affinity virtual machine into a plurality of fixed-length data blocks with the length of L, and respectively generating two check codes for each data block by using two check code algorithms; transmitting the check code information array of the affinity virtual machine mirror image to a mirror image server so as to compare the source virtual machine mirror image with the affinity virtual machine mirror image one by one according to the granularity of the data blocks; and constructing a meta-information array for the mirror image of the source virtual machine so as to transmit the data block number of the affinity virtual machine and the difference data set of the mirror image of the source virtual machine to the target host machine.
In another aspect, the present invention provides a fast virtual machine starting apparatus, including: the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a mirror image analysis request to a mirror image server so that the mirror image server analyzes the affinity characteristic value of a virtual machine mirror image to be created; the determining module is used for determining a host machine where a mirror image affinity virtual machine of a source virtual machine is located according to the resource requirement of the virtual machine and the mirror image affinity characteristic value of the virtual machine, so that the host machine where the mirror image affinity virtual machine is located is used as a target host machine; and the backup module is used for copying the mirror image data of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to restore the mirror image data of the complete source virtual machine and realize the quick start of the virtual machine.
Further, the sending module includes: the receiving unit is used for receiving a request for creating a virtual machine from a client and registering a mirror image to the mirror image server; the first sending unit is used for sending a mirror image analysis request to the mirror image server so that the mirror image server performs mirror image affinity characteristic value analysis on the virtual machine mirror image and stores an analysis result in the mirror image characteristic value database.
Further, the determining module includes: the acquisition unit is used for acquiring real-time resource use information of each computing node and filtering out nodes with sufficient resources according to the resource demand information of the virtual machine; the second sending unit is used for sending an image affinity analysis instruction of the virtual machine to be deployed and the virtual machine on the alternative node to the image server so that the image server analyzes and determines the image similarity according to the image affinity characteristic value; and the determining unit is used for determining the node to be deployed and the affinity virtual machine on the node to be deployed according to the node resource abundance and the mirror image similarity.
Further, the backup module includes: a third sending unit, configured to send a request for preparing a virtual machine image to a target host; and the backup unit is used for copying the mirror image data part of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to ensure that the target host machine realizes the local reconstruction of the mirror image of the virtual machine in combination with the incremental data of the mirror image of the virtual machine to be deployed.
Further, the first sending unit is further configured to construct an m-bit image affinity feature value bit array, and set all the bits to 0; defining a group of hash functions from 1 to n; decomposing mirror image data of the virtual machine into a plurality of fixed-length data blocks with the length of L; sequentially passing the ith data block through n hash functions to map the ith data block into a mirror image affinity characteristic value bit array; setting i as i +1, repeatedly passing through n hash functions until all data blocks are mapped, so as to generate a mirror image affinity characteristic value digit array of the current virtual machine, realize the analysis process of the mirror image affinity characteristic value, and store the analysis result in a mirror image characteristic value database; wherein i is initially 1, and m and n are both positive integers greater than or equal to 1.
Further, the second sending unit is further configured to set a maximum mirror affinity value to a first preset value, where the first preset value is an affinity value that is not possible to exist; sequentially selecting nodes v from alternative nodes with sufficient resources; sequentially selecting virtual machines on the node v according to a pre-stored virtualized cluster node information table, and acquiring a virtual machine image uuid corresponding to the virtual machine v from the pre-stored virtual machine information table; according to the uuid of the source virtual machine, searching a source virtual machine mirror image uuid from the virtual machine information table; sending a source virtual machine and virtual machine v image affinity analysis request to an image server to determine the affinity of the source virtual machine and the virtual machine v image affinity in a preset mode, wherein the request parameters are the source virtual machine image uuid and the virtual machine v image uuid.
Further, the preset mode that the second sending unit determines the affinity of the affinity source virtual machine and the virtual machine v mirror image includes: extracting, by the mirror server, a mirror image OS attribute according to the stored virtual machine mirror image description information to determine affinity by the mirror image OS attribute; under the condition that the source virtual machine and the v mirror image OS are in inverse affinity, directly returning to the first preset value; under the condition that a source virtual machine and a v mirror image OS are not in inverse affinity, searching a source virtual machine mirror image and v mirror image affinity relation numerical value from the mirror image characteristic value database, directly reading the numerical value under the condition of query, and under the condition that the numerical value is not queried, respectively reading mirror image affinity bit arrays of the source virtual machine and the virtual machine v from the mirror image characteristic value database according to a mirror image uuid so as to calculate the mirror image affinity of the source virtual machine and the virtual machine v; judging whether the image affinity relationship value is larger than the current maximum value or not; and under the condition that the current maximum value is larger than the maximum value, updating the maximum mirror image affinity value, and recording the uuid of the virtual machine v corresponding to the maximum mirror image affinity value and the host machine address of the node where the uuid is located.
Furthermore, the backup module is further configured to successively decompose the image data of the affinity virtual machine into a plurality of fixed-length data blocks with a length of L, and generate two check codes for each data block by using two check code algorithms; transmitting the check code information array of the affinity virtual machine mirror image to a mirror image server so as to compare the source virtual machine mirror image with the affinity virtual machine mirror image one by one according to the granularity of the data blocks; and constructing a meta-information array for the mirror image of the source virtual machine so as to transmit the data block number of the affinity virtual machine and the difference data set of the mirror image of the source virtual machine to the target host machine.
In yet another aspect, the present invention provides a management node, comprising: the virtual machine quick starting device of any one of the above.
According to the method provided by the invention, the image affinity analysis is carried out on the virtual machine to be created, so that the target host machine of the image affinity virtual machine of the source virtual machine is obtained, and then the image data of the source virtual machine is partially copied to the target host machine according to the existing data on the target host machine, so that the remote data copy quantity is reduced, the virtual machine is rapidly deployed and started, the deployment efficiency is improved, the problems that in the prior art, the cloud computing puts higher requirements on the rapid deployment of large-scale and large-capacity virtual machines and the existing virtual machine deployment mode cannot meet the requirements are solved.
Drawings
FIG. 1 is a flowchart of a method for quickly starting a virtual machine according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a fast boot apparatus for a virtual machine according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a sending module of the virtual machine quick start apparatus in the embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a determination module of a virtual machine quick start device in an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a backup module of a fast boot apparatus of a virtual machine according to an embodiment of the present invention;
FIG. 6 is a diagram of a virtualized cluster topology in a preferred embodiment of the invention;
fig. 7 is a schematic diagram of an architecture implemented by a method for quickly starting a virtual machine in a preferred embodiment of the present invention.
Detailed Description
In order to solve the problem that cloud computing puts higher requirements on the rapid deployment of large-scale and large-capacity virtual machines in the prior art and the existing virtual machine deployment mode cannot meet the requirements, the invention provides a method, a device and a management node for rapidly starting the virtual machines, and the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
The embodiment of the invention provides a method for quickly starting a virtual machine, the flow of the method is shown in fig. 1, and the method comprises steps S102 to S106:
s102, the management node sends a mirror image analysis request to a mirror image server so that the mirror image server analyzes the affinity characteristic value of the mirror image of the virtual machine to be created;
s104, the management node determines a host machine where the mirror image affinity virtual machine of the source virtual machine is located according to the resource requirement of the virtual machine and the mirror image affinity characteristic value of the virtual machine, and the host machine where the mirror image affinity virtual machine is located is used as a target host machine;
and S106, combining the existing data on the target host machine by the management node, and partially copying the mirror image data of the source virtual machine to the target host machine so as to restore the complete mirror image data of the source virtual machine and realize the quick start of the virtual machine.
According to the method provided by the embodiment of the invention, the image affinity analysis is carried out on the virtual machine to be created, so that the target host machine of the image affinity virtual machine of the source virtual machine is obtained, and then the image data of the source virtual machine is partially copied to the target host machine according to the existing data on the target host machine, so that the remote data copy quantity is reduced, the virtual machine is rapidly deployed and started, the deployment efficiency is improved, the problems that in the prior art, the cloud computing puts higher requirements on the rapid deployment of large-scale and large-capacity virtual machines and the existing virtual machine deployment mode cannot meet the requirements are solved.
When the management node sends an image analysis request to the image server so that the image server analyzes the affinity characteristic value of the image of the virtual machine to be created, the method may include the following steps: the management node receives a virtual machine creating request from a client and registers a mirror image to a mirror image server; and the management node sends a mirror image analysis request to the mirror image server so that the mirror image server performs mirror image affinity characteristic value analysis on the virtual machine mirror image and stores the analysis result in a mirror image characteristic value database.
Specifically, the process of the mirror image server performing mirror image affinity characteristic value analysis on the virtual machine mirror image and storing the analysis result in the mirror image characteristic value database is as follows: constructing a mirror image affinity characteristic value digit array with m bits, and setting all the positions as 0; defining a group of hash functions from 1 to n; decomposing mirror image data of the virtual machine into a plurality of fixed-length data blocks with the length of L; sequentially passing the ith data block through n hash functions to map the ith data block into a mirror image affinity characteristic value bit array; setting i as i +1, repeatedly passing through n hash functions until all data blocks are mapped, so as to generate a mirror image affinity characteristic value digit array of the current virtual machine, realize the analysis process of the mirror image affinity characteristic value, and store the analysis result in a mirror image characteristic value database; wherein i is initially 1, and m and n are both positive integers greater than or equal to 1.
After step S102 is completed, the management node determines, according to the resource requirement of the virtual machine and the image affinity eigenvalue of the virtual machine, a host where the image affinity virtual machine of the source virtual machine is located, and taking the host where the image affinity virtual machine is located as a target host includes: the management node acquires real-time resource use information of each computing node, and filters out nodes with sufficient resources according to the resource demand information of the virtual machine; the management node sends a mirror image affinity analysis instruction of the virtual machine to be deployed and the virtual machine on the alternative node to the mirror image server, so that the mirror image server analyzes and determines the mirror image similarity according to the mirror image affinity characteristic value; and the management node determines the node to be deployed and the affinity virtual machine on the node to be deployed according to the node resource abundance and the mirror image similarity.
When the process is specifically implemented, setting the maximum mirror image affinity value as a first preset value, wherein the first preset value is an affinity value which cannot exist; sequentially selecting nodes v from alternative nodes with sufficient resources; sequentially selecting virtual machines on the node v according to a pre-stored virtualized cluster node information table, and acquiring a virtual machine image uuid corresponding to the virtual machine v from the pre-stored virtual machine information table; the management node searches a source virtual machine mirror image uuid from the virtual machine information table according to the uuid of the source virtual machine; the management node sends a source virtual machine and virtual machine v image affinity analysis request to the image server to determine affinity of the source virtual machine and the virtual machine v image affinity in a preset mode, wherein request parameters are a source virtual machine image uuid and a virtual machine v image uuid.
The affinity of the affinity source virtual machine and the affinity of the virtual machine v mirror image are determined in the following preset mode: the mirror image server extracts mirror image OS attributes according to the stored virtual machine mirror image description information so as to determine affinity through the mirror image OS attributes; under the condition that the source virtual machine and the v mirror image OS are in inverse affinity, directly returning to a first preset value; under the condition that a source virtual machine and a virtual machine v mirror image OS are not in inverse affinity, searching a source virtual machine mirror image and virtual machine v mirror image affinity relation numerical value from a mirror image characteristic value database, directly reading the numerical value under the condition of query, and under the condition that the numerical value is not queried, respectively reading mirror image affinity bit arrays of the source virtual machine and the virtual machine v from the mirror image characteristic value database according to a mirror image uuid so as to calculate the mirror image affinity of the source virtual machine and the virtual machine v; judging whether the image affinity relationship value is larger than the current maximum value or not; and under the condition that the current maximum value is larger than the maximum value, updating the maximum mirror image affinity value, and recording the uuid of the virtual machine v corresponding to the maximum mirror image affinity value and the host machine address of the node where the uuid is located.
Further, the management node, in combination with existing data on the target host, copies the mirror image data of the source virtual machine partially to the target host to restore the complete mirror image data of the source virtual machine, and implementing quick start of the virtual machine includes: the management node sends a virtual machine mirror image preparation request to a target host machine; and the management node copies part of the mirror image data of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to ensure that the target host machine realizes the local reconstruction of the mirror image of the virtual machine in combination with the mirror image incremental data of the virtual machine to be deployed. When the process is implemented, the image data of the affinity virtual machine can be successively decomposed into a plurality of fixed-length data blocks with the length of L, and two check codes are respectively generated for each data block by using two check code algorithms; transmitting the check code information array of the affinity virtual machine mirror image to a mirror image server so as to compare the source virtual machine mirror image with the affinity virtual machine mirror image one by one according to the granularity of the data blocks; and constructing a meta-information array for the mirror image of the source virtual machine so as to transmit the data block number of the affinity virtual machine and the difference data set of the mirror image of the source virtual machine to the target host machine.
An embodiment of the present invention further provides a device for quickly starting a virtual machine, where a structural schematic of the device is shown in fig. 2, and the device includes: a sending module 10, configured to send a mirror image analysis request to a mirror image server, so that the mirror image server analyzes an affinity characteristic value of a mirror image of a virtual machine to be created; the determining module 20 is coupled to the sending module 10, and configured to determine, according to the resource requirement of the virtual machine and the image affinity eigenvalue of the virtual machine, a host where the image affinity virtual machine of the source virtual machine is located, so as to use the host where the image affinity virtual machine is located as a target host; and the backup module 30 is coupled with the determining module 20 and is used for copying the mirror image data of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to restore the mirror image data of the complete source virtual machine and realize the quick start of the virtual machine.
The structure of the sending module 10 is shown in fig. 3, and it may include: a receiving unit 101, configured to receive a request for creating a virtual machine from a client, and register a mirror image with a mirror image server; and a first sending unit 102, coupled to the receiving unit 101, configured to send an image analysis request to the image server, so that the image server performs image affinity characteristic value analysis on the virtual machine image, and stores an analysis result in the image characteristic value database.
Specifically, the first sending unit 102 is further configured to construct an m-bit image affinity feature value bit array, and set all the bits to 0; defining a group of hash functions from 1 to n; decomposing mirror image data of the virtual machine into a plurality of fixed-length data blocks with the length of L; sequentially passing the ith data block through n hash functions to map the ith data block into a mirror image affinity characteristic value bit array; setting i as i +1, repeatedly passing through n hash functions until all data blocks are mapped, so as to generate a mirror image affinity characteristic value digit array of the current virtual machine, realize the analysis process of the mirror image affinity characteristic value, and store the analysis result in a mirror image characteristic value database; wherein i is initially 1, and m and n are both positive integers greater than or equal to 1.
Fig. 4 shows a schematic structural diagram of the determination module 20, which includes: an obtaining unit 201, configured to obtain real-time resource usage information of each computing node, and filter out nodes with sufficient resources according to resource demand information of the virtual machine; a second sending unit 202, coupled to the obtaining unit 201, configured to send an image affinity analysis instruction of the virtual machine to be deployed and the virtual machine on the candidate node to the image server, so that the image server analyzes and determines image similarity according to the image affinity feature value; the determining unit 203 is coupled to the second sending unit 202, and configured to determine the node to be deployed and the affinity virtual machine on the node to be deployed according to the node resource abundance and the mirror image similarity.
The second sending unit 202 is further configured to set the maximum mirror affinity value as a first preset value, where the first preset value is an affinity value that is not possible to exist; sequentially selecting nodes v from alternative nodes with sufficient resources; sequentially selecting virtual machines on the node v according to a pre-stored virtualized cluster node information table, and acquiring a virtual machine image uuid corresponding to the virtual machine v from the pre-stored virtual machine information table; according to the uuid of the source virtual machine, searching a source virtual machine mirror image uuid from the virtual machine information table; sending a source virtual machine and virtual machine v image affinity analysis request to an image server to determine the affinity of the source virtual machine and the virtual machine v image affinity in a preset mode, wherein the request parameters are the source virtual machine image uuid and the virtual machine v image uuid. The preset mode that the second sending unit determines the affinity of the affinity source virtual machine and the affinity of the virtual machine v mirror image comprises the following steps: extracting the attribute of a mirror image OS (operating system) through a mirror image server according to the stored virtual machine mirror image description information so as to determine the affinity through the attribute of the mirror image OS; under the condition that the source virtual machine and the v mirror image OS are in inverse affinity, directly returning to a first preset value; under the condition that a source virtual machine and a virtual machine v mirror image OS are not in inverse affinity, searching a source virtual machine mirror image and virtual machine v mirror image affinity relation numerical value from a mirror image characteristic value database, directly reading the numerical value under the condition of query, and under the condition that the numerical value is not queried, respectively reading mirror image affinity bit arrays of the source virtual machine and the virtual machine v from the mirror image characteristic value database according to a mirror image uuid so as to calculate the mirror image affinity of the source virtual machine and the virtual machine v; judging whether the image affinity relationship value is larger than the current maximum value or not; and under the condition that the current maximum value is larger than the maximum value, updating the maximum mirror image affinity value, and recording the uuid of the virtual machine v corresponding to the maximum mirror image affinity value and the host machine address of the node where the uuid is located.
Fig. 5 shows a schematic structural diagram of the backup module 30, which includes: a third sending unit 301, configured to send a request for preparing a virtual machine image to a target host; and the backup unit 302 is coupled to the third sending unit 301, and is configured to copy, in combination with existing data on the target host, a part of the image data of the source virtual machine to the target host, so that the target host realizes local reconstruction of the image of the virtual machine in combination with the incremental image data of the virtual machine to be deployed.
Further, the backup module 30 is further configured to successively decompose the image data of the affinity virtual machine into a plurality of fixed-length data blocks with a length of L, and generate two check codes for each data block by using two check code algorithms; transmitting the check code information array of the affinity virtual machine mirror image to a mirror image server so as to compare the source virtual machine mirror image with the affinity virtual machine mirror image one by one according to the granularity of the data blocks; and constructing a meta-information array for the mirror image of the source virtual machine so as to transmit the data block number of the affinity virtual machine and the difference data set of the mirror image of the source virtual machine to the target host machine.
The embodiment of the invention also provides a management node which comprises the virtual machine quick starting device. According to the above description, a person skilled in the art knows how to integrate the above described virtual machine fast boot apparatus in the management node, and details thereof are not described here.
PREFERRED EMBODIMENTS
The embodiment of the invention provides a method for quickly starting a virtual machine, which comprises the steps of determining a host machine where a mirror image affinity virtual machine of a source virtual machine is located as a target host machine by analyzing a mirror image affinity characteristic value of the virtual machine and integrating resource requirements and constraint conditions of the virtual machine, then partially copying mirror image data of the source virtual machine to the target host machine, and locally restoring complete mirror image data of the virtual machine in combination with existing data on the target host machine. The invention accelerates the deployment and starting time of the virtual machine, reduces the bandwidth consumption of the deployment of the virtual machine and enhances the elastic expansion capability of the virtualization cluster.
FIG. 6 is a schematic diagram of a virtualization cluster topology, from which the architecture of a virtualization cluster can be seen; fig. 7 is a schematic architecture diagram of an implementation of a method for quickly starting a virtual machine, as shown in fig. 7, the virtualized cluster according to an embodiment of the present invention includes a management server (management node), a mirror server, and at least one computing node (physical host), where the computing node includes a hardware layer, a VMM (virtual machine monitor system) running on the hardware layer, and at least one Virtual Machine (VM) running on the host, and the method includes the following steps:
(1) the user initiates a create virtual machine request from a management node client.
(2) And the management node receives the instruction and sets the state of the virtual machine to pending.
(3) The management node registers the mirror image to a mirror image server, the mirror image server carries out mirror image affinity characteristic value analysis on the virtual machine mirror image, and an analysis result is recorded in a mirror image characteristic value database.
(4) The management node acquires real-time resource use information through each computing node, and filters out nodes with sufficient resources according to resource demand information of CPU, MEM, disk space and the like of the virtual machine.
(5) The management node sends out mirror image affinity analysis instructions of the virtual machines to be deployed and the virtual machines on the alternative nodes one by one to the mirror image server, and the mirror image server analyzes and calculates the mirror image similarity according to the mirror image affinity characteristic value.
(6) And the management node integrates the node resource sufficiency and the mirror image similarity and determines the node to be deployed and the affinity virtual machine on the node to be deployed.
(7) And the management node sends a virtual machine image preparation request to the target host machine and sets the state of the virtual machine as prolog.
(8) Combining the incremental data of the mirror image of the virtual machine to be deployed by the target host machine, and locally reconstructing the mirror image of the virtual machine so as to complete the deployment of the virtual machine; if the affinity virtual machine does not exist, the full amount of the virtual machine image is transmitted to the target node. And the target host machine returns the information of completion of the virtual machine mirror image preparation to the management node.
(9) The management node issues a virtual machine starting instruction to the target host machine, the target host machine locally starts the virtual machine, the virtual machine enters a booting state, and enters a running state when the virtual machine is started, so that the virtual machine finishes deployment and starts, and starts to execute service processing.
The above outlined process of the present invention will be described in further detail below with reference to the figures and examples.
When the virtual machine mirror image is registered, the mirror image server performs affinity characteristic value analysis based on the mirror image data characteristic dimension reduction, and the method comprises the following processes:
(1) constructing an m-bit image affinity characteristic value bit array;
(2) setting all positions to 0;
(3) a set of hash functions is defined: hash1, hash2, …, hashn;
(4) decomposing the virtual machine image data into a plurality of fixed-length data blocks with the length L (such as 4K);
(5) for the ith data block (i is initially 1), mapping the ith data block to a mirror image affinity characteristic value bit array by sequentially passing through n hash functions defined in the step (3);
(6) setting i as i +1, and repeating the step (5) until all the data blocks are mapped to the bit array, so as to generate a bit array of the image affinity characteristic value of the current virtual machine;
(7) this set of bits is recorded in the mirror affinity table of the database. The mirror affinity data structure is shown in table 1.
TABLE 1
Figure BDA0000760018450000141
The dimension reduction of the mirror image is completed through the processes, and the mirror image is characterized by m bits of affinity characteristic value bit array. The more similar images have more common 1's in their array of affinity feature value bits. Because the hash function is collided, the similarity judgment has a certain probability of error, and the larger the bit number m of the feature value digit group is, the higher the precision of the similarity judgment is, and certainly, the larger the storage space consumption is.
Before starting the virtual machine, the management node firstly acquires real-time resource use information from each computing node, and filters out preliminary feasible nodes according to resource demand information of the virtual machine, such as CPU, MEM, network bandwidth, disk space and the like. The management nodes sort the preliminary feasibility nodes in a descending order according to the resource sufficiency, and for a virtual machine j, the resource adequacy rate (resource availability ratio) of a node i is defined as:
Rari,j=Wcpu,j*CPUi+Wmem,j*MEMi+Wstorage,j*Storagei
wherein, Wcpu,jIs the CPU weight, W, of virtual machine jmem,jWeight of MEM for virtual machine j, Wstorage,jThe weight value is the storage weight of the virtual machine j, can be adjusted according to the service type and the resource demand condition of the virtual machine, and is defaulted to 1:1: 1. CPU (central processing unit)i,MEMi,StorageiThe CPU, MEM, and the memory capacity of the node i are the remaining resource ratios.
The management node finds out the affinity virtual machine of the source virtual machine from the preliminary feasibility queue, and the specific method comprises the following steps:
(1) setting the maximum mirror image affinity value as-1, and setting the target placement node as a primary feasibility queue first node;
(2) sequentially selecting nodes n from the resource-sufficient alternative node set;
(3) sequentially selecting virtual machines such as a virtual machine v on a node n according to the virtualized cluster node information table;
(4) acquiring a virtual machine image uuid corresponding to the virtual machine v from the virtual machine information table; the virtualized cluster node information data structure is shown in table 2, and the virtual machine information data structure is shown in table 3.
TABLE 2
Figure BDA0000760018450000142
Figure BDA0000760018450000151
TABLE 3
Figure BDA0000760018450000152
(5) The management node searches a source virtual machine mirror image uuid from the virtual machine information table according to the uuid of the source virtual machine;
(6) the management node sends a source virtual machine and virtual machine v image affinity analysis request to the image server, and the request parameters are source virtual machine image uuid and virtual machine v image uuid;
(7) the mirror image server extracts mirror image OS attributes according to the virtual machine mirror image description information;
(8) if the source virtual machine and the v image OS of the virtual machine are in inverse affinity (if the source virtual machine is to be deployed as a Ubuntu image and the virtual machine on the alternative node is a Redhat image), directly returning to-1 and jumping to the step (12); the mirror affinity relationship data structure is shown in table 4.
TABLE 4
Name (R) Data type Description of the invention
imageA_uuid String Virtual machine image identifier
imageB_uuid String Virtual machine image identifier
Affinity_value double Affinity number
(9) If the affinity is good, searching the affinity relation value between the mirror image of the source virtual machine and the v mirror image of the virtual machine from the mirror image affinity relation database, if the affinity relation value is found, directly reading the affinity relation value, and returning the request to the step (12);
(10) if the virtual machine v is not inquired, respectively reading mirror image affinity bit arrays of the source virtual machine and the virtual machine v from a mirror image affinity database according to the mirror image uuid;
(11) and calculating the mirror affinity of the source virtual machine and the virtual machine v.
Affinity can be defined in a number of ways, and is illustrated here by way of example only.
Affinity is defined as: cosine _ Sim (x, y) ═ dot (x, y)/(sqrt (| x |. y |)), dot (x, y) ═ Σ x [ i ]. y [ i ], where dot (x, y) corresponds to the number of bits in both affinity feature bit arrays that is 1 at the same time; | x | represents the number of digits of the affinity feature with an array of 1.
Recording the mirror image uuid of the source virtual machine, the mirror image uuid of the virtual machine and the mirror image affinity relationship numerical value into a mirror image affinity relationship database, and returning a request;
(12) if the mirror image affinity relation value is larger than the maximum value, the management node updates the maximum mirror image affinity value and records the uuid of the virtual machine v corresponding to the maximum mirror image affinity value and the hostid of the node n where the virtual machine v is located;
(13) turning to the step (3), repeating the steps (3) to (12) until all the virtual machines on the node n are compared;
(14) turning to the step (2) until all the nodes n with sufficient resources are traversed;
(15) the mirror image server returns the value of the maximum mirror image affinity, the corresponding virtual machine v and the node n where the virtual machine is located to the management node;
if the maximum mirror image affinity value obtained by the management node is not-1, namely, the mirror image affinity virtual machine is found through affinity relationship analysis, determining that the node in the request return value is a target placement node, and determining that the virtual machine in the request return value is a mirror image affinity virtual machine of the source virtual machine on the target node. Otherwise, the source virtual machine and the virtual machines on all the alternative nodes are in inverse affinity, and the node with the highest resource sufficiency is selected as the target placement node.
For the condition that the mirror image affinity virtual machine exists, before reconstructing the virtual machine mirror image on the target placement node, the source virtual machine mirror image construction meta-information needs to be generated, and the specific method comprises the following steps:
(1) and on the target placement node, successively decomposing the mirror image data of the affinity virtual machine into a plurality of fixed-length data blocks with the length of L. Respectively generating two check codes (weak check and strong check) for each block of data by using two check algorithms;
(2) transmitting the checksum information array of the affinity virtual machine mirror image to a mirror image server; the Checksum information data structure is shown in table 5.
TABLE 5
Name (R) Data type Description of the invention
Block_id long Data block numbering
Weak_checksum String Weak checksum
Strong_checksum String Strong checksum
(3) Comparing the mirror images of the source virtual machine and the affinity virtual machine one by one according to the granularity of the data blocks;
a) generating weak checksum and strong checksum from the ith-i + L-1 byte data (i is initially 1) of the mirror image of the source virtual machine, and comparing the weak checksum and the strong checksum of each data block of the mirror image of the affinity virtual machine one by one;
b) if the i-i + L-1 byte data block of the source virtual machine image and the data block b of the affinity virtual machine image have consistent weak checksum, indicating that the two data blocks are approximately same, entering c), and otherwise entering e);
c) further carrying out strong checksum comparison with the affinity virtual machine mirror image data block b; if the two data blocks are identical, the two data blocks are completely identical, and the number b of the data block of the affinity virtual machine is recorded; otherwise enter e);
d) moving L bytes (i is updated to i + L) by the mirror image of the source virtual machine, and repeating the step a) until all data blocks of the mirror image of the source virtual machine are compared;
e) if consistent weak checksum exists but the corresponding strong checksum is not consistent, or consistent weak checksum does not exist, recording difference data, namely the ith byte of the source virtual machine;
f) and (c) moving the mirror image of the source virtual machine by 1 byte (i is updated to i +1), and repeating the step (a) until all data blocks of the mirror image of the source virtual machine are compared.
(4) Constructing a meta-information array of the mirror image of the source virtual machine, namely transmitting the number of the data block of the affinity virtual machine and the difference data set of the mirror image of the source virtual machine to a target placement node; among them, the meta information data structure is shown in table 6.
TABLE 6
Figure BDA0000760018450000181
For the condition that the mirror image affinity virtual machine exists, after the mirror image construction meta-information is generated, constructing a source virtual machine at a target placement node, wherein the specific method comprises the following steps:
(1) creating a local directory for the source virtual machine at the target placement node;
(2) traversing a source virtual machine mirror image to construct a meta-information array;
a) if the meta information is long, finding a data block with the length of the corresponding L bytes of the mirror image affinity virtual machine according to the block id, and adding the data block to the mirror image in the local directory of the source virtual machine;
b) and if the meta information is byte, directly enabling the corresponding content to be applied to the mirror image in the local directory of the source virtual machine.
And when the traversal of the meta-information array is completed, generating the full-scale mirror image of the source virtual machine under the local directory of the source virtual machine. And for the condition that the mirror image affinity virtual machine does not exist, transmitting the virtual machine mirror image to the target placement node through the network in full quantity.
The embodiment of the invention has the following advantages: the applicability is strong, the bottom kernel does not need to be modified, and the method is suitable for virtualization technologies such as VMware ESX, KVM and XEN; platform independence is suitable for operating systems such as windows and Linux, and Guest OS is completely used as a black box without modifying Guest OS; through the dimension reduction analysis of the virtual machine mirror image, the mirror image affinity virtual machine is accurately judged, and the corresponding nodes are selected for deployment, so that redundant presetting on a plurality of nodes is avoided, and the utilization efficiency of the storage space is effectively improved.
The invention brings the following positive effects to the large-scale deployment of cloud computing: the method comprises the steps that nodes where virtual machines with highest mirror image affinity are located are selected for deployment, the number of remote data copies is reduced, and the virtual machines are rapidly deployed and started; the deployment efficiency is improved, and the elastic expansion capability of the cloud computing during the dynamic change of the load is enhanced; the bandwidth consumption caused by data copying is reduced, and the communication cost of the hybrid cloud network is effectively reduced.
Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above.

Claims (15)

1. A method for quickly starting a virtual machine is characterized by comprising the following steps:
the method comprises the steps that a management node sends a mirror image analysis request to a mirror image server, so that the mirror image server analyzes an affinity characteristic value of a virtual machine mirror image to be created;
the management node determines a host machine where a mirror image affinity virtual machine of a source virtual machine is located according to the resource requirement of the virtual machine and the mirror image affinity characteristic value of the virtual machine, so that the host machine where the mirror image affinity virtual machine is located is used as a target host machine;
the management node copies the mirror image data of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to restore the complete mirror image data of the source virtual machine and realize the quick start of the virtual machine;
the management node sends an image analysis request to an image server, so that the analysis of the affinity characteristic value of the image of the virtual machine to be created by the image server comprises the following steps:
the management node sends a mirror image analysis request to a mirror image server so that the mirror image server performs mirror image affinity characteristic value analysis on the virtual machine mirror image and stores an analysis result in a mirror image characteristic value database;
the mirror image server carries out mirror image affinity characteristic value analysis on the virtual machine mirror image and stores the analysis result in a mirror image characteristic value database, and the method comprises the following steps:
constructing a mirror image affinity characteristic value digit array with m bits, and setting all the positions as 0;
defining a group of hash functions from 1 to n;
decomposing mirror image data of the virtual machine into a plurality of fixed-length data blocks with the length of L;
sequentially passing the ith data block through n hash functions to map the ith data block into a mirror image affinity characteristic value bit array;
setting i as i +1, repeatedly passing through n hash functions until all data blocks are mapped, so as to generate a mirror image affinity characteristic value digit array of the current virtual machine, realize the analysis process of the mirror image affinity characteristic value, and store the analysis result in a mirror image characteristic value database;
wherein i is initially 1, and m and n are both positive integers greater than or equal to 1.
2. The virtual machine fast boot method according to claim 1, wherein the management node sends an image analysis request to the image server, so that the image server analyzes the affinity characteristic value of the virtual machine image to be created further comprises:
and the management node receives a request for creating the virtual machine from a client and registers the mirror image to the mirror image server.
3. The method for rapidly starting a virtual machine according to claim 2, wherein the determining, by the management node, the host where the mirror affinity virtual machine of the source virtual machine is located according to the virtual machine resource demand and the virtual machine mirror affinity eigenvalue, so as to use the host where the virtual machine is located as the target host comprises:
the management node acquires real-time resource use information of each computing node, and filters out nodes with sufficient resources according to the resource demand information of the virtual machine;
the management node sends a mirror image affinity analysis instruction of the virtual machine to be deployed and the virtual machine on the alternative node to the mirror image server, so that the mirror image server analyzes and determines the mirror image similarity according to the mirror image affinity characteristic value;
and the management node determines the node to be deployed and the affinity virtual machine on the node to be deployed according to the node resource abundance and the mirror image similarity.
4. The method for quickly starting a virtual machine according to claim 3, wherein the management node copies the mirror image data of the source virtual machine partially to the target host machine in combination with the existing data on the target host machine to restore the mirror image data of the complete source virtual machine, and the method for quickly starting a virtual machine includes:
the management node sends a virtual machine mirror image preparation request to a target host machine;
and the management node copies part of the mirror image data of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to ensure that the target host machine realizes the local reconstruction of the mirror image of the virtual machine in combination with the incremental data of the mirror image of the virtual machine to be deployed.
5. The method for quickly starting a virtual machine according to claim 4, wherein the step of sending, by the management node, an image affinity analysis instruction of the virtual machine to be deployed and the virtual machine on the alternative node to the image server, so that the image server determines the image similarity according to the image affinity characteristic value analysis comprises:
setting a maximum mirror image affinity value as a first preset value, wherein the first preset value is an unlikely affinity value;
sequentially selecting nodes v from alternative nodes with sufficient resources;
sequentially selecting virtual machines on the node v according to a pre-stored virtualized cluster node information table, and acquiring a virtual machine image uuid corresponding to the virtual machine v from the pre-stored virtual machine information table;
the management node searches a source virtual machine mirror image uuid from the virtual machine information table according to the uuid of the source virtual machine;
the management node sends a source virtual machine and virtual machine v image affinity analysis request to the image server to determine affinity of the source virtual machine and the virtual machine v image affinity in a preset mode, wherein request parameters are a source virtual machine image uuid and a virtual machine v image uuid.
6. The method for quickly starting the virtual machine according to claim 5, wherein the determining of the affinity source virtual machine and the affinity of the virtual machine v-mirror image by a preset mode comprises:
the mirror image server extracts mirror image OS attributes according to the stored virtual machine mirror image description information so as to determine affinity through the mirror image OS attributes;
under the condition that the source virtual machine and the v mirror image OS are in inverse affinity, directly returning to the first preset value;
under the condition that a source virtual machine and a v mirror image OS are not in inverse affinity, searching a source virtual machine mirror image and v mirror image affinity relation numerical value from the mirror image characteristic value database, directly reading the numerical value under the condition of query, and under the condition that the numerical value is not queried, respectively reading mirror image affinity bit arrays of the source virtual machine and the virtual machine v from the mirror image characteristic value database according to a mirror image uuid so as to calculate the mirror image affinity of the source virtual machine and the virtual machine v;
judging whether the image affinity relationship value is larger than the current maximum value or not;
and under the condition that the current maximum value is larger than the maximum value, updating the maximum mirror image affinity value, and recording the uuid of the virtual machine v corresponding to the maximum mirror image affinity value and the host machine address of the node where the uuid is located.
7. The method for quickly starting the virtual machine according to any one of claims 1 to 4, wherein the process of copying the mirror image data part of the source virtual machine to the target host computer and then copying the mirror image data part of the source virtual machine to the target host computer by the management node in combination with the existing data on the target host computer comprises:
successively decomposing the mirror image data of the affinity virtual machine into a plurality of fixed-length data blocks with the length of L, and respectively generating two check codes for each data block by using two check code algorithms;
transmitting the check code information array of the affinity virtual machine mirror image to a mirror image server so as to compare the source virtual machine mirror image with the affinity virtual machine mirror image one by one according to the granularity of the data blocks;
and constructing a meta-information array for the mirror image of the source virtual machine so as to transmit the data block number of the affinity virtual machine and the difference data set of the mirror image of the source virtual machine to the target host machine.
8. A quick starting device for a virtual machine is characterized by comprising:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a mirror image analysis request to a mirror image server so that the mirror image server analyzes the affinity characteristic value of a virtual machine mirror image to be created;
the determining module is used for determining a host machine where a mirror image affinity virtual machine of a source virtual machine is located according to the resource requirement of the virtual machine and the mirror image affinity characteristic value of the virtual machine, so that the host machine where the mirror image affinity virtual machine is located is used as a target host machine;
the backup module is used for copying the mirror image data part of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to restore the mirror image data of the complete source virtual machine and realize the quick start of the virtual machine;
the sending module comprises: the system comprises a first sending unit, a mirror image analysis unit and a mirror image database, wherein the first sending unit is used for sending a mirror image analysis request to a mirror image server so as to enable the mirror image server to carry out mirror image affinity characteristic value analysis on a virtual machine mirror image and store an analysis result in the mirror image characteristic value database;
the first sending unit is also used for constructing a m-bit mirror image affinity characteristic value bit array and setting all the positions to be 0; defining a group of hash functions from 1 to n; decomposing mirror image data of the virtual machine into a plurality of fixed-length data blocks with the length of L; sequentially passing the ith data block through n hash functions to map the ith data block into a mirror image affinity characteristic value bit array; setting i as i +1, repeatedly passing through n hash functions until all data blocks are mapped, so as to generate a mirror image affinity characteristic value digit array of the current virtual machine, realize the analysis process of the mirror image affinity characteristic value, and store the analysis result in a mirror image characteristic value database; wherein i is initially 1, and m and n are both positive integers greater than or equal to 1.
9. The virtual machine fast boot apparatus of claim 8, wherein the sending module further comprises:
and the receiving unit is used for receiving a request for creating the virtual machine from the client and registering the mirror image to the mirror image server.
10. The virtual machine fast boot apparatus of claim 9, wherein the determining module comprises:
the acquisition unit is used for acquiring real-time resource use information of each computing node and filtering out nodes with sufficient resources according to the resource demand information of the virtual machine;
the second sending unit is used for sending an image affinity analysis instruction of the virtual machine to be deployed and the virtual machine on the alternative node to the image server so that the image server analyzes and determines the image similarity according to the image affinity characteristic value;
and the determining unit is used for determining the node to be deployed and the affinity virtual machine on the node to be deployed according to the node resource abundance and the mirror image similarity.
11. The virtual machine fast boot apparatus of claim 10, wherein the backup module comprises:
a third sending unit, configured to send a request for preparing a virtual machine image to a target host;
and the backup unit is used for copying the mirror image data part of the source virtual machine to the target host machine in combination with the existing data on the target host machine so as to ensure that the target host machine realizes the local reconstruction of the mirror image of the virtual machine in combination with the incremental data of the mirror image of the virtual machine to be deployed.
12. The virtual machine fast boot apparatus of claim 11,
the second sending unit is further configured to set a maximum mirror affinity value to a first preset value, where the first preset value is an affinity value that is not possible to exist; sequentially selecting nodes v from alternative nodes with sufficient resources; sequentially selecting virtual machines on the node v according to a pre-stored virtualized cluster node information table, and acquiring a virtual machine image uuid corresponding to the virtual machine v from the pre-stored virtual machine information table; according to the uuid of the source virtual machine, searching a source virtual machine mirror image uuid from the virtual machine information table;
sending a source virtual machine and virtual machine v image affinity analysis request to an image server to determine the affinity of the source virtual machine and the virtual machine v image affinity in a preset mode, wherein the request parameters are the source virtual machine image uuid and the virtual machine v image uuid.
13. The apparatus for quickly starting a virtual machine according to claim 12, wherein the determining, by the second sending unit, the preset manner of the affinity between the affinity source virtual machine and:
extracting, by the mirror server, a mirror image OS attribute according to the stored virtual machine mirror image description information to determine affinity by the mirror image OS attribute;
under the condition that the source virtual machine and the v mirror image OS are in inverse affinity, directly returning to the first preset value;
under the condition that a source virtual machine and a v mirror image OS are not in inverse affinity, searching a source virtual machine mirror image and v mirror image affinity relation numerical value from the mirror image characteristic value database, directly reading the numerical value under the condition of query, and under the condition that the numerical value is not queried, respectively reading mirror image affinity bit arrays of the source virtual machine and the virtual machine v from the mirror image characteristic value database according to a mirror image uuid so as to calculate the mirror image affinity of the source virtual machine and the virtual machine v;
judging whether the image affinity relationship value is larger than the current maximum value or not;
and under the condition that the current maximum value is larger than the maximum value, updating the maximum mirror image affinity value, and recording the uuid of the virtual machine v corresponding to the maximum mirror image affinity value and the host machine address of the node where the uuid is located.
14. The virtual machine fast boot apparatus of any one of claims 8 to 11,
the backup module is also used for successively decomposing the mirror image data of the affinity virtual machine into a plurality of fixed-length data blocks with the length of L and respectively generating two check codes for each data block by using two check code algorithms; transmitting the check code information array of the affinity virtual machine mirror image to a mirror image server so as to compare the source virtual machine mirror image with the affinity virtual machine mirror image one by one according to the granularity of the data blocks; and constructing a meta-information array for the mirror image of the source virtual machine so as to transmit the data block number of the affinity virtual machine and the difference data set of the mirror image of the source virtual machine to the target host machine.
15. A management node, comprising: the virtual machine fast boot apparatus of any one of claims 8 to 14.
CN201510415019.7A 2015-07-15 2015-07-15 Method and device for quickly starting virtual machine and management node Active CN106339254B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510415019.7A CN106339254B (en) 2015-07-15 2015-07-15 Method and device for quickly starting virtual machine and management node
PCT/CN2016/083688 WO2017008584A1 (en) 2015-07-15 2016-05-27 Virtual machine starting method and device, and management node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510415019.7A CN106339254B (en) 2015-07-15 2015-07-15 Method and device for quickly starting virtual machine and management node

Publications (2)

Publication Number Publication Date
CN106339254A CN106339254A (en) 2017-01-18
CN106339254B true CN106339254B (en) 2020-06-12

Family

ID=57756809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510415019.7A Active CN106339254B (en) 2015-07-15 2015-07-15 Method and device for quickly starting virtual machine and management node

Country Status (2)

Country Link
CN (1) CN106339254B (en)
WO (1) WO2017008584A1 (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582433B (en) * 2017-09-29 2022-02-01 腾讯科技(深圳)有限公司 Resource scheduling method and device, cloud computing system and storage medium
CN110071880B (en) * 2018-01-24 2021-06-18 北京金山云网络技术有限公司 Message forwarding method, forwarding device, server and storage medium
CN109284169B (en) * 2018-09-10 2022-10-25 福建星瑞格软件有限公司 Big data platform process management method based on process virtualization and computer equipment
CN110147266B (en) * 2019-04-29 2024-03-15 腾讯科技(深圳)有限公司 Virtual machine starting method and device, storage medium and electronic device
CN111857944B (en) * 2019-04-30 2024-10-01 北京嘀嘀无限科技发展有限公司 Method, apparatus, system and computer readable storage medium for virtual machine hot migration
CN111090491B (en) * 2019-07-03 2023-10-10 杭州海康威视系统技术有限公司 Virtual machine task state recovery method and device and electronic equipment
CN110287004B (en) * 2019-07-05 2021-07-30 中国工商银行股份有限公司 Basic environment mirror image preheating method and device based on docker container technology
CN112398892B (en) * 2019-08-19 2023-06-20 浙江宇视科技有限公司 Service distribution method, device and equipment
CN111371841B (en) * 2020-02-17 2023-04-07 平安科技(深圳)有限公司 Data monitoring method and device
CN112000425A (en) * 2020-07-21 2020-11-27 北京北通云服科技有限公司 Image management system based on IDV mode
CN112527325B (en) * 2020-11-23 2024-07-09 山东乾云启创信息科技股份有限公司 Deployment method and system applied to super fusion architecture
CN113535670B (en) * 2021-07-13 2022-11-11 山东省计算中心(国家超级计算济南中心) Virtual resource mirror image storage system and implementation method thereof
CN114237830B (en) * 2022-02-24 2022-05-20 南京赛宁信息技术有限公司 Dispatching and physical machine capacity expansion method and system for quick start of virtual machine in target range
CN114567496B (en) * 2022-03-03 2024-02-20 浪潮云信息技术股份公司 Method and system for checking integrity of cloud server mirror image
CN114884905B (en) * 2022-04-18 2023-11-07 深信服科技股份有限公司 Traffic mirroring method, traffic mirroring device, traffic mirroring equipment and computer storage medium
CN116192870B (en) * 2023-04-21 2023-07-11 中国科学技术大学 P2P (peer-to-peer) download mirroring method based on mirror-level metadata management and load perception
CN117033084B (en) * 2023-10-09 2024-01-19 武汉吧哒科技股份有限公司 Virtual machine backup method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049334A (en) * 2012-12-14 2013-04-17 华为技术有限公司 Task processing method and virtual machine
CN103595780A (en) * 2013-11-08 2014-02-19 中国人民解放军理工大学 Cloud computing resource scheduling method based on repeat removing
CN104679527A (en) * 2013-11-26 2015-06-03 中国银联股份有限公司 Off-line upgrading method of virtual machine image

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761566B (en) * 2011-04-26 2015-09-23 国际商业机器公司 The method and apparatus of migration virtual machine
CN103067425B (en) * 2011-10-20 2016-04-27 中国移动通信集团公司 Virtual machine creation method, virtual machine management system and relevant device
US8983961B2 (en) * 2012-11-29 2015-03-17 International Business Machines Corporation High availability for cloud servers
CN103577271A (en) * 2013-11-14 2014-02-12 浪潮(北京)电子信息产业有限公司 Cloud management platform, host machines and virtual machine resource deploying method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049334A (en) * 2012-12-14 2013-04-17 华为技术有限公司 Task processing method and virtual machine
CN103595780A (en) * 2013-11-08 2014-02-19 中国人民解放军理工大学 Cloud computing resource scheduling method based on repeat removing
CN104679527A (en) * 2013-11-26 2015-06-03 中国银联股份有限公司 Off-line upgrading method of virtual machine image

Also Published As

Publication number Publication date
WO2017008584A1 (en) 2017-01-19
CN106339254A (en) 2017-01-18

Similar Documents

Publication Publication Date Title
CN106339254B (en) Method and device for quickly starting virtual machine and management node
CN107273455B (en) Block chain data access method and device
US8832130B2 (en) System and method for implementing on demand cloud database
US8751768B2 (en) Data storage reclamation systems and methods
CN107368260A (en) Memory space method for sorting, apparatus and system based on distributed system
US11226865B2 (en) Mostly unique file selection method for deduplication backup systems
CN103119551A (en) Optimized recovery
CN107070645B (en) Method and system for comparing data of data table
AU2019349429B2 (en) Translation of tenant identifiers
CN107391033B (en) Data migration method and device, computing equipment and computer storage medium
US20230367749A1 (en) Data migration method and apparatus, device, medium, and computer product
CN114936188A (en) Data processing method and device, electronic equipment and storage medium
CN108200211B (en) Method, node and query server for downloading mirror image files in cluster
CN107656796B (en) Virtual machine cold migration method, system and equipment
CN115918110A (en) Spatial search using key-value store
CN107276914B (en) Self-service resource allocation scheduling method based on CMDB
CN115712500A (en) Memory release method, memory recovery method, memory release device, memory recovery device, computer equipment and storage medium
CN106575296B (en) Dynamic N-dimensional cube for hosted analytics
US10031668B2 (en) Determining status of a host operation without accessing the host in a shared storage environment
JP7390356B2 (en) Identifying records for tenant identifier conversion after cloning
US10970285B2 (en) Grid topology change in a distributed data grid when iterating on the contents of the data grid
US10685046B2 (en) Data processing system and data processing method
US11233739B2 (en) Load balancing system and method
CN111382326A (en) Instance group creation method, instance group creation device, instance group creation server and storage medium
CN117075823B (en) Object searching method, system, electronic device and storage medium

Legal Events

Date Code Title Description
C06 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