CN106201648A - A kind of virtual machine creation method and device - Google Patents
A kind of virtual machine creation method and device Download PDFInfo
- Publication number
- CN106201648A CN106201648A CN201610480933.4A CN201610480933A CN106201648A CN 106201648 A CN106201648 A CN 106201648A CN 201610480933 A CN201610480933 A CN 201610480933A CN 106201648 A CN106201648 A CN 106201648A
- Authority
- CN
- China
- Prior art keywords
- mirror
- target
- service
- image
- virtual 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.)
- Pending
Links
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/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
-
- 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/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/45562—Creating, deleting, cloning virtual machine instances
Abstract
The invention provides a kind of virtual machine creation method and device, method includes: according to the environmental form corresponding to the virtual machine currently created and the image file of use, each image file that storage varying environment type is corresponding;Wherein, the different image files of corresponding same environmental form, it is respectively configured to provide different services;Receive the establishment for target virtual machine to instruct;Create instruction the required destination service provided of target virtual machine is provided and carries the target environment type residing for target virtual machine;According to destination service and target environment type, determine the target image file of required use;Obtain the target image file of storage, and according to target mirror as document creation target virtual machine.According to this programme, this target mirror of storage can be directly utilized as document creation target virtual machine, it is not necessary to manual creation, thus improve virtual machine creating efficiency.
Description
Technical field
The present invention relates to virtual machine technique field, particularly to a kind of virtual machine creation method and device.
Background technology
Along with the development of Intel Virtualization Technology, enterprise can dispose multiple virtualized environment according to demand.In prior art, at pin
When some virtualized environment is created virtual machine, need the virtual machine demand according to required establishment, under this virtualized environment
Manual creation image file.When the virtual machine number of required establishment is more, manual creation mode is inefficient.
Summary of the invention
Embodiments provide a kind of virtual machine creation method and device, to improve virtual machine creating efficiency.
First aspect, embodiments provides a kind of virtual machine creation method, including:
According to the environmental form corresponding to the virtual machine currently created and the image file of use, store varying environment
Each image file that type is corresponding;Wherein, the different image files of corresponding same environmental form, it is respectively configured to provide different
Service;
Receive the establishment for target virtual machine to instruct;The required offer of described target virtual machine is carried in described establishment instruction
Destination service and carry the target environment type residing for described target virtual machine;
According to described destination service and described target environment type, determine the target image file of required use;
Obtain the described target image file of storage, and according to described target mirror target virtual machine as described in document creation.
Preferably,
Farther include: according to the multiple image files under varying environment type, set up multiple tables of data;
The plurality of tables of data includes: mirror image Basic Information Table, service Mirror Info table and service mirror relationship table;Its
In,
Described mirror image Basic Information Table includes: mirror image exclusive identification code, environmental form and image file content;
Described service Mirror Info table includes: service image banner code and service labels;
Described service mirror relationship table includes: service image banner code, mirror image exclusive identification code and environmental form.
Preferably, described according to described destination service with described target environment type, determine the target mirror picture of required use
File, including:
Corresponding service labels is determined according to described destination service, and the service labels that determines according to this and described service mirror
As information table, determine corresponding destination service image banner code;
According to described destination service image banner code and described target environment type, and according to described service mirror relationship
Table, determines that target mirror is as exclusive identification code;
According to described target mirror as exclusive identification code and described target environment type, and according to described mirror image essential information
Table, determines that corresponding target mirror is as file content.
Preferably, the plurality of tables of data farther includes: environment mirror contingency table;Described environment mirror contingency table bag
Include: mirror image exclusive identification code and environmental labels code;
Described according to described target mirror target virtual machine as described in document creation, including: associate according to described environment mirror
Table, determines that described target mirror is as target environment identification code corresponding to exclusive identification code;In the void that described target environment type is corresponding
Planization environment selects the target virtualization environment that described target environment identification code is corresponding, and in described target virtualization environment
Described target mirror is utilized to create described target virtual machine as file content.
Preferably, farther include:
When getting the operational order for described destination service, determine according to described destination service and service mark accordingly
Sign, and the service labels that determines according to this and described service Mirror Info table, determine corresponding destination service image banner code;Institute
State operational order to include updating instruction or deleting instruction;
According to each destination service mirror relationship table corresponding to described destination service image banner code, determine each mesh
Index glass is mirror image exclusive identification code as included by contingency table;
The most corresponding target mirror is obtained as Basic Information Table according to this each mirror image exclusive identification code determined;
According to described operational order, each target mirror is operated as Basic Information Table.
Second aspect, the embodiment of the present invention additionally provides a kind of virtual machine creating device, including:
Memory element, for the mirror image literary composition according to the environmental form corresponding to virtual machine currently created and use
Part, each image file that storage varying environment type is corresponding;Wherein, the different image files of corresponding same environmental form, point
Different services Yong Yu be provided;
Receive unit, instruct for receiving the establishment for target virtual machine;It is empty that described target is carried in described establishment instruction
The required destination service provided of plan machine and carry the target environment type residing for described target virtual machine;
Determine unit, for according to described destination service and described target environment type, determining the target mirror of required use
As file;
Acquiring unit, for obtaining the described target image file of storage;
Creating unit, for according to described target mirror target virtual machine as described in document creation.
Preferably,
Farther include: set up unit, for according to the multiple image files under varying environment type, set up multiple data
Table;
The plurality of tables of data includes: mirror image Basic Information Table, service Mirror Info table and service mirror relationship table;Its
In,
Described mirror image Basic Information Table includes: mirror image exclusive identification code, environmental form and image file content;
Described service Mirror Info table includes: service image banner code and service labels;
Described service mirror relationship table includes: service image banner code, mirror image exclusive identification code and environmental form.
Preferably, described determine unit, specifically for:
Corresponding service labels is determined according to described destination service, and the service labels that determines according to this and described service mirror
As information table, determine corresponding destination service image banner code;
According to described destination service image banner code and described target environment type, and according to described service mirror relationship
Table, determines that target mirror is as exclusive identification code;
According to described target mirror as exclusive identification code and described target environment type, and according to described mirror image essential information
Table, determines that corresponding target mirror is as file content.
Preferably, the plurality of tables of data farther includes: environment mirror contingency table;Described environment mirror contingency table bag
Include: mirror image exclusive identification code and environmental labels code;
Described creating unit, specifically for according to described environment mirror contingency table, determines that described target mirror picture uniquely identifies
The target environment identification code that code is corresponding;Described target environment mark is selected in the virtualized environment that described target environment type is corresponding
Know the target virtualization environment that code is corresponding, and utilize described target mirror to create as file content in described target virtualization environment
Described target virtual machine.
Preferably, described determine unit, be further used for:
When getting the operational order for described destination service, determine according to described destination service and service mark accordingly
Sign, and the service labels that determines according to this and described service Mirror Info table, determine corresponding destination service image banner code;Institute
State operational order to include updating instruction or deleting instruction;
According to each destination service mirror relationship table corresponding to described destination service image banner code, determine each mesh
Index glass is mirror image exclusive identification code as included by contingency table;
The most corresponding target mirror is obtained as Basic Information Table according to this each mirror image exclusive identification code determined;
According to described operational order, each target mirror is operated as Basic Information Table.
Embodiments provide a kind of virtual machine creation method and device, by virtual according to currently created
Environmental form corresponding to machine and image file, storage each image file corresponding to varying environment type, receive for
When the establishment of target virtual machine instructs, the required target image file used can be determined according to creating instruction, owing to storing
There is this target image file, this target mirror of storage can be directly utilized as document creation target virtual machine, it is not necessary to manual creation,
Thus improve virtual machine creating efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is the present invention
Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to according to
These accompanying drawings obtain other accompanying drawing.
Fig. 1 is a kind of method flow diagram that one embodiment of the invention provides;
Fig. 2 is the another kind of method flow diagram that one embodiment of the invention provides;
Fig. 3 is virtualized environment, mirror image essential information and the graph of a relation of service mirror image that one embodiment of the invention provides;
Fig. 4 is the hardware structure figure of the device place equipment that one embodiment of the invention provides;
Fig. 5 is the apparatus structure schematic diagram that one embodiment of the invention provides.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
The a part of embodiment of the present invention rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained on the premise of not making creative work, broadly falls into the scope of protection of the invention.
As it is shown in figure 1, embodiments provide a kind of virtual machine creation method, the method can include following step
Rapid:
Step 101: according to the environmental form corresponding to the virtual machine currently created and the image file of use, storage
Each image file that varying environment type is corresponding;Wherein, the different image files of corresponding same environmental form, it is respectively used to carry
For different services;
Step 102: receive the establishment for target virtual machine and instruct;Described target virtual machine institute is carried in described establishment instruction
The destination service that need to provide and carry the target environment type residing for described target virtual machine;
Step 103: according to described destination service and described target environment type, determine the target mirror picture literary composition of required use
Part;
Step 104: obtain the described target image file of storage, and according to described target mirror target as described in document creation
Virtual machine.
According to above-described embodiment scheme, by according to the environmental form corresponding to the virtual machine currently created and mirror image
File, each image file that storage varying environment type is corresponding, when receiving the establishment for target virtual machine and instructing, can
With according to creating the target image file of use needed for instruction determines, owing to storage has this target image file, can be direct
Utilize this target mirror of storage as document creation target virtual machine, it is not necessary to manual creation, thus improve virtual machine creating efficiency.
In an embodiment of the invention, the environmental form corresponding at the virtual machine created is more, and each
Individual environmental form includes multiple when the image file providing different service, and system exists when being managed image file
Bigger difficulty, therefore, the management to the image file stored, may further include: according to varying environment class for convenience
Multiple image files under type, set up multiple tables of data;
The plurality of tables of data may include that mirror image Basic Information Table, service Mirror Info table and service mirror relationship table;
Wherein, described mirror image Basic Information Table includes: mirror image exclusive identification code, environmental form and image file content;Its
In,
Mirror image exclusive identification code is for identifying the uniqueness of this mirror image.Such as, mirror image refers to the mirror under some environment
As file, such as, Oracle mirror image _ Openstack, for the Oracle mirror image being characterized under Openstack environment.For another example,
Oracle mirror image _ Vmware, for the Oracle mirror image being characterized under Vmware environment.For another example, Mysql mirror image _
Openstack, for the Mysql mirror image being characterized under Openstack environment.For another example, Mysql mirror image _ Vmware, it is used for characterizing
Mysql mirror image under Vmware environment.
Environmental form may include that Openstack, Vmware, Docker etc..
Image file content may include that image file size, mirror image nature, demand disk size, demand memory size
With one or more in OS Type.
Wherein, described service Mirror Info table includes: service image banner code and service labels;Wherein,
Service labels, for the label of service mirror image definition, can go out according to this service labels automatic fitration in use can
With the service mirror image used.
Wherein, described service mirror relationship table includes: service image banner code, mirror image exclusive identification code and environmental form.
Wherein,
Service image banner code is for identifying unique mark of service mirror image.Wherein, service mirror image is used for characterizing different rings
For providing the image file of same services under the type of border.Such as, Oracle mirror image, Mysql mirror image.
In an embodiment of the invention, according to above-mentioned multiple tables of data, required use can be determined as follows
Target image file, which may include that
The service labels of correspondence is determined according to described destination service, and the service labels that determines according to this and described service mirror
As information table, determine corresponding destination service image banner code;
According to described destination service image banner code and described target environment type, and according to described service mirror relationship
Table, determines that target mirror is as exclusive identification code;
According to described target mirror as exclusive identification code and described target environment type, and according to described mirror image essential information
Table, determines that corresponding target mirror is as file content.
In an embodiment of the invention, in service Mirror Info table, may further include current service label corresponding
Description information, this describes information for describing the service service area of mirror image and essential information.Right by this destination service institute
The service area answered and essential information, determine service Mirror Info table, service labels included in this service Mirror Info table
It is the service labels that described destination service is corresponding.
In an embodiment of the invention, for same environmental form, can corresponding multiple virtualized environments, wherein, with
Multiple virtualized environments corresponding to one environmental form can be made a distinction by environmental labels code, such as, for Openstack
Environment can corresponding n virtualized environment, such as, Openstack environment 1, Openstack environment 2, Openstack environment
3 ..., Openstack environment n, wherein, n is the integer not less than 1.When creating target virtual machine, need at required mesh
The concrete virtualized environment that mark environmental form is corresponding creates.
The plurality of tables of data farther includes: environment mirror contingency table;Described environment mirror contingency table includes: mirror image is only
One identification code and environmental labels code;
Described according to described target mirror target virtual machine as described in document creation, including: associate according to described environment mirror
Table, determines that described target mirror is as target environment identification code corresponding to exclusive identification code;In the void that described target environment type is corresponding
Planization environment selects the target virtualization environment that described target environment identification code is corresponding, and in described target virtualization environment
Described target mirror is utilized to create described target virtual machine as file content.
Wherein, the environmental labels code that environment mirror contingency table includes can configure according to demand, it is also possible to arranges
One fixing environmental labels code is worth by default.
In an embodiment of the invention, when the multiple tables of data set up are managed, specifically can be by mirror
As the operation of Basic Information Table realizes, may further include:
When getting the operational order for described destination service, determine according to described destination service and service mark accordingly
Sign, and the service labels that determines according to this and described service Mirror Info table, determine corresponding destination service image banner code;Institute
State operational order to include updating instruction or deleting instruction;
According to each destination service mirror relationship table corresponding to described destination service image banner code, determine each mesh
Index glass is mirror image exclusive identification code as included by contingency table;
The most corresponding target mirror is obtained as Basic Information Table according to this each mirror image exclusive identification code determined;
According to described operational order, each target mirror is operated as Basic Information Table.
By above-mentioned way to manage, can effectively safeguard the mirror image concordance between each environment, improve the efficiency of management.
As in figure 2 it is shown, embodiments provide a kind of virtual machine creation method, the method can include following step
Rapid:
Step 201: according to the environmental form corresponding to the virtual machine currently created and the image file of use, storage
Each image file that varying environment type is corresponding;Wherein, the different image files of corresponding same environmental form, it is respectively used to carry
For different services.
In order to improve the efficiency of virtual machine creating, can establish mirror image file attribute information table, is used for providing and automatically pulls
The function of image file under virtualized environment, saves each image file.During use, can be provided by this table
Reference address directly disposes corresponding mirror image on virtualized environment, it is not necessary at the single mirror image of manual creation.This image file
AIT refer to table 1.
Table 1:
Step 202: according to the environmental form corresponding to the virtual machine currently created and the image file of use, for
Multiple image files under dissimilar, set up tables of data.
First, establish mirror image Basic Information Table.Wherein, mirror image Basic Information Table is for recording the void corresponding with environmental form
The mirror image public information of planization environment, is all realized by this table for creating, revise, delete mirror image, this mirror image essential information
Table refer to table 2.
Table 2:
Sequence number | Field information | Explanation |
1 | ISN | Mirror image exclusive identification code, 32, uuid |
2 | Title | Mirror image title |
3 | Environmental form | The virtualized environment type at mirror image place |
4 | Size | Image file size |
5 | Type | The type of mirror image |
6 | Demand disk size | Mirror image sets up the disk size that virtual machine needs |
7 | Demand memory size | Mirror image sets up the memory size that virtual machine needs |
8 | OS Type | The OS Type of mirror image |
Wherein, in above-mentioned table 2, field information corresponding to sequence number 4-8 is image file content.
Secondly, environment mirror contingency table is set up.Wherein, in the environment of this environment mirror contingency table is used for recording each type
Relation between concrete image banner and mirror image Basic Information Table, is associated with on concrete mirror image according to environmental labels code.?
During operation, specific environment mark can be got according to this environment mirror contingency table, operate.This environment mirror contingency table please
Reference table 3.
Table 3:
Again, service Mirror Info table is set up.Set up the concept of service mirror image, it will thus provide the varying environment class of same service
The mirror relationship of type, to together, directly selects service mirror image by service labels during use, and automatically looks into according to the environment selected
Ask out concrete environment mirror, and the interface calling virtualized environment creates virtual machine.This service Mirror Info table refer to table
4。
Table 4:
Sequence number | Field information | Explanation |
1 | ISN | Service image banner code, 32, uuid |
2 | Title | The title of service mirror image definition |
3 | Describe | Service area and the essential information of service mirror image are described |
4 | Service labels | The service labels of service mirror image definition |
Wherein, the service mirror image that can use can be gone out in use according to service labels automatic fitration.
Finally, service mirror relationship table is set up.For recording between service Mirror Info table and mirror image Basic Information Table
Relation, service mirror image carry out corresponding with the mirror image of varying environment type, it is ensured that the mirror image of same purposes under every kind of environmental form
It is associated.This service mirror relationship table refer to table 5.
Table 5:
Sequence number | Field information | Explanation |
1 | ISN | The unique of associated data indicates 32 uuid |
2 | Service mirror image ISN | The ISN (service Mirror Info table) of service mirror image |
3 | Mirror image ISN | ISN (mirror image Basic Information Table) in Mirror Info |
4 | Environmental form | Environmental form in Mirror Info |
Step 203: receive the establishment for target virtual machine and instruct;Described target virtual machine institute is carried in described establishment instruction
The destination service that need to provide and carry the target environment type residing for described target virtual machine.
Such as, this target environment type is Openstack.
Step 204: determine the service labels of correspondence according to described destination service, and the service labels that determines according to this and institute
State service Mirror Info table, determine corresponding destination service image banner code.
In the present embodiment, bag can be determined according to the service area look-up table 4 of the service mirror image described by destination service
Include the service Mirror Info table of the service area of this service mirror image, service labels corresponding in this service Mirror Info table and
Destination service image banner code.
By service mirror image corresponding to destination service image banner code for illustrating as a example by Mysql mirror image.Refer to Fig. 3,
For virtualized environment, mirror image essential information and the graph of a relation of service mirror image.
Step 205: according to described destination service image banner code and described target environment type, and according to described service
Mirror relationship table, determines that target mirror is as exclusive identification code.
According to table 5 may determine that target mirror as exclusive identification code, wherein, this target mirror picture be Mysql mirror image _
Openstack。
Step 206: according to described target mirror as exclusive identification code and described target environment type, and according to described mirror image
Basic Information Table, determines that corresponding target mirror is as file content.
According to table 2, it may be determined that go out corresponding target mirror as file content, learn mirror image size, mirror image nature, demand
Disk size, demand memory size and OS Type.
Step 207: obtain the described target image file of storage, and according to described target mirror target as described in document creation
Virtual machine.
By look-up table 1, the storage address storing this target image file can be learnt, by pulling this target mirror picture
File.
In the present embodiment, for same environmental form, can corresponding multiple virtualized environments, wherein, same environmental classes
Multiple virtualized environments that type is corresponding can be made a distinction by environmental labels code, such as, permissible for Openstack environment
Corresponding n virtualized environment, such as, Openstack environment 1, Openstack environment 2, Openstack environment 3 ...,
Openstack environment n, wherein, n is the integer not less than 1.When creating target virtual machine, need in required target environment
The concrete virtualized environment that type is corresponding creates.
In the present embodiment, the environmental labels of acquiescence can be set in table 3, determine phase according to target mirror as exclusive identification code
The environmental labels answered and environment mirror mark, such as, environmental labels is Openstack environment 1, Mysql mirror image _ Openstack
Environment mirror in this Openstack environment 1 is designated 2, creates mesh by pulling image file at Openstack environment 1
Mark virtual machine.
As shown in Figure 4, Figure 5, a kind of virtual machine creating device is embodiments provided.Device embodiment can be passed through
Software realizes, it is also possible to realize by the way of hardware or software and hardware combining.For hardware view, as shown in Figure 4, for this
A kind of hardware structure diagram of virtual machine creating device place equipment that inventive embodiments provides, except the processor shown in Fig. 4, interior
Deposit, outside network interface and nonvolatile memory, in embodiment, the equipment at device place generally can also include that other are hard
Part, such as the forwarding chip etc. of responsible process message.As a example by implemented in software, as it is shown in figure 5, as on a logical meaning
Device, is that computer program instructions corresponding in nonvolatile memory is read in internal memory by the CPU by its place equipment
Run formation.The virtual machine creating device that the present embodiment provides, including:
Memory element 501, for according to the environmental form corresponding to virtual machine currently created and the mirror image of use
File, each image file that storage varying environment type is corresponding;Wherein, the different image files of corresponding same environmental form,
It is respectively configured to provide different services;
Receive unit 502, instruct for receiving the establishment for target virtual machine;Described target is carried in described establishment instruction
The required destination service provided of virtual machine and carry the target environment type residing for described target virtual machine;
Determine unit 503, for according to described destination service and described target environment type, determining the target of required use
Image file;
Acquiring unit 504, for obtaining the described target image file of storage;
Creating unit 505, for the described target mirror target virtual machine as described in document creation according to storage.
In an embodiment of the invention, may further include: set up unit, for according under varying environment type
Multiple image files, set up multiple tables of data;
The plurality of tables of data includes: mirror image Basic Information Table, service Mirror Info table and service mirror relationship table;Its
In,
Described mirror image Basic Information Table includes: mirror image exclusive identification code, environmental form and image file content;
Described service Mirror Info table includes: service image banner code and service labels;
Described service mirror relationship table includes: service image banner code, mirror image exclusive identification code and environmental form.
In an embodiment of the invention, described determine unit, specifically for:
Corresponding service labels is determined according to described destination service, and the service labels that determines according to this and described service mirror
As information table, determine corresponding destination service image banner code;
According to described destination service image banner code and described target environment type, and according to described service mirror relationship
Table, determines that target mirror is as exclusive identification code;
According to described target mirror as exclusive identification code and described target environment type, and according to described mirror image essential information
Table, determines that corresponding target mirror is as file content.
In an embodiment of the invention, the plurality of tables of data farther includes: environment mirror contingency table;Described environment
Mirror relationship table includes: mirror image exclusive identification code and environmental labels code;
Described creating unit, specifically for according to described environment mirror contingency table, determines that described target mirror picture uniquely identifies
The target environment identification code that code is corresponding;Described target environment mark is selected in the virtualized environment that described target environment type is corresponding
Know the target virtualization environment that code is corresponding, and utilize described target mirror to create as file content in described target virtualization environment
Described target virtual machine.
In an embodiment of the invention, described determine unit, be further used for:
When getting the operational order for described destination service, determine according to described destination service and service mark accordingly
Sign, and the service labels that determines according to this and described service Mirror Info table, determine corresponding destination service image banner code;Institute
State operational order to include updating instruction or deleting instruction;
According to each destination service mirror relationship table corresponding to described destination service image banner code, determine each mesh
Index glass is mirror image exclusive identification code as included by contingency table;
The most corresponding target mirror is obtained as Basic Information Table according to this each mirror image exclusive identification code determined;
According to described operational order, each target mirror is operated as Basic Information Table.
To sum up, each embodiment of the present invention at least can realize following beneficial effect:
1, in embodiments of the present invention, by according to the environmental form corresponding to the virtual machine currently created and mirror image
File, each image file that storage varying environment type is corresponding, when receiving the establishment for target virtual machine and instructing, can
With according to creating the target image file of use needed for instruction determines, owing to storage has this target image file, can be direct
Utilize this target mirror of storage as document creation target virtual machine, it is not necessary to manual creation, thus improve virtual machine creating efficiency.
2, in embodiments of the present invention, realizing mirror image management by the way of setting up multiple tables of data, manager need not
Individually manage mirror image linking each virtualized environment, and can effectively safeguard the relation of mirror image between each environment, it is achieved be right
The maintenance of mirror image under multiple virtualization environment;Additionally maintain the uniqueness of image file, it is ensured that each environment mirror does not haves
Difference;Can effectively safeguard the mirror image concordance between each environment, improve the efficiency of management.
The contents such as the information between each unit in said apparatus is mutual, execution process, owing to implementing with the inventive method
Example is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
It should be noted that in this article, the relational terms of such as first and second etc is used merely to an entity
Or operation separates with another entity or operating space, and not necessarily require or imply existence between these entities or operation
The relation of any this reality or order.And, term " includes ", " comprising " or its any other variant are intended to non-
Comprising of exclusiveness, so that include that the process of a series of key element, method, article or equipment not only include those key elements,
But also include other key elements being not expressly set out, or also include being consolidated by this process, method, article or equipment
Some key elements.In the case of there is no more restriction, statement " including ... " key element limited, it is not excluded that including
The process of described key element, method, article or equipment there is also other same factor.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can be passed through
The hardware that programmed instruction is relevant completes, and aforesaid program can be stored in the storage medium of embodied on computer readable, this program
Upon execution, perform to include the step of said method embodiment;And aforesaid storage medium includes: ROM, RAM, magnetic disc or light
In the various medium that can store program code such as dish.
Last it should be understood that the foregoing is only presently preferred embodiments of the present invention, it is merely to illustrate the skill of the present invention
Art scheme, is not intended to limit protection scope of the present invention.All made within the spirit and principles in the present invention any amendment,
Equivalent, improvement etc., be all contained in protection scope of the present invention.
Claims (10)
1. a virtual machine creation method, it is characterised in that including:
According to the environmental form corresponding to the virtual machine currently created and the image file of use, store varying environment type
Each corresponding image file;Wherein, the different image files of corresponding same environmental form, it is respectively configured to provide different clothes
Business;
Receive the establishment for target virtual machine to instruct;Described establishment instructs the target carrying the required offer of described target virtual machine
Service and carry the target environment type residing for described target virtual machine;
According to described destination service and described target environment type, determine the target image file of required use;
Obtain the described target image file of storage, and according to described target mirror target virtual machine as described in document creation.
Method the most according to claim 1, it is characterised in that
Farther include: according to the multiple image files under varying environment type, set up multiple tables of data;
The plurality of tables of data includes: mirror image Basic Information Table, service Mirror Info table and service mirror relationship table;Wherein,
Described mirror image Basic Information Table includes: mirror image exclusive identification code, environmental form and image file content;
Described service Mirror Info table includes: service image banner code and service labels;
Described service mirror relationship table includes: service image banner code, mirror image exclusive identification code and environmental form.
Method the most according to claim 2, it is characterised in that described according to described destination service with described target environment class
Type, determines the target image file of required use, including:
Determine corresponding service labels according to described destination service, and the service labels and the described service mirror image that determine according to this are believed
Breath table, determines corresponding destination service image banner code;
According to described destination service image banner code and described target environment type, and according to described service mirror relationship table,
Determine that target mirror is as exclusive identification code;
According to described target mirror as exclusive identification code and described target environment type, and according to described mirror image Basic Information Table,
Determine that corresponding target mirror is as file content.
Method the most according to claim 3, it is characterised in that the plurality of tables of data farther includes: environment mirror is closed
Connection table;Described environment mirror contingency table includes: mirror image exclusive identification code and environmental labels code;
Described according to described target mirror target virtual machine as described in document creation, including: according to described environment mirror contingency table, really
Fixed described target mirror is as target environment identification code corresponding to exclusive identification code;At the virtualization ring that described target environment type is corresponding
Border selects the target virtualization environment that described target environment identification code is corresponding, and utilizes institute in described target virtualization environment
State target mirror as the file content described target virtual machine of establishment.
Method the most according to claim 2, it is characterised in that farther include:
When getting the operational order for described destination service, determine corresponding service labels according to described destination service,
And the service labels that determines according to this and described service Mirror Info table, determine corresponding destination service image banner code;Described
Operational order includes updating instruction or deleting instruction;
According to each destination service mirror relationship table corresponding to described destination service image banner code, determine each target mirror
As mirror image exclusive identification code included in contingency table;
The most corresponding target mirror is obtained as Basic Information Table according to this each mirror image exclusive identification code determined;
According to described operational order, each target mirror is operated as Basic Information Table.
6. a virtual machine creating device, it is characterised in that including:
Memory element, for according to the environmental form corresponding to virtual machine currently created and the image file of use, depositing
Each image file that storage varying environment type is corresponding;Wherein, the different image files of corresponding same environmental form, it is respectively used to
Different services is provided;
Receive unit, instruct for receiving the establishment for target virtual machine;Described target virtual machine is carried in described establishment instruction
The required destination service provided and carry the target environment type residing for described target virtual machine;
Determine unit, for according to described destination service and described target environment type, determining the target mirror picture literary composition of required use
Part;
Acquiring unit, for obtaining the described target image file of storage;
Creating unit, for according to described target mirror target virtual machine as described in document creation.
Virtual machine creating device the most according to claim 6, it is characterised in that
Farther include: set up unit, for according to the multiple image files under varying environment type, set up multiple tables of data;
The plurality of tables of data includes: mirror image Basic Information Table, service Mirror Info table and service mirror relationship table;Wherein,
Described mirror image Basic Information Table includes: mirror image exclusive identification code, environmental form and image file content;
Described service Mirror Info table includes: service image banner code and service labels;
Described service mirror relationship table includes: service image banner code, mirror image exclusive identification code and environmental form.
Virtual machine creating device the most according to claim 7, it is characterised in that described determine unit, specifically for:
Determine corresponding service labels according to described destination service, and the service labels and the described service mirror image that determine according to this are believed
Breath table, determines corresponding destination service image banner code;
According to described destination service image banner code and described target environment type, and according to described service mirror relationship table,
Determine that target mirror is as exclusive identification code;
According to described target mirror as exclusive identification code and described target environment type, and according to described mirror image Basic Information Table,
Determine that corresponding target mirror is as file content.
Virtual machine creating device the most according to claim 8, it is characterised in that the plurality of tables of data farther includes:
Environment mirror contingency table;Described environment mirror contingency table includes: mirror image exclusive identification code and environmental labels code;
Described creating unit, specifically for according to described environment mirror contingency table, determines that described target mirror is as exclusive identification code pair
The target environment identification code answered;Described target environment identification code is selected in the virtualized environment that described target environment type is corresponding
Corresponding target virtualization environment, and utilize described target mirror in described target virtualization environment as described in file content creates
Target virtual machine.
Virtual machine creating device the most according to claim 7, it is characterised in that described determine unit, is further used for:
When getting the operational order for described destination service, determine corresponding service labels according to described destination service,
And the service labels that determines according to this and described service Mirror Info table, determine corresponding destination service image banner code;Described
Operational order includes updating instruction or deleting instruction;
According to each destination service mirror relationship table corresponding to described destination service image banner code, determine each target mirror
As mirror image exclusive identification code included in contingency table;
The most corresponding target mirror is obtained as Basic Information Table according to this each mirror image exclusive identification code determined;
According to described operational order, each target mirror is operated as Basic Information Table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610480933.4A CN106201648A (en) | 2016-06-27 | 2016-06-27 | A kind of virtual machine creation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610480933.4A CN106201648A (en) | 2016-06-27 | 2016-06-27 | A kind of virtual machine creation method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106201648A true CN106201648A (en) | 2016-12-07 |
Family
ID=57461361
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610480933.4A Pending CN106201648A (en) | 2016-06-27 | 2016-06-27 | A kind of virtual machine creation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106201648A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107357674A (en) * | 2017-06-29 | 2017-11-17 | 联想(北京)有限公司 | A kind of information processing method, equipment and storage medium |
CN108399101A (en) * | 2017-02-06 | 2018-08-14 | 腾讯科技(深圳)有限公司 | The methods, devices and systems of scheduling of resource |
CN108563461A (en) * | 2018-03-20 | 2018-09-21 | 聚好看科技股份有限公司 | A kind of method, apparatus and system for extracting configuration file from mirror image |
CN109976878A (en) * | 2019-03-25 | 2019-07-05 | 北京百度网讯科技有限公司 | Method and apparatus for sending information |
CN110673924A (en) * | 2019-09-06 | 2020-01-10 | 北京浪潮数据技术有限公司 | Multi-architecture container cloud mirror image selection method, device, equipment and storage medium |
CN110908675A (en) * | 2019-11-15 | 2020-03-24 | 北京百度网讯科技有限公司 | Operating environment acquisition method and device and electronic equipment |
CN111443925A (en) * | 2020-04-15 | 2020-07-24 | 北京易点淘网络技术有限公司 | Mirror image installation method, primary and secondary servers, system, electronic equipment and storage medium |
CN111666129A (en) * | 2020-06-03 | 2020-09-15 | 科东(广州)软件科技有限公司 | Container mirror image processing method, electronic device, storage medium and system |
CN113407308A (en) * | 2021-06-24 | 2021-09-17 | 龙芯中科(合肥)技术有限公司 | Container mirror image obtaining method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102799464A (en) * | 2012-06-25 | 2012-11-28 | 北京奇虎科技有限公司 | Virtual machine creation method, virtual machine creation system, virtual machine resetting method and virtual machine resetting system |
CN103716347A (en) * | 2012-09-29 | 2014-04-09 | 国际商业机器公司 | Virtual machine creating method, virtual machine creating device and cloud server |
-
2016
- 2016-06-27 CN CN201610480933.4A patent/CN106201648A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102799464A (en) * | 2012-06-25 | 2012-11-28 | 北京奇虎科技有限公司 | Virtual machine creation method, virtual machine creation system, virtual machine resetting method and virtual machine resetting system |
CN103716347A (en) * | 2012-09-29 | 2014-04-09 | 国际商业机器公司 | Virtual machine creating method, virtual machine creating device and cloud server |
Non-Patent Citations (1)
Title |
---|
刘明惠: ""云计算中虚拟机镜像管理的研究与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108399101A (en) * | 2017-02-06 | 2018-08-14 | 腾讯科技(深圳)有限公司 | The methods, devices and systems of scheduling of resource |
CN107357674A (en) * | 2017-06-29 | 2017-11-17 | 联想(北京)有限公司 | A kind of information processing method, equipment and storage medium |
CN107357674B (en) * | 2017-06-29 | 2021-02-19 | 联想(北京)有限公司 | Information processing method, device and storage medium |
CN108563461A (en) * | 2018-03-20 | 2018-09-21 | 聚好看科技股份有限公司 | A kind of method, apparatus and system for extracting configuration file from mirror image |
CN109976878A (en) * | 2019-03-25 | 2019-07-05 | 北京百度网讯科技有限公司 | Method and apparatus for sending information |
CN110673924B (en) * | 2019-09-06 | 2023-07-14 | 北京浪潮数据技术有限公司 | Multi-architecture container cloud mirror image selection method, device, equipment and storage medium |
CN110673924A (en) * | 2019-09-06 | 2020-01-10 | 北京浪潮数据技术有限公司 | Multi-architecture container cloud mirror image selection method, device, equipment and storage medium |
CN110908675A (en) * | 2019-11-15 | 2020-03-24 | 北京百度网讯科技有限公司 | Operating environment acquisition method and device and electronic equipment |
CN110908675B (en) * | 2019-11-15 | 2023-10-24 | 北京百度网讯科技有限公司 | Method and device for acquiring running environment and electronic equipment |
CN111443925A (en) * | 2020-04-15 | 2020-07-24 | 北京易点淘网络技术有限公司 | Mirror image installation method, primary and secondary servers, system, electronic equipment and storage medium |
CN111443925B (en) * | 2020-04-15 | 2024-03-01 | 北京易点淘网络技术有限公司 | Mirror image installation method, primary and secondary servers, system, electronic equipment and storage medium |
CN111666129B (en) * | 2020-06-03 | 2022-03-22 | 科东(广州)软件科技有限公司 | Container mirror image processing method, electronic device, storage medium and system |
CN111666129A (en) * | 2020-06-03 | 2020-09-15 | 科东(广州)软件科技有限公司 | Container mirror image processing method, electronic device, storage medium and system |
CN113407308A (en) * | 2021-06-24 | 2021-09-17 | 龙芯中科(合肥)技术有限公司 | Container mirror image obtaining method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106201648A (en) | A kind of virtual machine creation method and device | |
US9928111B2 (en) | System and method for configuration tagging in a multitenant application server environment | |
US10686756B2 (en) | Method and apparatus for managing MAC address generation for virtualized environments | |
US9760589B2 (en) | Mechanism for deprecating object oriented data | |
US20180349150A1 (en) | Facilitating multi-inheritance within a single inheritance container-based environment | |
TWI660274B (en) | Data processing method and equipment based on blockchain | |
US8364683B2 (en) | Importing and reconciling resources from disjoint name spaces to a common namespace | |
CN104079613B (en) | Method and system for sharing application program object between multi-tenant | |
CN106202490A (en) | A kind of SolrCloud configuration file amending method, Apparatus and system | |
CN106648462A (en) | Data storage method and device | |
CN108279979A (en) | A kind of method and device for binding CPU for Application Container | |
US9904452B2 (en) | Building user specific user interface instances | |
CN114490062A (en) | Local disk scheduling method and device, electronic equipment and storage medium | |
CN106557343A (en) | Systematic function application and the method and device of loading resource | |
CN108845862A (en) | Multi-container management method and device | |
CN115516441A (en) | Multi-valued primary keys for multiple unique identifiers of entities | |
KR101589969B1 (en) | File management method and system of network structure | |
CN110489060A (en) | A kind of mixed file construction method and its system based on FUSE technology | |
CN113626144B (en) | Method, device, equipment and readable medium for creating and storing double live volumes by clusters | |
CN113626189B (en) | Method, device and medium for constructing resource management model | |
CN107402749A (en) | Realize the method and device in picture loading storehouse | |
US11200253B2 (en) | Providing instant and distributed access to a source blob via copy-on-read blobs and link blobs | |
CN111191057A (en) | User-defined retrieval method and device, electronic equipment and storage medium thereof | |
CN106126313A (en) | A kind of method based on the integrated Solr of Ambari and server | |
US10747710B2 (en) | Dynamic association of application workload tiers to infrastructure elements in a cloud computing environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20161207 |