CN102799464B - Virtual machine creation method and system, virtual machine reloading method and system - Google Patents

Virtual machine creation method and system, virtual machine reloading method and system Download PDF

Info

Publication number
CN102799464B
CN102799464B CN201210214521.8A CN201210214521A CN102799464B CN 102799464 B CN102799464 B CN 102799464B CN 201210214521 A CN201210214521 A CN 201210214521A CN 102799464 B CN102799464 B CN 102799464B
Authority
CN
China
Prior art keywords
template
virtual machine
snapshot
machine
physical 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 - Reinstated
Application number
CN201210214521.8A
Other languages
Chinese (zh)
Other versions
CN102799464A (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201210214521.8A priority Critical patent/CN102799464B/en
Publication of CN102799464A publication Critical patent/CN102799464A/en
Application granted granted Critical
Publication of CN102799464B publication Critical patent/CN102799464B/en
Active - Reinstated legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This application provides a kind of virtual machine creation method, comprise the following steps: receive the request creating virtual machine, extract the To Template information comprised in described request; The To Template corresponding according to described To Template information searching; Create the snapshot of described To Template, and described snapshot is set to the virtual disk of virtual machine, generating virtual machines configuration information.Present invention also provides a kind of virtual machine creation system realizing preceding method, a kind of virtual machine reloading method and system.The virtual machine creation method of the application and system, virtual machine reloading method and system, can shorten virtual machine creating and reset time, and can to avoid in constructive process because read-write operation and affect the virtual machine created and normally run repeatedly.

Description

Virtual machine creation method and system, virtual machine reloading method and system
Technical field
The application relates to microcomputer data processing field, particularly relates to a kind of virtual machine creation method and system, virtual machine reloading method and system.
Background technology
Intel Virtualization Technology refers to and utilizes software and hardware to combine, and physical server is divided into the virtual machine of some isolation, can independently working procedure and being independent of each other on each virtual machine.Intel Virtualization Technology physical resource is accomplished more fine-grained division, thus physical server resource is utilized more fully, save cost.In addition, Intel Virtualization Technology becomes software operation by the operation of physical server hardware, makes to dispose, change, it is convenient that calamity is standby etc., runs multiple application program compared to unit, use virtual machine, the environment that application program is seen is consistent with on physical server, uses and safeguards simpler.
Before use virtual machine, need create in physical server and configure, detailed process comprises preparation server, installing operating system, configuration operation system, the several step of application deployment.Because the process related to is comparatively loaded down with trivial details, and it is comparatively large to create the data file related in the process of virtual machine, and the time of whole constructive process is longer.For this reason, common at present a kind of way realizes fast creation by mould plate technique.So-called template refers to the virtual machine image containing complete operating system and user and specifically apply.Following step is divided into: create magnetic disk of virtual machine by template establishment virtual machine; Template is copied in the magnetic disk of virtual machine built up from template base or template snapshot (cache); The configuration information of generating virtual machines; Start virtual machine.In this process, magnetic disk of virtual machine exists in the mode of file or equipment on physical server, and therefore, namely create magnetic disk of virtual machine is that physical server creates a file or an equipment.Namely copy template to magnetic disk of virtual machine is by the data message of template write magnetic disk of virtual machine.Because template itself is copying completely of a virtual machine, so the subregion guidance information that system starts to be needed is also contained in template mirror image, after this just makes that template data information is write magnetic disk of virtual machine completely, virtual machine can normally start.But, in this kind of method, when creating virtual machine, because need to read whole template data information and write in corresponding magnetic disk of virtual machine.Because template data information is usually comparatively large, usually in gigabit (G), and the data volume involved by operation of simultaneously carrying out read and write is the twice of the size of template data own, and this can spend the longer time undoubtedly.Such as, the template of a 300G, generates a virtual machine by it, just needs read-write to have the data of 600G altogether.Therefore, template is larger, and need the data of read-write more, the time of generating virtual machines is longer.In addition, in the process because need repeatedly to carry out I/O operation for a long time, this also may affect the normal operation of the virtual machine that in this physical server, other have created.
Summary of the invention
The application provides a kind of virtual machine creation method and system, virtual machine reloading method and system, and it is longer and because the problem normally run of the virtual machine that read-write operation and affecting has created repeatedly in constructive process to solve the virtual machine creating time.
In order to solve the problem, this application discloses a kind of virtual machine creation method, comprising the following steps:
Receive the request creating virtual machine, extract the To Template information comprised in described request;
The To Template corresponding according to described To Template information searching;
Create the snapshot of described To Template, and described snapshot is set to the virtual disk of virtual machine, generating virtual machines configuration information.
Further, the described request receiving establishment virtual machine receives by needing the target physical machine creating virtual machine; Or
The described request receiving establishment virtual machine receives by needing the physical machine created outside the target physical machine of virtual machine.
Further, in the request of described establishment virtual machine, also comprise the target physical machine information of the establishment virtual machine of specifying, describedly to comprise according to described To Template information searching To Template:
In the mapping table prestored, search all templates corresponding with described target physical machine, what record in described mapping table is each physical machine and the corresponding relation of the template be stored therein;
The To Template with described To Template information matches is chosen in the described all templates found.
Further, describedly to comprise according to described To Template information searching To Template:
In the mapping table prestored, search the physical machine corresponding with all alternative target templates of described To Template information matches and all alternative target templates, what record in described mapping table is each physical machine and the corresponding relation of the template be stored therein;
From the described all physical machine found, choose a physical machine, described in alternative target template in the physical machine that is selected be To Template.
Further, described mapping table is stored in the physical machine as host node.
Further, the described snapshot creating described To Template in target physical machine comprises:
Extract the snapshot creation mode creating and comprise in the request of virtual machine;
The snapshot of described To Template is created according to described snapshot creation mode.
Further, described method also comprises:
Before receiving the request creating virtual machine, the template-setup of described download in physical machine, and is a reading mode by downloads template.
Further, also comprise after in described downloads template to physical machine:
Record the physical machine corresponding relation of described newly downloaded template and the described newly downloaded template of storage.
Disclosed herein as well is a kind of virtual machine reloading method, comprise the following steps:
Close target virtual machine;
Delete the original snapshot as described target virtual machine disk;
Primary template corresponding to described target virtual machine is searched in the physical machine at described target virtual machine place;
Create the new snapshot of described primary template, described new snapshot is set to the virtual disk of the virtual machine after resetting, generating virtual machines configuration information.
Further, also comprise before the new snapshot of the described primary template of described establishment:
Obtain the establishment mode of original snapshot, adopt the establishment mode of described original snapshot to create new snapshot.
Disclosed herein as well is a kind of virtual machine creation system, comprising:
Request receiving module, for receiving the request creating virtual machine, extracts the To Template information comprised in described request;
To Template searches module, for the To Template corresponding according to described To Template information searching;
Snapshot creation module, for creating the snapshot of described To Template, is set to the virtual disk of virtual machine, generating virtual machines configuration information by described snapshot.
Further, described To Template is searched module and is comprised:
Query unit, for searching all templates corresponding with described target physical machine in the mapping table prestored, what record in described mapping table is each physical machine and the corresponding relation of the template be stored therein; And the To Template with described To Template information matches is chosen in the described all templates found.
Further, described snapshot creation module comprises:
Establishment mode extraction unit, for extracting the snapshot creation mode creating and comprise in the request of virtual machine; The snapshot of described To Template is created according to described snapshot creation mode.
Further, described system also comprises:
Download module, for before receiving the request creating virtual machine, the template-setup of described download in physical machine, and is a reading mode by downloads template.
Disclosed herein as well is a kind of virtual machine refitting system, comprising:
Control module, for closing target virtual machine;
Original snapshot processing module, for deleting the original snapshot as described target virtual machine disk;
Template searches module, for searching primary template corresponding to described target virtual machine in the physical machine at described target virtual machine place;
Snapshot creation module, for creating the new snapshot of described primary template, is set to the virtual disk of the virtual machine after resetting, generating virtual machines configuration information by described new snapshot.
Further, also comprise:
Original establishment mode acquisition module, for obtaining the establishment mode of original snapshot, adopts the establishment mode of described original snapshot to create new snapshot.
Compared with prior art, the application comprises following advantage:
In the virtual machine creation method of the application and system after receiving the request creating virtual machine, first search in target physical machine and whether include To Template, if have, To Template then can be directly used to complete the establishment of virtual machine, if no, then just To Template is kept in physical machine after this To Template of download.For any template, in repeatedly use procedure, only can when using first once downloading process, the virtual machine of follow-up any this template of use can share this template, thus greatly reducing the time of this template establishment virtual machine of follow-up use, the I/O operation simultaneously avoided repeatedly affects other virtual machines in physical machine.
In addition, in the virtual machine reloading method of the application and system, carry out system refitting by the direct original module be stored in physical machine, without the need to downloads template again, therefore can realize system refitting fast.
Certainly, the arbitrary product implementing the application not necessarily needs to reach above-described all advantages simultaneously.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present application or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of the virtual machine creation method embodiment one of the application;
Fig. 2 is the process flow diagram of the virtual machine reloading method embodiment one of the application;
Fig. 3 is the structural representation of the virtual machine creation system embodiment one of the application;
Fig. 4 is the structural representation of the virtual machine refitting system embodiment one of the application.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, be clearly and completely described the technical scheme in the embodiment of the present application, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, the every other embodiment that those of ordinary skill in the art obtain, all belongs to the scope of the application's protection.
With reference to Fig. 1, a kind of virtual machine creation method embodiment one of the application is shown, comprises the following steps:
Step 101, receives the request creating virtual machine, extracts the To Template information comprised in described request.
The request creating virtual machine comprises: virtual machine name (name), magnetic disk of virtual machine type (disk_template), magnetic disk of virtual machine describe (disks, such as: [{ " size ": 100}, { " size ": 5}]), the information such as VME operating system type (os), template name, numbering.Wherein, To Template information can be determined according to template name and/or numbering.
Can be independently for creating the physical machine (i.e. server) of virtual machine, also can be cluster form.Independently namely physical machine refers to that every platform physical machine can both independent processing affairs.Namely cluster form refers to, has multiple stage physical machine, and wherein one is host node, other be ordinary node, the process of all information is responsible for by host node, and other ordinary node operates accordingly according to the order of host node.
Being appreciated that in the request creating virtual machine the target physical machine can specified for creating virtual machine, namely can comprising target physical machine information (pnode), such as target physical machine title or numbering etc. in request.Also can not specify, but from multiple physical machine, choose one as target physical machine by receiving the physical machine creating virtual machine request according to actual conditions, or just by receiving the physical machine self of establishment virtual machine request as target physical machine, the application does not limit this.In addition, the request creating virtual machine can receive by needing the target physical machine creating virtual machine, also can be received by the physical machine as host node, can be same physical machine as the physical machine of host node and target physical machine, also can be different physical machine.
Be appreciated that, create in the request of virtual machine and can also comprise other information, such as spare physical machine information, create successfully and whether start virtual machine, whether check the validity of virtual machine ip, storage virtual machine disk file path, virtual disk rear end drives, scheduler, virtual machine virtualizes type, hypervisor parameter, rear end parameter, memory, vcpu etc., virtual machine owner, virtual machine ip address, virtual machine netmask, virtual machine gateway, the bridge that virtual machine is corresponding, the external speed limit of virtual machine, virtual machine flows into Limit Rate, whether revise virtual machine password, virtual machine password, snapshot mode whether is adopted to create virtual machine, whether virtual machine adopts dhcp pattern, whether do interior poke when creating virtual machine to check etc.Can choose according to actual needs in these information aforesaid, as long as the establishment of virtual machine can be realized.
Step 102, the To Template corresponding according to described To Template information searching.
When including target physical machine information in the request creating virtual machine, such as, during target physical machine title, the To Template corresponding according to To Template information searching can carry out in the following way:
In the mapping table prestored, search all templates corresponding with described target physical machine, what record in described mapping table is each physical machine and the corresponding relation of the template be stored therein;
The To Template with described To Template information matches is chosen in the described all templates found.
If create non-intended target physical machine in the request of virtual machine, then can search To Template in the following way:
In the mapping table prestored, search the physical machine corresponding with all alternative target templates of described To Template information matches and all alternative target templates, what record in described mapping table is each physical machine and the corresponding relation of the template be stored therein;
From the described all physical machine found, choose a physical machine, described in alternative target template in the physical machine that is selected be To Template.
Also namely, first can find all physical machine with this To Template, then therefrom choose a physical machine as target physical machine, template corresponding in this target physical machine is To Template.
Wherein, the mapping table of physical machine and template can be set up in advance.If there is certain template in physical machine, then the corresponding relation both setting up, and be added in mapping table.Mapping table can directly be stored in physical machine, directly whether can have corresponding relation record by searching the two in the mapping table in physical machine when judging whether to comprise To Template in target physical machine.Be appreciated that for independently physical machine, can directly mapping table be stored in this physical machine, for the physical machine of cluster form, mapping table can be stored in the master node.Mapping table also can be stored in other places, when needed, can carry out Real-time Obtaining by modes such as network connections.
Be appreciated that also can directly using To Template information as querying condition, search To Template by other the mode of searching of coupling or eigenwert etc.
Step 103, creates the snapshot of described To Template, and described snapshot is set to the virtual disk of virtual machine, generating virtual machines configuration information.
Wherein, the snapshot of To Template can adopt fixed form to create, i.e. the establishment mode of pre-set snapshot in system, and when receiving the request creating snapshot, system directly carries out the establishment of snapshot with this fixed form.Be appreciated that in system and several alternative snapshot creation mode can also be set, in the request creating snapshot, add the snapshot creation mode wishing to adopt.In the process creating snapshot, the snapshot creation mode creating and comprise in the request of virtual machine can be extracted, from system, choose corresponding mode according to the mode of specifying in request and create snapshot.Such as, virtual machine uses lvm(LogicalVolumeManager simultaneously, logical volume management) volume and file mode as disk, so when creating snapshot, for the virtual machine using lvm volume, it creates in virtual request can specify the snapshot functions adopting lvm to carry to carry out the establishment of snapshot; For the virtual machine using file, it creates in virtual request to specify and adopts qemu-img instrument to generate the snapshot of qcow2 form to carry out the establishment of snapshot.
In addition, because magnetic disk of virtual machine snapshot many employings COW(copyonwrite, copy-on-write technique), due to the characteristic of COW, it is no matter the snapshot of lvm or qcow2, once be stored in the template in physical machine for source LUN() there is write operation, capital is triggered once and extra read and once additionally to write, and in fact do not need to carry out write operation based on the source LUN of the virtual machine of snapshot, therefore, before establishment snapshot, be read-onlyly can ensure that can not write template because of fortuitous event produces performance issue by the template-setup be stored in physical machine.
Virtual machine configuration information generally includes cpu number, memory size, virtual machine name, and the disk configuration of virtual machine, network configuration of virtual machine etc. information, can set according to actual needs.
Preferably, on the basis of previous embodiment, before receiving the request creating virtual machine, the template-setup of described download in physical machine, and is a reading mode by downloads template.
The template style stored in physical machine all needs to be set to a reading mode, thus prevent from modifying on template style in subsequent operation and affecting the use of template, all like this templates be stored in physical machine can be used again, thus avoid repeatedly downloading and the time of overspending.Therefore, when there being new template to download in physical machine, needing to be set to a reading mode, thus being convenient to follow-up use.
Be appreciated that for employing mapping table to search the embodiment of To Template, now, the corresponding relation of the physical machine of newly downloaded template and the described newly downloaded template of storage can also be set up.This corresponding relation can be stored by the mode setting up new mapping table, before also can adding in mapping table, thus for follow-up.With reference to Fig. 2, the virtual machine reloading method embodiment one of the application is shown, based on aforementioned virtual machine creation method embodiment, comprises the following steps:
Step 201, closes target virtual machine.
Step 202, deletes the original snapshot as described target virtual machine disk.
Original snapshot is herein the snapshot of the virtual machine before refitting.
Step 203, searches template corresponding to described target virtual machine in the physical machine at described target virtual machine place.
When setting up virtual machine, the template corresponding to each virtual machine and physical machine can be included in the request creating virtual machine, and after virtual machine creating completes, the template of its correspondence is fixing.Conveniently search, after virtual machine creating completes, with the corresponding relation of virtual machine both can also adding in aforesaid template and physical machine mapping table, or can the corresponding relation of directly separately storing template and virtual machine, thus the template in dummy machine system refitting process corresponding to fast finding to virtual machine.
Step 204, creates the new snapshot of described primary template, described new snapshot is set to the virtual disk of the virtual machine after resetting, generating virtual machines configuration information.
Step 103 process created in the process of new snapshot and embodiment one is similar, namely can come according to the fixing snapshot creation mode preset in system, also can choose a kind of snapshot creation mode according to actual conditions and come.
If choose a kind of snapshot creation mode according to actual conditions to have come, so further comprising the steps of before the new snapshot creating primary template:
Delete original snapshot time or before obtain its establishment mode; Directly carry out according to the establishment mode of the original snapshot got when creating new snapshot.
Wherein, the establishment mode of original snapshot is the establishment mode of snapshot before virtual machine refitting.Such as, the establishment mode of original snapshot be adopt lvm to carry snapshot functions to carry out the establishment of snapshot, when deleting original snapshot, first need the establishment mode obtaining original snapshot, then new snapshot also adopts this kind of mode to create; And for example, the establishment mode of original snapshot is adopt qemu-img instrument to generate the snapshot of qcow2 form to carry out the establishment of snapshot, obtain this establishment mode when deleting original snapshot, then new snapshot also adopts qemu-img instrument to generate the snapshot of qcow2 form to carry out the establishment of snapshot.
When system is reset, directly can use the To Template in physical machine, because after template is downloaded to physical machine, template can be modified to a reading mode, also namely, each template in physical machine can keep the data of initial downloaded, thus data accuracy when can ensure that system is reset, without the need to repeated downloads template, thus save the time of dummy machine system refitting.
With reference to Fig. 3, the virtual machine creation system embodiment one of the application is shown, comprises request receiving module 10, To Template searches module 20 and snapshot creation module 40.
Request receiving module 10, for receiving the request creating virtual machine, extracts the To Template information comprised in described request.
To Template searches module 20, for the To Template corresponding according to described To Template information searching.Preferably, To Template is searched module 20 and is comprised query unit, searches all templates corresponding with described target physical machine in the mapping table prestored, and what record in described mapping table is each physical machine and the corresponding relation of the template be stored therein; And the To Template with described To Template information matches is chosen in the described all templates found.
Snapshot creation module 40, for creating the snapshot of described To Template, is set to the virtual disk of virtual machine, generating virtual machines configuration information by described snapshot.Preferably, snapshot creation module 40 can also comprise establishment mode extraction unit, for extracting the snapshot creation mode creating and comprise in the request of virtual machine; The snapshot of described To Template is created according to described snapshot creation mode.
Preferably, system also comprises download module, and for before receiving the request creating virtual machine, the template-setup of described download in physical machine, and is a reading mode by downloads template.
When virtual machine creating is by when independently physical machine completes, the modules of the virtual machine creation system of the application can be set directly in this physical machine.
If when virtual machine creating is completed jointly by the physical machine of cluster form, the virtual machine creation system of the application can all be arranged in the physical machine as host node, is completed the establishment of virtual machine by transmission instruction to the mode of other physical machine.Be understandable that, in such cases, request receiving module 10 in the virtual machine creation system of the application and To Template are searched in the physical machine that module 20 can be arranged on as host node, and in snapshot creation module 40 can be arranged on as ordinary node simultaneously other physical machine and as in the physical machine of host node, the request creating virtual machine is received by the physical machine as host node, and carry out searching of To Template, the process of snapshot creation is then by needing the physical machine creating virtual machine.
With reference to Fig. 4, the virtual machine refitting system embodiment of the application is shown, comprises control module 61, original snapshot processing module 63, template search module 65 and snapshot creation module 67.
Control module 61, for closing target virtual machine.
Original snapshot processing module 63, for deleting the original snapshot as described target virtual machine disk.
Template searches module 65, for searching primary template corresponding to described target virtual machine in the physical machine at described target virtual machine place.
Snapshot creation module 67, for creating the new snapshot of described primary template, is set to the virtual disk of the virtual machine after resetting, generating virtual machines configuration information by described new snapshot, complete the system refitting of virtual machine.
Preferably, this system also comprises original establishment mode acquisition module, and for obtaining the establishment mode of original snapshot, the establishment mode according to described original snapshot creates new snapshot.
In the virtual machine creation method of the application and system after receiving the request creating virtual machine, first search in target physical machine and whether include To Template, if have, To Template then can be directly used to complete the establishment of virtual machine, if no, then just To Template is kept in physical machine after this To Template of download.For any template, in repeatedly use procedure, only can when using first once downloading process, the virtual machine of follow-up any this template of use can share this template, thus greatly reducing the time of this template establishment virtual machine of follow-up use, the I/O operation simultaneously avoided repeatedly affects other virtual machines in physical machine.
Secondly, adopt the mode of mapping table to judge whether there is To Template in target physical machine, can the time of searching be reduced, thus shorten the time of virtual machine creating further.
Further, carrying out system refitting by the direct original module be stored in physical machine in the virtual machine reloading method of the application and system, without the need to again obtaining template, therefore can realize system refitting fast.
Concrete, because module data is stored in physical machine, template data size can not affect the time creating virtual machine.Owing to employing the template in physical machine, during establishment virtual machine, each physical machine only needs access template base, saves a large amount of network bandwidths, simultaneously owing to creating the read-write of snapshot just to snapshot metadata, IO amount can think substantially constant, because this reducing IO expense.Such as, from the template establishment virtual machine of a 300G size, raw mode needs all to copy.Under the environment using gigabit networking, approximately need 300G/100MB/s=3000s=50min, even if under this locality has snapshot not need the condition of network, the time of the data of complete diskcopy 300G also needs dozens of minutes.And when adopting the virtual machine of snapshot and there is the template in physical machine, the time creating virtual machine just creates snapshot and some extra supervision time, approximately only need more than 10 seconds; In addition also approximately more than 10 seconds are needed to virtual machine refitting system.
Secondly, because all magnetic disk of virtual machine are all the snapshots of shared template, make primary data only save portion, decrease the storage overhead of disk.In the application of webserver class, be mostly operating as network operation, IO amount is less, and this just makes the memory capacity of snapshot actual needs very little.Such as, the virtual machine of 100 10G sizes, if use common mode to create virtual machine, the storage space of about needs 100 × 10G=1T, if use traditional virtual machine snapshot to realize refitting system, also need, for a initial snapshot of each virtual machine creating, to need 1T+100 × 5G=1.5T approximately altogether; And use virtual machine creation method and the system reloading method of the application, in most cases only need 10G+100 × 5G=510G can meet memory requirement completely.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the mode that the application can add required general hardware platform by software and realizes.Based on such understanding, the technical scheme of the application can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in some part of each embodiment of the application or embodiment.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for device or system embodiment, because it is substantially similar to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.Apparatus and system embodiment described above is only schematic, the wherein said unit illustrated as separating component or can may not be and physically separates, parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of module wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
The virtual machine creation method provided the application above and system, virtual machine reloading method and system are described in detail, apply specific case herein to set forth the principle of the application and embodiment, the explanation of above embodiment is just for helping method and the core concept thereof of understanding the application; Meanwhile, for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application.

Claims (10)

1. a virtual machine creation method, is characterized in that, comprises the following steps:
Receive the request creating virtual machine, extract the To Template information comprised in described request;
In the mapping table prestored, search corresponding To Template according to described To Template information, what record in described mapping table is each physical machine and the corresponding relation of the template be stored therein;
Create the snapshot of described To Template, and described snapshot is set to the virtual disk of virtual machine, generating virtual machines configuration information;
When the request creating virtual machine comprises the target physical machine information of the establishment virtual machine of specifying, describedly in the mapping table prestored, search corresponding To Template according to described To Template information and comprise: in the mapping table prestored, search all templates corresponding with described target physical machine, in the described all templates found, choose the To Template with described To Template information matches.
2. virtual machine creation method as claimed in claim 1, is characterized in that, the described request receiving establishment virtual machine receives by needing the target physical machine creating virtual machine; Or
The described request receiving establishment virtual machine receives by needing the physical machine created outside the target physical machine of virtual machine.
3. virtual machine creation method as claimed in claim 1, is characterized in that, when in the request creating virtual machine during non-intended target physical machine, describedly in the mapping table prestored, searches corresponding To Template according to described To Template information and comprises:
The physical machine corresponding with all alternative target templates of described To Template information matches and all alternative target templates is searched in the mapping table prestored, from the described all physical machine found, choose a physical machine, described in alternative target template in the physical machine that is selected be To Template.
4. virtual machine creation method as claimed in claim 3, it is characterized in that, described mapping table is stored in the physical machine as host node.
5. virtual machine creation method as claimed in claim 1, it is characterized in that, the snapshot of the described To Template of described establishment comprises:
Extract the snapshot creation mode creating and comprise in the request of virtual machine;
The snapshot of described To Template is created according to described snapshot creation mode.
6. the virtual machine creation method as described in any one of claim 1 to 5, is characterized in that, described method also comprises:
Before receiving the request creating virtual machine, the template-setup of described download in physical machine, and is a reading mode by downloads template.
7. virtual machine creation method as claimed in claim 6, is characterized in that, also comprise after in described downloads template to physical machine:
Record the template of described download and store the physical machine corresponding relation of described downloads template.
8. a virtual machine creation system, is characterized in that, comprising:
Request receiving module, for receiving the request creating virtual machine, extracts the To Template information comprised in described request;
To Template searches module, and for searching corresponding To Template in the mapping table prestored according to described To Template information, what record in described mapping table is each physical machine and the corresponding relation of the template be stored therein;
Snapshot creation module, for creating the snapshot of described To Template, is set to the virtual disk of virtual machine, generating virtual machines configuration information by described snapshot;
When the request creating virtual machine comprises the target physical machine information of the establishment virtual machine of specifying, described To Template is searched module and is comprised: query unit, for searching all templates corresponding with described target physical machine according to described To Template information in the mapping table prestored, in the described all templates found, choose the To Template with described To Template information matches.
9. virtual machine creation system as claimed in claim 8, it is characterized in that, described snapshot creation module comprises:
Establishment mode extraction unit, for extracting the snapshot creation mode creating and comprise in the request of virtual machine; The snapshot of described To Template is created according to described snapshot creation mode.
10. the virtual machine creation system as described in any one of claim 8 to 9, is characterized in that, described system also comprises:
Download module, for before receiving the request creating virtual machine, the template-setup of described download in physical machine, and is a reading mode by downloads template.
CN201210214521.8A 2012-06-25 2012-06-25 Virtual machine creation method and system, virtual machine reloading method and system Active - Reinstated CN102799464B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210214521.8A CN102799464B (en) 2012-06-25 2012-06-25 Virtual machine creation method and system, virtual machine reloading method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210214521.8A CN102799464B (en) 2012-06-25 2012-06-25 Virtual machine creation method and system, virtual machine reloading method and system

Publications (2)

Publication Number Publication Date
CN102799464A CN102799464A (en) 2012-11-28
CN102799464B true CN102799464B (en) 2015-11-11

Family

ID=47198579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210214521.8A Active - Reinstated CN102799464B (en) 2012-06-25 2012-06-25 Virtual machine creation method and system, virtual machine reloading method and system

Country Status (1)

Country Link
CN (1) CN102799464B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034526B (en) * 2012-12-06 2016-04-13 中国电信股份有限公司 A kind of implementation method of virtualization services and device
CN103200255B (en) * 2013-03-28 2016-04-20 汉柏科技有限公司 A kind of method and device virtual server being carried out to automation arrangement
CN103399781B (en) * 2013-08-02 2016-08-17 华为技术有限公司 Cloud Server and virtual machine management method thereof
CN104348881B (en) * 2013-08-08 2018-11-30 中国电信股份有限公司 User resources division methods and device in cloud management platform
CN104484218B (en) 2014-11-18 2017-11-17 华为技术有限公司 A kind of method, apparatus and system of the displaying of virtual machine title
CN105740003A (en) * 2014-12-11 2016-07-06 中兴通讯股份有限公司 Method and device for recovering virtual machine, as well as method and device for upgrading virtual machine
CN104407916A (en) * 2014-12-15 2015-03-11 北京国双科技有限公司 Cloning method and device of virtual machine
CN104468836B (en) * 2014-12-29 2019-01-18 成都极驰科技有限公司 Virtual disk creation method and device and distributed memory system
CN106304144A (en) * 2015-06-23 2017-01-04 中兴通讯股份有限公司 Virtualization core gateway beginning methods, devices and systems
CN106681744A (en) * 2015-11-06 2017-05-17 中兴通讯股份有限公司 Virtual machine upgrading method and device
CN105468433B (en) * 2015-11-19 2019-03-29 北京北信源软件股份有限公司 A kind of acquisition methods and system of magnetic disk of virtual machine data
CN106201648A (en) * 2016-06-27 2016-12-07 浪潮电子信息产业股份有限公司 A kind of virtual machine creation method and device
CN106775957A (en) * 2017-01-20 2017-05-31 郑州云海信息技术有限公司 A kind of virtual machine snapshot implementation method
CN107643941A (en) * 2017-10-12 2018-01-30 郑州云海信息技术有限公司 The method and apparatus that virtual machine is managed in cloud data system
CN107995319B (en) * 2018-01-08 2021-05-18 迈普通信技术股份有限公司 Virtual device configuration method and network device
CN108762885B (en) * 2018-04-27 2023-01-20 北京奇艺世纪科技有限公司 Virtual machine creating method and device, management equipment and terminal equipment
CN109933405A (en) * 2019-01-09 2019-06-25 平安科技(深圳)有限公司 Virtual machine creation method and device, electronic equipment, storage medium
CN110554906A (en) * 2019-09-10 2019-12-10 中国工商银行股份有限公司 virtual machine configuration management method and device
CN110968399B (en) * 2019-12-18 2023-09-22 腾讯科技(深圳)有限公司 Virtual machine reloading method and device and computer readable storage medium
CN110990127B (en) * 2019-12-23 2023-05-12 深信服科技股份有限公司 Automatic deployment method, device, equipment and storage medium for virtual machine
CN112162830B (en) * 2020-10-30 2021-11-09 北京易捷思达科技发展有限公司 Quick starting method of virtual machine, storage medium and terminal
CN112817695A (en) * 2021-02-07 2021-05-18 上海英方软件股份有限公司 Method and system for automatically deploying virtual machine on Openstack platform
CN113590272A (en) * 2021-09-30 2021-11-02 武汉四通信息服务有限公司 Virtual machine deployment method, device, electronic device and storage medium
CN117093332B (en) * 2023-10-20 2024-02-27 杭州优云科技有限公司 Method and device for realizing cloning of virtual machine
CN117130980B (en) * 2023-10-24 2024-02-27 杭州优云科技有限公司 Virtual machine snapshot management method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1818873A (en) * 2005-02-11 2006-08-16 戴尔产品有限公司 System and method for centralized software management in virtual machines
CN102185928A (en) * 2011-06-01 2011-09-14 广州杰赛科技股份有限公司 Method for creating virtual machine in cloud computing system and cloud computing system
CN102214118A (en) * 2010-04-08 2011-10-12 中国移动通信集团公司 Method, system and device for controlling virtual machine (VM)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8966474B2 (en) * 2007-04-30 2015-02-24 Hewlett-Packard Development Company, L.P. Managing virtual machines using shared image
US8438349B2 (en) * 2009-08-21 2013-05-07 Symantec Corporation Proxy backup of virtual disk image files on NAS devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1818873A (en) * 2005-02-11 2006-08-16 戴尔产品有限公司 System and method for centralized software management in virtual machines
CN102214118A (en) * 2010-04-08 2011-10-12 中国移动通信集团公司 Method, system and device for controlling virtual machine (VM)
CN102185928A (en) * 2011-06-01 2011-09-14 广州杰赛科技股份有限公司 Method for creating virtual machine in cloud computing system and cloud computing system

Also Published As

Publication number Publication date
CN102799464A (en) 2012-11-28

Similar Documents

Publication Publication Date Title
CN102799464B (en) Virtual machine creation method and system, virtual machine reloading method and system
US9870288B2 (en) Container-based processing method, apparatus, and system
US9811369B2 (en) Method and system for physical computer system virtualization
US8370835B2 (en) Method for dynamically generating a configuration for a virtual machine with a virtual hard disk in an external storage device
CN102402446B (en) Method and device for installing application software
US10303458B2 (en) Multi-platform installer
US8738883B2 (en) Snapshot creation from block lists
EP2726977B1 (en) Virtual machine image analysis
CN101650660B (en) Booting a computer system from central storage
US10318275B2 (en) Software update apparatus and method in virtualized environment
EP3518099B1 (en) Installation of operating system
US20160162302A1 (en) Fast initiation of workloads using memory-resident post-boot snapshots
CN108073423B (en) Accelerator loading method and system and accelerator loading device
CN110347483B (en) Method and device for migrating physical machine to virtual machine and storage medium
EP3432132B1 (en) Data storage method and device
US11709692B2 (en) Hot growing a cloud hosted block device
CN104182257A (en) Application software installation method and device
US11150981B2 (en) Fast recovery from failures in a chronologically ordered log-structured key-value storage system
US20140123122A1 (en) System and method for virtual machine offline patching without mount the virtual disk
CN108062239B (en) Accelerator loading method and system and accelerator loading device
CN103176832B (en) One kind UNIX operating system runs method and the device of virtual opetrating system
CN117170802A (en) Method, system, equipment and medium for rapidly manufacturing operating system mirror image based on information creation platform
WO2018028321A1 (en) Method and apparatus for managing virtual external storage device, and terminal
US10102020B2 (en) Methods, systems, and computer readable media for virtual machine (VM) deployment using read-only memory
CN103729233A (en) Multiple virtual machines management method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151111

Termination date: 20190625

RR01 Reinstatement of patent right
RR01 Reinstatement of patent right

Former decision: termination of patent right due to unpaid annual fee

Former decision publication date: 20200623