CN111240799A - Method, system, electronic device and storage medium for quickly creating incremental virtual machine on PVE platform - Google Patents

Method, system, electronic device and storage medium for quickly creating incremental virtual machine on PVE platform Download PDF

Info

Publication number
CN111240799A
CN111240799A CN201911415950.XA CN201911415950A CN111240799A CN 111240799 A CN111240799 A CN 111240799A CN 201911415950 A CN201911415950 A CN 201911415950A CN 111240799 A CN111240799 A CN 111240799A
Authority
CN
China
Prior art keywords
virtual machine
pve
platform
incremental
vmid
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
CN201911415950.XA
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.)
BEIJING SAFE-CODE TECHNOLOGY CO LTD
Original Assignee
BEIJING SAFE-CODE 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 SAFE-CODE TECHNOLOGY CO LTD filed Critical BEIJING SAFE-CODE TECHNOLOGY CO LTD
Priority to CN201911415950.XA priority Critical patent/CN111240799A/en
Publication of CN111240799A publication Critical patent/CN111240799A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Abstract

The invention relates to the technical field of virtual machines, in particular to a method, a system, electronic equipment and a storage medium for quickly creating an incremental virtual machine on a PVE platform; the invention discloses a method, a system, electronic equipment and a storage medium for quickly creating an incremental virtual machine on a PVE platform, wherein the method comprises the following steps: analyzing the storage position of a virtual machine image of the PVE platform; on a corresponding computing node of the PVE platform, remotely calling a normally created virtual machine through a management platform or an API (application programming interface) to obtain a vmid of the newly created virtual machine; covering a newly created disk image file of the system by using an incremental image file; on the PVE platform, an incremental virtual machine is quickly created for the existing QCOW2 format disk image, and the method is also suitable for importing the QCOW2 format disk image into the PVE platform.

Description

Method, system, electronic device and storage medium for quickly creating incremental virtual machine on PVE platform
Technical Field
The present invention relates to the field of virtual machine technologies, and in particular, to a method, a system, an electronic device, and a storage medium for quickly creating an incremental virtual machine on a PVE platform.
Background
ProxmoxVE is an open source virtualization product based on KVM, is called PVE for short, has the characteristics of simplicity and convenience in installation, high degree of freedom and the like, and is suitable for being applied to small-sized private clouds.
In the using process, the requirement of creating the virtual for the disk image with the existing qcow2 format exists, and the requirement of incrementally deriving the virtual machine for the existing disk image also exists, but the PVE does not provide a corresponding direct method.
Therefore, in order to solve the above problems, it is urgently needed to invent a new method, system, electronic device and storage medium for quickly creating an incremental virtual machine on a PVE platform.
Disclosure of Invention
The invention aims to: the method is also suitable for importing the disk image in the QCOW2 format into the PVE platform.
The invention provides the following scheme:
a method for quickly creating an incremental virtual machine on a PVE platform comprises the following steps:
analyzing the storage position of a virtual machine image of the PVE platform;
on a corresponding computing node of the PVE platform, remotely calling a normally created virtual machine through a management platform or an API (application programming interface) to obtain a vmid of the newly created virtual machine;
and covering the newly created disk image file of the system by using the incremental image file.
Further comprising:
and constructing a delta disk image file.
Mirror images of virtual machines in the PVE platform are respectively stored in corresponding directories according to VMIDs of the virtual machines, and the naming rule of the mirror images is vm-VMID-diskX.qcow2; wherein, VMID corresponds to VMID number of the virtual machine, and X is the disk number of the virtual machine.
Further comprising:
and covering the disk image file created by the system with the existing image file.
A system for rapidly creating an incremental virtual machine on a PVE platform, which realizes the method for rapidly creating the incremental virtual machine on the PVE platform, comprises the following steps:
the analysis module is used for analyzing the storage position of the virtual machine image of the PVE platform;
the creating module is used for remotely calling the normally created virtual machine through a management platform or an API (application programming interface) on a corresponding computing node of the PVE platform to obtain the vmid of the newly created virtual machine;
and the covering module is used for covering the newly created disk image file of the system by using the incremental image file.
Further comprising:
and the construction module is used for constructing the incremental disk image file.
The analysis module, the construction module, the creation module and the covering module are electrically connected in sequence.
Mirror images of virtual machines in the PVE platform are respectively stored in corresponding directories according to VMIDs of the virtual machines, and the naming rule of the mirror images is vm-VMID-diskX.qcow2; wherein, VMID corresponds to VMID number of the virtual machine, and X is the disk number of the virtual machine.
An electronic device comprising a memory and a processor; the memory is used for storing a computer program; the processor executes the computer program in the memory to implement the method for rapidly creating the incremental virtual machine on the PVE platform.
10. A computer readable storage medium storing a computer program for implementing the method for quickly creating an incremental virtual machine on a PVE platform when the computer program is executed by a processor.
The invention has the following beneficial effects:
the invention discloses a method, a system, electronic equipment and a storage medium for quickly creating an incremental virtual machine on a PVE platform, wherein the method comprises the following steps: analyzing the storage position of a virtual machine image of the PVE platform; on a corresponding computing node of the PVE platform, remotely calling a normally created virtual machine through a management platform or an API (application programming interface) to obtain a vmid of the newly created virtual machine; covering a newly created disk image file of the system by using an incremental image file; on the PVE platform, an incremental virtual machine is quickly created for the existing QCOW2 format disk image, and the method is also suitable for importing the QCOW2 format disk image into the PVE platform.
Drawings
FIG. 1 is a flow chart of a method for rapidly creating an incremental virtual machine on a PVE platform according to the present invention.
FIG. 2 is a block diagram of the system for rapidly creating incremental virtual machines on a PVE platform according to the present invention.
Fig. 3 is a block diagram of an electronic device according to the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Referring to fig. 1, a method for quickly creating an incremental virtual machine on a PVE platform includes the following steps:
analyzing the storage position of a virtual machine image of the PVE platform;
on a corresponding computing node of the PVE platform, remotely calling a normally created virtual machine through a management platform or an API (application programming interface) to obtain a vmid of the newly created virtual machine;
and covering the newly created disk image file of the system by using the incremental image file.
Further comprising:
and constructing a delta disk image file.
Mirror images of virtual machines in the PVE platform are respectively stored in corresponding directories according to VMIDs of the virtual machines, and the naming rule of the mirror images is vm-VMID-diskX.qcow2; wherein, VMID corresponds to VMID number of the virtual machine, and X is the disk number of the virtual machine.
Further comprising:
and covering the disk image file created by the system with the existing image file.
Referring to fig. 2, a system for quickly creating an incremental virtual machine on a PVE platform, which implements the method for quickly creating an incremental virtual machine on a PVE platform, includes:
the analysis module is used for analyzing the storage position of the virtual machine image of the PVE platform;
the creating module is used for remotely calling the normally created virtual machine through a management platform or an API (application programming interface) on a corresponding computing node of the PVE platform to obtain the vmid of the newly created virtual machine;
and the covering module is used for covering the newly created disk image file of the system by using the incremental image file.
Further comprising:
and the construction module is used for constructing the incremental disk image file.
The analysis module, the construction module, the creation module and the covering module are electrically connected in sequence.
Mirror images of virtual machines in the PVE platform are respectively stored in corresponding directories according to VMIDs of the virtual machines, and the naming rule of the mirror images is vm-VMID-diskX.qcow2; wherein, VMID corresponds to VMID number of the virtual machine, and X is the disk number of the virtual machine.
Referring to fig. 3, an electronic device includes a memory 1 and a processor 2; the memory is used for storing a computer program; the processor executes the computer program in the memory to implement the method for rapidly creating the incremental virtual machine on the PVE platform.
Further, the present embodiment also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program is used for implementing the method for quickly creating the incremental virtual machine on the PVE platform.
In this embodiment, the method, the system, the electronic device, and the storage medium for quickly creating an incremental virtual machine on a PVE platform include the following steps: analyzing the storage position of a virtual machine image of the PVE platform; on a corresponding computing node of the PVE platform, remotely calling a normally created virtual machine through a management platform or an API (application programming interface) to obtain a vmid of the newly created virtual machine; covering a newly created disk image file of the system by using an incremental image file; on the PVE platform, an incremental virtual machine is quickly created for the existing QCOW2 format disk image, and the method is also suitable for importing the QCOW2 format disk image into the PVE platform.
The method for quickly creating the incremental virtual machine on the PVE platform in this embodiment includes the specific processes: analyzing the storage position of the PVE platform virtual machine image, and finding that the virtual machine image in the PVE platform is respectively stored in the corresponding directories according to the VMID of the virtual machine, and the naming rule is vm-VMID-diskX. Wherein, VMID corresponds to VMID number of the virtual machine, and X is the disk number of the virtual machine. Therefore, when creating a delta virtual machine for an existing disk image, a corresponding delta disk image file needs to be constructed.
And remotely calling the normally created virtual machine through a management platform or an API (application programming interface) on a corresponding computing node of the PVE platform to obtain the vmid of the newly created virtual machine. And covering the disk image file created by the system with the existing image file or the incremental image file.
The command for creating the virtual machine incremental disk image file by using the qemu-img tool is as follows:
qemu-img create-f qcow2-b aaaa.qcow2;
dir:xxxx/vm-xxxx-disk0.qcow2。
the method solves the problem that the PVE platform imports the QCOW2 virtual machine, and the application of the PVE platform becomes wider.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for quickly creating an incremental virtual machine on a PVE platform is characterized by comprising the following steps:
analyzing the storage position of a virtual machine image of the PVE platform;
on a corresponding computing node of the PVE platform, remotely calling a normally created virtual machine through a management platform or an API (application programming interface) to obtain a vmid of the newly created virtual machine;
and covering the newly created disk image file of the system by using the incremental image file.
2. The method for rapidly creating an incremental virtual machine on a PVE platform according to claim 1, further comprising:
and constructing a delta disk image file.
3. The method for quickly creating an incremental virtual machine on a PVE platform according to claim 2, wherein the images of the virtual machines in the PVE platform are respectively stored in corresponding directories according to the VMID of the virtual machine, and the naming rule is vm-VMID-diskx.qcow2; wherein, VMID corresponds to VMID number of the virtual machine, and X is the disk number of the virtual machine.
4. The method for rapidly creating an incremental virtual machine on a PVE platform according to claim 3, further comprising:
and covering the disk image file created by the system with the existing image file.
5. A system for rapidly creating incremental virtual machines on PVE platform implementing the method for rapidly creating incremental virtual machines on PVE platform of claim 2, comprising:
the analysis module is used for analyzing the storage position of the virtual machine image of the PVE platform;
the creating module is used for remotely calling the normally created virtual machine through a management platform or an API (application programming interface) on a corresponding computing node of the PVE platform to obtain the vmid of the newly created virtual machine;
and the covering module is used for covering the newly created disk image file of the system by using the incremental image file.
6. The system for rapidly creating incremental virtual machines on a PVE platform according to claim 5, further comprising:
and the construction module is used for constructing the incremental disk image file.
7. The system for rapidly creating the incremental virtual machine on the PVE platform according to claim 6, wherein the analysis module, the construction module, the creation module and the covering module are electrically connected in sequence.
8. The system for rapidly creating an incremental virtual machine on a PVE platform according to claim 7, wherein the images of the virtual machines in the PVE platform are respectively stored in corresponding directories according to the VMID of the virtual machine, and the naming rule is vm-VMID-diskx.qcow2; wherein, VMID corresponds to VMID number of the virtual machine, and X is the disk number of the virtual machine.
9. An electronic device, characterized in that: comprising a memory and a processor; the memory is used for storing a computer program; the processor executes the computer program in the memory to implement the method for quickly creating an incremental virtual machine on a PVE platform as recited in any of claims 1-4.
10. A computer-readable storage medium characterized by: a computer program is stored which, when being executed by a processor, is adapted to carry out the method of rapidly creating incremental virtual machines on a PVE platform as claimed in any one of claims 1 to 4.
CN201911415950.XA 2019-12-31 2019-12-31 Method, system, electronic device and storage medium for quickly creating incremental virtual machine on PVE platform Pending CN111240799A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911415950.XA CN111240799A (en) 2019-12-31 2019-12-31 Method, system, electronic device and storage medium for quickly creating incremental virtual machine on PVE platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911415950.XA CN111240799A (en) 2019-12-31 2019-12-31 Method, system, electronic device and storage medium for quickly creating incremental virtual machine on PVE platform

Publications (1)

Publication Number Publication Date
CN111240799A true CN111240799A (en) 2020-06-05

Family

ID=70874185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911415950.XA Pending CN111240799A (en) 2019-12-31 2019-12-31 Method, system, electronic device and storage medium for quickly creating incremental virtual machine on PVE platform

Country Status (1)

Country Link
CN (1) CN111240799A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103713941A (en) * 2013-12-20 2014-04-09 汉柏科技有限公司 Method and system for cloning virtual machine mirror images based on qcow2 format
CN103970585A (en) * 2013-01-31 2014-08-06 杭州华三通信技术有限公司 Method and device for creating virtual machine
CN104636189A (en) * 2015-02-25 2015-05-20 哈尔滨工业大学 Xen-based virtual machine deployment system and Xen-based virtual machine deployment method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970585A (en) * 2013-01-31 2014-08-06 杭州华三通信技术有限公司 Method and device for creating virtual machine
CN103713941A (en) * 2013-12-20 2014-04-09 汉柏科技有限公司 Method and system for cloning virtual machine mirror images based on qcow2 format
CN104636189A (en) * 2015-02-25 2015-05-20 哈尔滨工业大学 Xen-based virtual machine deployment system and Xen-based virtual machine deployment method

Similar Documents

Publication Publication Date Title
US9542105B2 (en) Copying volumes between storage pools
US9858008B2 (en) Method to reduce flash memory IOs with host maintained address mapping table
CN107526743B (en) Method and apparatus for compressing file system metadata
US10331584B2 (en) Internal system namespace exposed through use of two local processors and controller memory buffer with two reserved areas
CN111625181B (en) Data processing method, redundant array controller of independent hard disk and data storage system
US20170177225A1 (en) Mid-level controllers for performing flash management on solid state drives
US10210109B2 (en) Pre-allocating memory buffers by physical processor and using a bitmap metadata in a control program
US20180039419A1 (en) Virtual storage pool
CN104158858A (en) Method and system for accessing distributed cluster file system
CN112748863A (en) Method, electronic device and computer program product for processing data
CN105335309A (en) Data transmission method and computer
CN104205780A (en) Data storage method and device
US20220357896A1 (en) Data processing method, apparatus, and system
US20190004721A1 (en) Method and device for storage management
CN112988060A (en) Key value storage device and method for operating key value storage device
CN103019847B (en) To the method and system that virtual-machine data is moved
TW202014912A (en) Efficient file storage and retrieval system, method and apparatus
CN111858020B (en) User resource limiting method and device and computer storage medium
US9519527B1 (en) System and method for performing internal system interface-based communications in management controller
CN111240799A (en) Method, system, electronic device and storage medium for quickly creating incremental virtual machine on PVE platform
WO2020113421A1 (en) Method for mounting file system, terminal device, and storage medium
AU2015371556A1 (en) Method for accessing a number of slave devices with registers by a master device over a network
US20160062926A1 (en) Storage control devices and method therefor to invoke address thereof
RU2666334C2 (en) Method of data processing
KR20140042426A (en) Computing system and data management method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200605