CN111045781A - Method and device for creating mirror image on cloud platform and storage medium - Google Patents
Method and device for creating mirror image on cloud platform and storage medium Download PDFInfo
- Publication number
- CN111045781A CN111045781A CN201911081427.8A CN201911081427A CN111045781A CN 111045781 A CN111045781 A CN 111045781A CN 201911081427 A CN201911081427 A CN 201911081427A CN 111045781 A CN111045781 A CN 111045781A
- Authority
- CN
- China
- Prior art keywords
- creating
- virtual machine
- cloud platform
- file
- mirror image
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Processing Or Creating Images (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a method and a device for creating a mirror image by a cloud platform and a storage medium, which are used for creating the cloud platform on line and improving the success rate of creating the mirror image. The method for creating the image by the cloud platform comprises the following steps: receiving an ISO (International organization for standardization) image file installed by an operating system uploaded by a user; creating a virtual machine through virtualization software according to the ISO mirror image file; and converting the created virtual machine into a preset format file and uploading the preset format file to the cloud platform.
Description
Technical Field
The invention relates to the technical field of cloud computing, in particular to a method and a device for creating a mirror image by a cloud platform and a storage medium.
Background
A cloud management platform (hereinafter referred to as a cloud platform) relates to a network application mode, and can uniformly manage and schedule a large number of computing resources connected by a network to form a computing resource pool for serving users as required. The service provided by the cloud platform comprises three aspects: IaaS (Infrastructure as a Service), PaaS (Platform as a Service), SaaS (Software as a Service).
The virtual machine technology is an important means for effectively managing and fully sharing physical resources, an abstraction layer can be introduced between software and hardware of a computer system, an independent operation environment is provided for upper application, and sharing and multiplexing of hardware resources are realized. Both IaaS and PaaS provided by cloud platforms need to be virtual machine based.
In the process of creating a virtual machine on a cloud platform through OpenStack software, a new mirror image is required to be created. The method comprises the steps that a user terminal establishes a mirror image through OpenStack software, an interface for establishing mirror image parameter information is called to establish the mirror image parameter information, an uploading interface is called to upload a mirror image file, however, the file format accepted by a cloud platform can only be qcow2 or raw, and therefore limitation is added to mirror image uploading. In addition, in the mirror image uploading process, each step is formed by dividing, and the time consumption of each step is not determined and unchanged, so that the problem of inconsistent connection is easily generated, and the mirror image creation is failed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for creating a mirror image by a cloud platform and a storage medium, which are used for creating the cloud platform on line and improving the success rate of creating the mirror image.
In a first aspect, a method for creating an image by a cloud platform is provided, which includes:
receiving an ISO (International organization for standardization) image file installed by an operating system uploaded by a user;
creating a virtual machine through virtualization software according to the ISO mirror image file;
and converting the created virtual machine into a preset format file and uploading the preset format file to the cloud platform.
In one embodiment, before uploading to the cloud platform after converting the created virtual machine into the preset format file, the method further includes:
and configuring the created virtual machine according to preset configuration parameters.
In an embodiment, creating a virtual machine through virtualization software according to the ISO image file specifically includes:
starting a new instance according to the ISO mirror image file;
the operating system is installed through a virtual network console VNC or SPICE console.
In an embodiment, converting the created virtual machine into a preset format file specifically includes:
calling a preset script to create a snapshot of the virtual operating system;
and aiming at the created snapshot, a preset command is operated to convert the snapshot into a preset format file.
In one embodiment, the preset command comprises a Glance Image-Update command.
The invention also provides a device for creating the mirror image by the cloud platform, which comprises the following steps:
the receiving unit is used for receiving an operating system installation ISO mirror image file uploaded by a user;
the creating unit is used for creating a virtual machine through virtualization software according to the ISO mirror image file;
and the conversion unit is used for converting the created virtual machine into a preset format file and then uploading the preset format file to the cloud platform.
In an implementation manner, the apparatus for creating an image by a cloud platform provided in the embodiment of the present invention further includes:
and the configuration unit is used for configuring the created virtual machine according to preset configuration parameters before the created virtual machine is converted into a preset format file by the conversion unit and then uploaded to the cloud platform.
In an embodiment, the creating unit is specifically configured to start a new instance according to the ISO image; the operating system is installed through a virtual network console VNC or SPICE console.
In an embodiment, the conversion unit is specifically configured to invoke a preset script to create a snapshot of the virtual operating system; and aiming at the created snapshot, a preset command is operated to convert the snapshot into a preset format file.
The present invention also provides a computing device, comprising: the cloud platform image creating method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the computer program is executed by the processor, the steps of the method for creating the image of any cloud platform are realized.
The invention also provides a computer storage medium, wherein a computer program is stored on the computer storage medium, and when being executed by a processor, the computer program realizes the steps of any method for creating the mirror image of the cloud platform.
By adopting the technical scheme, the invention at least has the following advantages:
according to the method, the device and the storage medium for creating the mirror image by the cloud platform, disclosed by the invention, aiming at the ISO mirror image file, the mirror image corresponding to the ISO mirror image file is created on line by uploading the ISO mirror image file to the server, so that the problems of file formats introduced by uploading after the mirror image is created off line, uploading failure and the like are avoided, and the success rate of creating the mirror image is improved.
Drawings
FIG. 1 is a flowchart of a method for creating an image by a cloud platform according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for creating a mirror image by a cloud platform according to an embodiment of the present invention.
Detailed Description
To further explain the technical means and effects of the present invention adopted to achieve the intended purpose, the present invention will be described in detail with reference to the accompanying drawings and preferred embodiments.
First, some terms related to the embodiments of the present invention are explained to facilitate understanding by those skilled in the art.
1. ISO is one of the storage formats for compact disc images (CD mirrors) on computers, and is commonly named after ISO in computers, also known as ISO image files, because it is a file stored according to the ISO-9660 standard on CD-ROM file systems. The optical disk has only one file in form, can truly reflect the content of the optical disk, and can be created by recording software or an image file making tool.
2. The OpenStack is an open-source cloud computing management platform project, and is formed by combining several main components to complete specific work. OpenStack supports almost all types of cloud environments, and the project aims to provide a cloud computing management platform which is simple to implement, can be expanded in a large scale, is rich and has a unified standard. OpenStack provides a solution for infrastructure as a service (IaaS) through various complementary services, each providing an API for integration.
It should be noted that the terms "first", "second", and the like in the description and the claims of the embodiments of the present invention and in the drawings described above are used for distinguishing similar objects and not necessarily for describing a particular order or sequence. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein.
Reference herein to "a plurality or a number" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In view of the above, embodiments of the present invention provide a method, an apparatus, and a storage medium for cloud platform creation, so as to solve the problem that a cloud platform cannot directly upload and use iso-format images.
As shown in fig. 1, an implementation flow diagram of a method for creating an image for a cloud platform according to an embodiment of the present invention may include the following steps:
and S11, receiving the ISO image file of the operating system installation uploaded by the user.
In specific implementation, a user can upload an operating system installation CD/DVD ISO image file to an OpenStack image service through a web page of a browser.
And S12, creating a virtual machine through virtualization software according to the received ISO image file.
In this step, a new instance is started through the ISO image uploaded by the user, that is, an instance is started from the ISO image of the operating system. The operating system is installed through a VNC (Virtual networking computing) console in an OpenStack dashboard (dash board) or a spice Protocol for Independent computing environment console.
Specifically, after the new instance is started, the installation function of the operating system may be completed according to the VNC console provided through the dashboard.
In specific implementation, after the operating system is installed, the installed operating system may be configured according to the set configuration parameters. Specifically, the operating system may be configured according to an application program that needs to be installed and according to the needs of OpenStack, for example, to a closed-init or equivalent script, start SSHD (solid state hybrid disk) Remote login/RDP (Remote Desktop Protocol) service, and the like.
And S13, converting the created virtual machine into a preset format file and uploading the preset format file to the cloud platform.
In the step, a preset script is called to create a snapshot of the virtual operating system; and aiming at the created snapshot, a preset command is operated to convert the snapshot into a preset format file. The preset command may be, but is not limited to, a company Image-Update command.
Specifically, for a newly created instance, a call script creates an instance snapshot of the instance, runs a GlanceImage-Update command, or updates snapshot information from the dashboard if the dashboard provides corresponding functionality, and converts the image type to the image type. Optionally, other metadata may also be added.
In the embodiment of the invention, aiming at the user who enables OpenStack, a mirror image creating method is provided, and a mirror image which can meet the requirement of the user is created by creating the mirror image on line. The new image is created on line by a user through an OpenStack instrument panel provided by cloud service, and by means of the function, an end user does not need an additional virtual machine management program, does not need to upload the image to OpenStack image service by oneself, and only needs to install an operating system CD/DVD ISO image file.
The invention integrates the process of mirror image creation in the form of WEB application of B/S architecture. And the uploading, compression and package injection of the ISO mirror image file are completed on the premise of not influencing a native system. And finally, generating a mirror image template which can be used by the OpenStack platform. The scattered functions of a plurality of links are reassembled in the whole process in the form of WEB pages. The mirror image uploading function which is simpler to try is completed, and the original function is supplemented and enhanced. According to the method provided by the embodiment of the invention, the ISO mirror image file is uploaded to the server, and the mirror image corresponding to the ISO mirror image file is created on line, so that the problems of file format introduced by uploading after the mirror image is created off line, uploading failure and the like are avoided, and the success rate of creating the mirror image is improved.
Based on the same technical concept, an embodiment of the present invention further provides an apparatus for creating a mirror image on a cloud platform, as shown in fig. 2, which is a schematic structural diagram of the apparatus for creating a mirror image on a cloud platform provided in the embodiment of the present invention, and the apparatus includes:
the receiving unit 21 is configured to receive an operating system installation ISO image file uploaded by a user;
a creating unit 22, configured to create a virtual machine through virtualization software according to the ISO image;
the conversion unit 23 is configured to convert the created virtual machine into a preset format file and upload the preset format file to the cloud platform.
In an implementation manner, the apparatus for creating an image by a cloud platform provided in the embodiment of the present invention further includes:
and the configuration unit is used for configuring the created virtual machine according to preset configuration parameters before the created virtual machine is converted into a preset format file by the conversion unit and then uploaded to the cloud platform.
In an embodiment, the creating unit is specifically configured to start a new instance according to the ISO image; the operating system is installed through a virtual network console VNC or SPICE console.
In an embodiment, the conversion unit is specifically configured to invoke a preset script to create a snapshot of the virtual operating system; and aiming at the created snapshot, a preset command is operated to convert the snapshot into a preset format file.
Based on the same technical concept, an embodiment of the present invention further provides a computing apparatus, including: the cloud platform image creating method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the computer program is executed by the processor, the steps of the method for creating the image of any cloud platform are realized.
Based on the same technical concept, the embodiment of the invention also provides a computer storage medium, wherein a computer program is stored on the computer storage medium, and when being executed by a processor, the computer program realizes the steps of any method for creating the mirror image of the cloud platform.
While the invention has been described in connection with specific embodiments thereof, it is to be understood that it is intended by the appended drawings and description that the invention may be embodied in other specific forms without departing from the spirit or scope of the invention.
Claims (10)
1. A method for creating an image by a cloud platform is characterized by comprising the following steps:
receiving an ISO (International organization for standardization) image file installed by an operating system uploaded by a user;
creating a virtual machine through virtualization software according to the ISO mirror image file;
and converting the created virtual machine into a preset format file and uploading the preset format file to the cloud platform.
2. The method according to claim 1, before uploading the created virtual machine to the cloud platform after converting the created virtual machine into the preset format file, further comprising:
and configuring the created virtual machine according to preset configuration parameters.
3. The method according to claim 1 or 2, wherein creating a virtual machine by virtualization software according to the ISO image file specifically comprises:
starting a new instance according to the ISO mirror image file;
the operating system is installed through a virtual network console VNC or SPICE console.
4. The method according to claim 3, wherein converting the created virtual machine into a file of a preset format specifically comprises:
calling a preset script to create a snapshot of the virtual operating system;
and aiming at the created snapshot, a preset command is operated to convert the snapshot into a preset format file.
5. The method of claim 4, wherein the preset command comprises a Glance Image-Update command.
6. An apparatus for creating an image by a cloud platform, comprising:
the receiving unit is used for receiving an operating system installation ISO mirror image file uploaded by a user;
the creating unit is used for creating a virtual machine through virtualization software according to the ISO mirror image file;
and the conversion unit is used for converting the created virtual machine into a preset format file and then uploading the preset format file to the cloud platform.
7. The apparatus of claim 6, further comprising:
and the configuration unit is used for configuring the created virtual machine according to preset configuration parameters before the created virtual machine is converted into a preset format file by the conversion unit and then uploaded to the cloud platform.
8. The apparatus of claim 7,
the creating unit is specifically configured to start a new instance according to the ISO image; the operating system is installed through a virtual network console VNC or SPICE console.
9. A computing device, the computing device comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method according to any one of claims 1 to 5.
10. A computer storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911081427.8A CN111045781B (en) | 2019-11-07 | 2019-11-07 | Method, device and storage medium for creating mirror image by cloud platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911081427.8A CN111045781B (en) | 2019-11-07 | 2019-11-07 | Method, device and storage medium for creating mirror image by cloud platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111045781A true CN111045781A (en) | 2020-04-21 |
CN111045781B CN111045781B (en) | 2023-05-12 |
Family
ID=70231860
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911081427.8A Active CN111045781B (en) | 2019-11-07 | 2019-11-07 | Method, device and storage medium for creating mirror image by cloud platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111045781B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111796862A (en) * | 2020-07-07 | 2020-10-20 | 浪潮云信息技术股份公司 | Method for selecting cloud server to create use mirror based on mirror image label and metadata |
CN112068931A (en) * | 2020-08-28 | 2020-12-11 | 苏州浪潮智能科技有限公司 | Method and system for quickly making virtual machine mirror image |
CN113419814A (en) * | 2021-05-27 | 2021-09-21 | 济南浪潮数据技术有限公司 | Virtual machine creating method, device, equipment and storage medium in cloud platform |
WO2022089615A1 (en) * | 2020-10-30 | 2022-05-05 | 华为云计算技术有限公司 | Method for creating private image in public cloud, and related device |
CN116339761A (en) * | 2023-05-29 | 2023-06-27 | 天翼云科技有限公司 | Method, system, storage medium and equipment for automatically constructing mirror image template |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130104126A1 (en) * | 2011-10-24 | 2013-04-25 | Infosys Limited | System and method for dynamically creating machine images for instantiating virtual machines |
CN106557355A (en) * | 2016-12-01 | 2017-04-05 | 北京奇虎科技有限公司 | The generation method and generating means of virtual machine image |
CN108664313A (en) * | 2018-05-18 | 2018-10-16 | 广州杰赛科技股份有限公司 | The online production method of image file, device, server, system and storage medium |
-
2019
- 2019-11-07 CN CN201911081427.8A patent/CN111045781B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130104126A1 (en) * | 2011-10-24 | 2013-04-25 | Infosys Limited | System and method for dynamically creating machine images for instantiating virtual machines |
CN106557355A (en) * | 2016-12-01 | 2017-04-05 | 北京奇虎科技有限公司 | The generation method and generating means of virtual machine image |
CN108664313A (en) * | 2018-05-18 | 2018-10-16 | 广州杰赛科技股份有限公司 | The online production method of image file, device, server, system and storage medium |
Non-Patent Citations (1)
Title |
---|
姜毅 等: "基于开源软件的私有云计算平台构建", 《电信科学》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111796862A (en) * | 2020-07-07 | 2020-10-20 | 浪潮云信息技术股份公司 | Method for selecting cloud server to create use mirror based on mirror image label and metadata |
CN111796862B (en) * | 2020-07-07 | 2024-05-31 | 浪潮云信息技术股份公司 | Method for creating use mirror image by selecting cloud server based on mirror image label and metadata |
CN112068931A (en) * | 2020-08-28 | 2020-12-11 | 苏州浪潮智能科技有限公司 | Method and system for quickly making virtual machine mirror image |
CN112068931B (en) * | 2020-08-28 | 2023-05-12 | 苏州浪潮智能科技有限公司 | Method and system for rapidly manufacturing virtual machine mirror image |
WO2022089615A1 (en) * | 2020-10-30 | 2022-05-05 | 华为云计算技术有限公司 | Method for creating private image in public cloud, and related device |
CN114443058A (en) * | 2020-10-30 | 2022-05-06 | 华为云计算技术有限公司 | Method for creating private mirror image in public cloud and related equipment |
CN113419814A (en) * | 2021-05-27 | 2021-09-21 | 济南浪潮数据技术有限公司 | Virtual machine creating method, device, equipment and storage medium in cloud platform |
CN113419814B (en) * | 2021-05-27 | 2022-03-08 | 济南浪潮数据技术有限公司 | Virtual machine creating method, device, equipment and storage medium in cloud platform |
CN116339761A (en) * | 2023-05-29 | 2023-06-27 | 天翼云科技有限公司 | Method, system, storage medium and equipment for automatically constructing mirror image template |
CN116339761B (en) * | 2023-05-29 | 2024-03-08 | 天翼云科技有限公司 | Method, system, storage medium and equipment for automatically constructing mirror image template |
Also Published As
Publication number | Publication date |
---|---|
CN111045781B (en) | 2023-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111045781B (en) | Method, device and storage medium for creating mirror image by cloud platform | |
US10992758B2 (en) | Virtualizing device management services on a multi-session platform | |
CN111061540B (en) | Application virtualization method and system based on container technology | |
US11030025B2 (en) | Managing inter-process communications in a containerized application environment | |
US8584081B2 (en) | Server side application integration framework | |
KR101761409B1 (en) | Method and apparatus for providing virtual platform | |
US9940148B1 (en) | In-place hypervisor updates | |
CN112764872A (en) | Computer device, virtualization acceleration device, remote control method, and storage medium | |
CN108132826A (en) | Across mirror image management method, device and the server of Cloud Server | |
CN111427594B (en) | Application program running method and device | |
US20170031680A1 (en) | Computer-implemented method and system for executing android apps natively on any environment | |
CN114816676A (en) | System and method for realizing multi-tenant deployment of low code development platform | |
US10795747B2 (en) | File synchronizing service status monitoring and error handling | |
US20180173575A1 (en) | Opening unsupported file types through remoting sessions | |
CN110928554A (en) | Deployment method, device, equipment and storage medium | |
US10827034B2 (en) | Providing application versions via delta volumes | |
CN111026406A (en) | Application running method, device and computer readable storage medium | |
CN110083323A (en) | A kind of method and device for realizing mostly display and multi-user concurrent | |
CN115562810A (en) | Full-automatic deployment method and device for shared storage cluster of database all-in-one machine | |
CN109189753B (en) | Method and device for adding user information in HUE | |
KR101326231B1 (en) | Virtualization software service system, and sevice server and user terminal therefor | |
CN111414232A (en) | Method and device for processing template data of virtual machine | |
CN116932146B (en) | Method and system for realizing containerization of small embedded system | |
CN117873506B (en) | Mirror image operation realization method and system based on VOI | |
WO2023000705A1 (en) | Application program virtualization method and system, and electronic device and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |