CN103473065A - Virtual machine creation method capable of rapidly restoring system disk - Google Patents

Virtual machine creation method capable of rapidly restoring system disk Download PDF

Info

Publication number
CN103473065A
CN103473065A CN2013104304228A CN201310430422A CN103473065A CN 103473065 A CN103473065 A CN 103473065A CN 2013104304228 A CN2013104304228 A CN 2013104304228A CN 201310430422 A CN201310430422 A CN 201310430422A CN 103473065 A CN103473065 A CN 103473065A
Authority
CN
China
Prior art keywords
virtual machine
host
snapshot
image
local storage
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
Application number
CN2013104304228A
Other languages
Chinese (zh)
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.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud 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 G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN2013104304228A priority Critical patent/CN103473065A/en
Publication of CN103473065A publication Critical patent/CN103473065A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to the technical field of cloud computing, in particular to a virtual machine creation method capable of rapidly restoring a system disk. The method comprises the following steps: uploading a prepared virtual machine image into an NFS (Network File System) server for saving; mounting the NFS server on a host machine in a shared storage way; copying a virtual machine master image into a specified local storage directory of the host machine; creating an external snapshot for a template image in the specified local storage directory; creating a virtual machine by using an external snapshot file, and rapidly restoring the virtual machine system disk. The invention provides the virtual machine creation method capable of rapidly restoring the system disk, so that the virtual machine can be restored to a creation state within seconds at any time; the method can be applied to creation of virtual machines.

Description

A kind of but virtual machine creating method of fast restore system disk
Technical field
The present invention relates to the cloud computing technology field, but refer to especially a kind of virtual machine creating method of fast restore system disk.
Background technology
By the virtual machine of different librarian uses, consider privacy of user data and security of system for often, be necessary system disk is reduced.The method that can be used at present the reduction of dummy machine system dish has two kinds.First method is to use the software of the smart class of reduction, and at first this method can do a backup to the primary data of system disk, after each operating system is restarted, and state when system disk is reverted to backup; This method has following shortcoming: 1, the Backup Data of system disk can take the space of virtual machine disk, causes extra waste of storage space; 2, reducing after the each shutdown of software of a smart class start more all can the reduction of executive system dish, can not carry out selectively reduction; 3, the recovery time is long.
Second method is to create snapshot after virtual machine creating is complete, when needs are reduced to system disk, uses this snapshot to revert to original state; This method has following shortcoming: 1, the fast note of virtual machine takies the extra disk space of host; 2, the recovery time is long.
In order to meet virtual machine fast restore system disk to when just creating and avoid waste and the long problem of reduction event of storage resources, but need a kind of virtual machine creating method of fast restore system disk.
Summary of the invention
But the technical matters that the present invention solves is to provide a kind of virtual machine creating method of fast restore system disk, solve the problems such as existing system method of reducing waste storage resources, recovery time be very long, the present invention has also realized needing restoring system dish at any time according to the user in addition, in reduction process the time very short, can reach second the effect of level reduction.
The technical scheme that the present invention solves the problems of the technologies described above is:
Comprise the steps:
Step 1: the virtual machine image of making is uploaded in nfs server and preserves;
Step 2: then in the mode of sharing storage, nfs server is mounted to host;
Step 3: virtual machine mother matrix mirror-image copies is stored to assigned catalogue to host this locality; If had this mother matrix mirror image above the local storage of host assigned catalogue, abandoned;
Step 4: the template mirror image in this locality storage assigned catalogue is created to outside snapshot;
Step 5: utilize outside snapshot document to create virtual machine and fast restore dummy machine system dish.
Described virtual machine creating process is as follows:
(1) copy virtual machine image file to the local storage directory 1 of host from nfs server;
(2) image file is done to outside snapshot, and snapshot document is saved in to the local storage directory 2 of host;
(3) prepare start the needed configuration file of virtual machine and start virtual machine;
(4) be virtual machine carry storage volume, preserve as permanent data.
Described dummy machine system dish reduction process is as follows:
(1) storage volume of unloading virtual machine;
(2) hard closing virtual machine;
(3) delete the outside snapshot document in the local storage directory 2 of the corresponding host of virtual machine;
(4) utilize the mother matrix mirror image in local storage directory 1 again to create outside snapshot;
(5) restart virtual machine;
(6) storage volume of preserving permanent data before carry.
Described mother matrix mirror image is the original image file of preparing while creating virtual machine.
Described outside snapshot refers to the instrument that the Virtual Machine Manager platform provides for virtual machine image file, the snapshot document that utilizes it to create starts virtual machine, only can revise snapshot document during the operations such as the user is newly-built in virtual machine inside, deletion, revised file, and can not have influence on the mother matrix mirror image.
Adopt method of the present invention to create virtual machine, when carrying out system reducing, without depending on restore software, storage resources avoids waste.Utilize outside snapshot document to create virtual machine and fast restore dummy machine system dish, realized needing restoring system dish at any time according to the user.Method of the present invention can shorten the recovery time, can reach second effect of level reduction.
The accompanying drawing explanation
Below in conjunction with accompanying drawing, the present invention is further described:
Fig. 1 is the inventive method process flow diagram;
Fig. 2 is that the present invention creates the virtual machine process flow diagram;
Fig. 3 is restoring system dish process flow diagram of the present invention.
Embodiment
Refer to accompanying drawing, at first the present invention for example prepares an independent physical machine, as nfs server (IP is 20.251.32.19, and the user can customize), has proceeded as follows building of nfs server:
Step 1: game server, establishment/sdb file
#mkdir?/sdb
#mkdir?/sdb/images
#mkdir?/sdb/buckets_xm
#mkdir?/sdb/isos
Step 2: editor/etc/exports, add following content:
#vi?/etc/exports
/sdb*(rw,no_root_squash)
Step 3: start the nfs service
#/etc/init.d/nfs?start
Step 4: the nfs service is added to the starting up
#chkconfig--add/etc/init.d/nfs
#chkconfig--level2345nfs?on
Then enter host carry nfs server to local:
Step 1: login host server, check whether to access the nfs service.
#showmount-e20.251.32.19
Step 2: carry NFS is to this locality/sharefiles catalogue
#mount?-t?nfs?-o?vers=320.251.32.19:/sdb/sharefiles
Step 3: the NFS automatic carry of starting shooting is set
#echo″mount?-t?nfs?-o?vers=3,nolock20.251.32.19:/sdb/sharefiles″>>/etc/rc.local
Through above step, guaranteed that nfs server can provide normal service for host, then create virtual machine, utilize dd order or cp order that the template mirror-image copies is arrived below the storage/instances catalogue of host this locality:
dd?if=/sharefiles/images/emi-xxxxxxxx?of=/instances/cache
Carry out " the female mirror path dummy machine system of qemu-img create-f qcow2-b mirror image name " and create outside snapshot, specific code is as follows:
Figure BDA0000383972600000041
Figure BDA0000383972600000051
Then prepare to start virtual machine configuration libvirt.xml, code is as follows:
Figure BDA0000383972600000052
Figure BDA0000383972600000061
Finally, according to virtual machine configuration, outside snapshot document and mother matrix image starting operation virtual machine, code snippet is as follows:
Figure BDA0000383972600000062
End user gets final product by creating storage volume and being mounted to the virtual machine use.
But completed the virtual machine creating of fast restore system disk according to the step of front, process as for dummy machine system dish Quick-return is by deleting the existing outside snapshot document of virtual machine, again create an outside snapshot document by the mother matrix mirror image in addition, creating outside snapshot processes, to catch up with face the same, and this process almost can complete within 1 second, reached the requirement of fast restore system disk.

Claims (7)

1. but the virtual machine creating method of a fast restore system disk is characterized in that:
Comprise the steps:
Step 1: the virtual machine image of making is uploaded in nfs server and preserves;
Step 2: then in the mode of sharing storage, nfs server is mounted to host;
Step 3: virtual machine mother matrix mirror-image copies is stored to assigned catalogue to host this locality; If had this mother matrix mirror image above the local storage of host assigned catalogue, abandoned;
Step 4: the template mirror image in this locality storage assigned catalogue is created to outside snapshot;
Step 5: utilize outside snapshot document to create virtual machine and fast restore dummy machine system dish.
2. virtual machine creating method according to claim 1, it is characterized in that: described virtual machine creating process is as follows:
(1) copy virtual machine image file to the local storage directory 1 of host from nfs server;
(2) image file is done to outside snapshot, and snapshot document is saved in to the local storage directory 2 of host;
(3) prepare start the needed configuration file of virtual machine and start virtual machine;
(4) be virtual machine carry storage volume, preserve as permanent data.
3. virtual machine creating method according to claim 1, it is characterized in that: described dummy machine system dish reduction process is as follows:
(1) storage volume of unloading virtual machine;
(2) hard closing virtual machine;
(3) delete the outside snapshot document in the local storage directory 2 of the corresponding host of virtual machine;
(4) utilize the mother matrix mirror image in local storage directory 1 again to create outside snapshot;
(5) restart virtual machine;
(6) storage volume of preserving permanent data before carry.
4. virtual machine creating method according to claim 2, it is characterized in that: described dummy machine system dish reduction process is as follows:
(1) storage volume of unloading virtual machine;
(2) hard closing virtual machine;
(3) delete the outside snapshot document in the local storage directory 2 of the corresponding host of virtual machine;
(4) utilize the mother matrix mirror image in local storage directory 1 again to create outside snapshot;
(5) restart virtual machine;
(6) storage volume of preserving permanent data before carry.
5. according to the described virtual machine creating method of claim 1 to 4 any one, it is characterized in that: described mother matrix mirror image is the original image file of preparing while creating virtual machine.
6. according to the described virtual machine creating method of claim 1 to 4 any one, it is characterized in that: described outside snapshot refers to the instrument that the Virtual Machine Manager platform provides for virtual machine image file, the snapshot document that utilizes it to create starts virtual machine, only can revise snapshot document during the operations such as the user is newly-built in virtual machine inside, deletion, revised file, and can not have influence on the mother matrix mirror image.
7. virtual machine creating method according to claim 5, it is characterized in that: described outside snapshot refers to the instrument that the Virtual Machine Manager platform provides for virtual machine image file, the snapshot document that utilizes it to create starts virtual machine, only can revise snapshot document during the operations such as the user is newly-built in virtual machine inside, deletion, revised file, and can not have influence on the mother matrix mirror image.
CN2013104304228A 2013-09-18 2013-09-18 Virtual machine creation method capable of rapidly restoring system disk Pending CN103473065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013104304228A CN103473065A (en) 2013-09-18 2013-09-18 Virtual machine creation method capable of rapidly restoring system disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013104304228A CN103473065A (en) 2013-09-18 2013-09-18 Virtual machine creation method capable of rapidly restoring system disk

Publications (1)

Publication Number Publication Date
CN103473065A true CN103473065A (en) 2013-12-25

Family

ID=49797937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013104304228A Pending CN103473065A (en) 2013-09-18 2013-09-18 Virtual machine creation method capable of rapidly restoring system disk

Country Status (1)

Country Link
CN (1) CN103473065A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761168A (en) * 2014-01-26 2014-04-30 上海爱数软件有限公司 Method for mounting backup virtual machine based on nfs volume
CN104111878A (en) * 2014-02-20 2014-10-22 西安未来国际信息股份有限公司 Automatic hadoop cluster restoration technology on basis of snapshots of virtual machines
CN104360892A (en) * 2014-10-21 2015-02-18 普华基础软件股份有限公司 System and method for creating virtual machine
CN104407931A (en) * 2014-10-28 2015-03-11 国云科技股份有限公司 Method for obtaining mirror image of damaged system disk of virtual machine
CN105279011A (en) * 2015-11-17 2016-01-27 国云科技股份有限公司 Method for performing system restoring on virtual machine according to mirror image
CN105306594A (en) * 2015-11-19 2016-02-03 国云科技股份有限公司 Method for managing virtual unit through multiple strategies
CN106201654A (en) * 2016-06-30 2016-12-07 国云科技股份有限公司 A kind of rescue method of dummy machine system
CN106775957A (en) * 2017-01-20 2017-05-31 郑州云海信息技术有限公司 A kind of virtual machine snapshot implementation method
CN106778246A (en) * 2016-12-01 2017-05-31 北京奇虎科技有限公司 The detection method and detection means of sandbox virtualization
WO2017173922A1 (en) * 2016-04-08 2017-10-12 中兴通讯股份有限公司 Method and apparatus for upgrading virtual machine
CN107818029A (en) * 2017-11-07 2018-03-20 上海爱数信息技术股份有限公司 A kind of cloud hard disc data recovers the automated testing method of uniformity
CN107968794A (en) * 2016-10-18 2018-04-27 中兴通讯股份有限公司 A kind of virtual drive hanging method and system, server, terminal
CN108415756A (en) * 2017-10-25 2018-08-17 国云科技股份有限公司 A kind of cloud disk automatic recovery method of cloud platform virtual machine
CN108733387A (en) * 2018-05-23 2018-11-02 郑州云海信息技术有限公司 A kind of system and method for realizing the installation of Windows system automations
CN109117251A (en) * 2018-08-09 2019-01-01 郑州云海信息技术有限公司 A kind of implementation method, device and the readable storage medium storing program for executing of virtual machine recycle bin
CN109117307A (en) * 2018-07-25 2019-01-01 郑州云海信息技术有限公司 A kind of virtual-machine data restoring method and its relevant device
CN109313565A (en) * 2016-05-02 2019-02-05 诺基亚通信公司 Snapshot creation in virtual network environment
CN115454572A (en) * 2022-09-20 2022-12-09 北京志凌海纳科技有限公司 Method and system for constructing disk image of virtual machine based on Docker tool

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2445105A (en) * 2006-12-20 2008-06-25 Symantec Operating Corp Backing up continuously running applications without interruption
US7523277B1 (en) * 2005-03-30 2009-04-21 Symantec Operating Corporation Transient point-in-time images for continuous data protection
US20090260007A1 (en) * 2008-04-15 2009-10-15 International Business Machines Corporation Provisioning Storage-Optimized Virtual Machines Within a Virtual Desktop Environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7523277B1 (en) * 2005-03-30 2009-04-21 Symantec Operating Corporation Transient point-in-time images for continuous data protection
GB2445105A (en) * 2006-12-20 2008-06-25 Symantec Operating Corp Backing up continuously running applications without interruption
US20090260007A1 (en) * 2008-04-15 2009-10-15 International Business Machines Corporation Provisioning Storage-Optimized Virtual Machines Within a Virtual Desktop Environment

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761168A (en) * 2014-01-26 2014-04-30 上海爱数软件有限公司 Method for mounting backup virtual machine based on nfs volume
CN103761168B (en) * 2014-01-26 2017-06-13 上海爱数信息技术股份有限公司 It is a kind of that the method for carrying backup virtual machine is wrapping with based on nfs
CN104111878A (en) * 2014-02-20 2014-10-22 西安未来国际信息股份有限公司 Automatic hadoop cluster restoration technology on basis of snapshots of virtual machines
CN104360892A (en) * 2014-10-21 2015-02-18 普华基础软件股份有限公司 System and method for creating virtual machine
CN104360892B (en) * 2014-10-21 2019-04-09 普华基础软件股份有限公司 Create the system and method for virtual machine
CN104407931A (en) * 2014-10-28 2015-03-11 国云科技股份有限公司 Method for obtaining mirror image of damaged system disk of virtual machine
CN105279011A (en) * 2015-11-17 2016-01-27 国云科技股份有限公司 Method for performing system restoring on virtual machine according to mirror image
CN105306594A (en) * 2015-11-19 2016-02-03 国云科技股份有限公司 Method for managing virtual unit through multiple strategies
CN107273146B (en) * 2016-04-08 2021-11-19 中兴通讯股份有限公司 Virtual machine upgrading method and device
WO2017173922A1 (en) * 2016-04-08 2017-10-12 中兴通讯股份有限公司 Method and apparatus for upgrading virtual machine
CN107273146A (en) * 2016-04-08 2017-10-20 中兴通讯股份有限公司 Virtual machine upgrade method and device
CN109313565A (en) * 2016-05-02 2019-02-05 诺基亚通信公司 Snapshot creation in virtual network environment
CN106201654A (en) * 2016-06-30 2016-12-07 国云科技股份有限公司 A kind of rescue method of dummy machine system
CN107968794A (en) * 2016-10-18 2018-04-27 中兴通讯股份有限公司 A kind of virtual drive hanging method and system, server, terminal
CN106778246A (en) * 2016-12-01 2017-05-31 北京奇虎科技有限公司 The detection method and detection means of sandbox virtualization
CN106775957A (en) * 2017-01-20 2017-05-31 郑州云海信息技术有限公司 A kind of virtual machine snapshot implementation method
CN108415756A (en) * 2017-10-25 2018-08-17 国云科技股份有限公司 A kind of cloud disk automatic recovery method of cloud platform virtual machine
CN108415756B (en) * 2017-10-25 2022-08-23 国云科技股份有限公司 Cloud disk automatic recovery method of cloud platform virtual machine
CN107818029A (en) * 2017-11-07 2018-03-20 上海爱数信息技术股份有限公司 A kind of cloud hard disc data recovers the automated testing method of uniformity
CN107818029B (en) * 2017-11-07 2020-06-16 上海爱数信息技术股份有限公司 Automatic test method for cloud hard disk data recovery consistency
CN108733387A (en) * 2018-05-23 2018-11-02 郑州云海信息技术有限公司 A kind of system and method for realizing the installation of Windows system automations
CN109117307A (en) * 2018-07-25 2019-01-01 郑州云海信息技术有限公司 A kind of virtual-machine data restoring method and its relevant device
CN109117251A (en) * 2018-08-09 2019-01-01 郑州云海信息技术有限公司 A kind of implementation method, device and the readable storage medium storing program for executing of virtual machine recycle bin
CN115454572A (en) * 2022-09-20 2022-12-09 北京志凌海纳科技有限公司 Method and system for constructing disk image of virtual machine based on Docker tool

Similar Documents

Publication Publication Date Title
CN103473065A (en) Virtual machine creation method capable of rapidly restoring system disk
US11789823B2 (en) Selective processing of file system objects for image level backups
US11741046B2 (en) Method and apparatus for creating system disk snapshot of virtual machine
US11513926B2 (en) Systems and methods for instantiation of virtual machines from backups
US20210011817A1 (en) Virtual Machine Recovery Method and Virtual Machine Management Device
US9436724B2 (en) Migrating data in tables in a database
AU2014374256B2 (en) Systems and methods for improving snapshot performance
US8281093B1 (en) Systems and methods for creating consolidated backups of snapshot hierarchies
US20170344433A1 (en) Apparatus and method for data migration
CN104216793B (en) Application Backup, the method and apparatus recovered
US9558076B2 (en) Methods and systems of cloud-based disaster recovery
US20150227605A1 (en) Information processing terminal, synchronization control method, and computer-readable recording medium
EP3051408B1 (en) Data operating method and device
US8565545B1 (en) Systems and methods for restoring images
US10223206B1 (en) Method and system to detect and delete uncommitted save sets of a backup
CN105376329A (en) Remote online backup method for virtual machine
US9251020B1 (en) Systems and methods for file-level replication
CN109634625A (en) A kind of OpenStack dispositions method and system based on Clonezilla
CN112231288A (en) Log storage method and device and medium
US10719481B1 (en) Modification of historical data of file system in data storage environment
US10445183B1 (en) Method and system to reclaim disk space by deleting save sets of a backup
US10976952B2 (en) System and method for orchestrated application protection
US9489271B1 (en) User interface for restoring databases
KR102618274B1 (en) Management system for data included in a container and control method thereof
US20120131291A1 (en) Application aware snapshots

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

Application publication date: 20131225

RJ01 Rejection of invention patent application after publication