CN111045781B - Method, device and storage medium for creating mirror image by cloud platform - Google Patents
Method, device and storage medium for creating mirror image by cloud platform Download PDFInfo
- Publication number
- CN111045781B CN111045781B CN201911081427.8A CN201911081427A CN111045781B CN 111045781 B CN111045781 B CN 111045781B CN 201911081427 A CN201911081427 A CN 201911081427A CN 111045781 B CN111045781 B CN 111045781B
- Authority
- CN
- China
- Prior art keywords
- file
- cloud platform
- image
- virtual machine
- 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.)
- Active
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, a device and a storage medium for creating a mirror image of a cloud platform, 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 mirror image by the cloud platform comprises the following steps: receiving an operating system installation ISO mirror image file 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 file with a preset format, and uploading the file to the cloud platform.
Description
Technical Field
The present invention relates to the field of cloud computing technologies, and in particular, to a method, an apparatus, and a storage medium for creating a mirror image by using a cloud platform.
Background
The cloud management platform (hereinafter referred to as 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 to serve users as required. The services provided by the cloud platform include three aspects: iaaS (Infrastructure as a Service ), paaS (Platform as a Service, platform as a service), saaS ((Software as a Service, software as a service).
The virtual machine technology is an important means for effectively managing and fully sharing physical resources, and can introduce an abstract layer between software and hardware of a computer system, provide an independent running environment for upper-layer application, and realize sharing multiplexing of hardware resources. Both the IaaS and PaaS provided by the cloud platform need to be based on virtual machines.
In the process of creating a virtual machine on a cloud platform through OpenStack software, a new image is needed. The user terminal needs two steps for creating the mirror image through the OpenStack software, the first step is to call an interface for creating mirror image parameter information, the second step is to call an uploading interface for uploading the mirror image file, however, the file format accepted by the cloud platform can only be qcow2 or raw, and therefore limitation is added to the uploading of the mirror image. In addition, in the image uploading process, each step is divided, and the time of each step is not constant, so that the problem of discontinuous connection is easy to occur, and the image creation is failed.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a storage medium for creating a mirror image of a cloud platform, 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 a mirror image by using a cloud platform is provided, including:
receiving an operating system installation ISO mirror image file 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 file with a preset format, and uploading the file to the cloud platform.
In one embodiment, before the created virtual machine is converted into the file with the preset format and then uploaded to the cloud platform, the method further comprises:
and configuring the created virtual machine according to preset configuration parameters.
In one embodiment, creating a virtual machine by virtualization software according to the ISO image 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 one embodiment, converting the created virtual machine into a file in a preset format specifically includes:
calling a preset script to create a snapshot of the virtual operating system;
and aiming at the created snapshot, running a preset command to convert the snapshot into a file in a preset format.
In one embodiment, the preset command includes a Glance Image-Update command.
The invention also provides a device for creating the mirror image by the cloud platform, which comprises:
the receiving unit is used for receiving the ISO mirror image file installed by the operating system and uploaded by the user;
the creation unit is used for creating a virtual machine through virtualization software according to the ISO image file;
and the conversion unit is used for converting the created virtual machine into a file with a preset format and uploading the file to the cloud platform.
In an implementation manner, the device for creating a mirror image by using the cloud platform provided by the embodiment of the invention further includes:
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 file with a preset format by the conversion unit and then uploaded to the cloud platform.
In one 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 one embodiment, the conversion unit is specifically configured to call a preset script to create a snapshot of the virtual operating system; and aiming at the created snapshot, running a preset command to convert the snapshot into a file in a preset format.
The present invention also provides a computing device comprising: the cloud platform image creation method comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the computer program realizes the steps of any cloud platform image creation method when being executed by the processor.
The invention also provides a computer storage medium, wherein the computer storage medium is stored with a computer program, and the computer program realizes the steps of the method for creating the mirror image by any cloud platform when being executed by a processor.
By adopting the technical scheme, the invention has at least the following advantages:
according to the method, the device and the storage medium for creating the mirror image by the cloud platform, the mirror image corresponding to the ISO mirror image file is created on line by uploading the ISO mirror image file to the server aiming at the ISO mirror image file, so that the problems of file format, uploading failure and the like introduced after the mirror image is created off line are avoided, and the success rate of creating the mirror image is improved.
Drawings
FIG. 1 is a flowchart of a method for creating a mirror image for a cloud platform according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a device for creating a mirror image by using a cloud platform according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention for achieving the intended purpose, the following detailed description of the present invention is given with reference to the accompanying drawings and preferred embodiments.
First, some terms related to the embodiments of the present invention will be described so as to be easily understood by those skilled in the art.
1. ISO is one of the storage formats of compact disc mirroring (CD Mirror) on a computer, and is commonly named after the suffix in the computer because it is a file stored according to the ISO-9660 related CD-ROM file system standard. The optical disk has only one file in form, can truly reflect the content of the optical disk, and can be created by the burning software or an image file making tool.
2. OpenStack is an open-source cloud computing management platform project, and specific work is completed by combining several main components. OpenStack supports almost all types of cloud environments, and the project goal is to provide a cloud computing management platform that is simple to implement, scalable on a large scale, rich, and standard-unified. OpenStack provides an infrastructure as a service (IaaS) solution 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 the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein.
Reference herein to "a plurality of" or "a number" means two or more than two. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Because the requirements of certain special scenes often appear in the use process of the cloud platform, the customization requirements of the images are relatively improved, but the image format used by the OpenStack cloud platform is not the most commonly used iso format, so that the problems of image conversion and uploading are introduced.
As shown in fig. 1, a schematic implementation flow chart of a method for creating a mirror image for a cloud platform according to an embodiment of the present invention may include the following steps:
s11, receiving an ISO mirror image file installed by the operating system uploaded by the user.
In specific implementation, a user can upload an operating system installation CD/DVD ISO mirror image file to an OpenStack mirror image service through a web page of a browser.
S12, creating a virtual machine through virtualization software according to the received ISO image file.
In this step, a new instance is started by the ISO image file uploaded by the user, i.e. an instance is started from this operating system ISO image. The operating system is installed through a VNC (Virtual Networking Computing, virtual network console) or SPICE (Simple Protocol for Independent Computing Environment) console in the OpenStack dashboard (dash board).
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 the implementation, after the operating system is installed, the installed operating system can be configured according to the set configuration parameters. Specifically, the operating system may be configured according to the application program to be installed and according to the requirements of OpenStack, for example, to a group-init or equivalent script, launch SSHD (solid state hybrid hard disk) telnet/RDP (Remote Desktop Protocol ) service, or the like.
S13, converting the created virtual machine into a file with a preset format, and uploading the 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, running a preset command to convert the snapshot into a file in a preset format. The preset command may be, but is not limited to, a Glance Image-Update command.
Specifically, for a newly created instance, a script is invoked to create an instance snapshot of the instance, run a Glance Image-Update command, or Update snapshot information from the dashboard if the dashboard provides the corresponding functionality, converting the Image type to the Image type. Optionally, other metadata may also be added.
In the embodiment of the invention, aiming at the user with the OpenStack, the image creation method is provided, and the image capable of meeting the requirements is created by creating the image on line. The user creates a new image on line through an OpenStack dashboard provided by the 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 the OpenStack image service by itself, and only needs to install an operating system CD/DVD ISO image file.
The invention integrates the process of image creation in the form of the WEB application of the B/S architecture. And on the premise of not influencing a primary system, uploading, compressing and packing the ISO image file. And finally, generating a mirror template for the OpenStack platform. The scattered functions of a plurality of links are reassembled in the form of WEB pages in the whole process. The image uploading function of simpler test 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 online, so that the problems of file format, uploading failure and the like introduced by uploading after the mirror image is created offline are avoided, and the success rate of creating the mirror image is improved.
Based on the same technical concept, the embodiment of the present invention further provides a device for creating a mirror image by using a cloud platform, as shown in fig. 2, which is a schematic structural diagram of the device for creating a mirror image by using a cloud platform provided by the embodiment of the present invention, including:
a receiving unit 21, 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;
and the conversion unit 23 is used for converting the created virtual machine into a file with a preset format and uploading the file to the cloud platform.
In an implementation manner, the device for creating a mirror image by using the cloud platform provided by the embodiment of the invention further includes:
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 file with a preset format by the conversion unit and then uploaded to the cloud platform.
In one 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 one embodiment, the conversion unit is specifically configured to call a preset script to create a snapshot of the virtual operating system; and aiming at the created snapshot, running a preset command to convert the snapshot into a file in a preset format.
Based on the same technical concept, the embodiment of the invention further provides a computing device, which comprises: the cloud platform image creation method comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the computer program realizes the steps of any cloud platform image creation method when being executed by the processor.
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 the computer program realizes the steps of the method for creating the mirror image by any cloud platform when being executed by a processor.
While the invention has been described in connection with specific embodiments thereof, it is to be understood that these drawings are included in the spirit and scope of the invention, it is not to be limited thereto.
Claims (6)
1. A method for creating an image by a cloud platform, comprising:
receiving an operating system installation ISO mirror file uploaded to an OpenStack mirror service by a user through a web page of a browser;
creating a virtual machine through virtualization software according to the ISO image file, wherein the method comprises the following steps: starting a new instance according to the ISO mirror image file; installing an operating system through a virtual console VNC or SPICE console of an OpenStack dashboard;
converting the created virtual machine into a file with a preset format, and uploading the file to a cloud platform, wherein the method comprises the following steps: and calling a preset script to create a snapshot of the virtual operating system, running a Glance Image-Update command, and converting the Image type into the Image type.
2. The method of claim 1, further comprising, prior to uploading the created virtual machine to the cloud platform after converting the created virtual machine to the pre-formatted file:
and configuring the created virtual machine according to preset configuration parameters.
3. 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 to the OpenStack mirror image service by a user through a web page of a browser;
the creation unit is configured to create a virtual machine through virtualization software according to the ISO image file, and includes: starting a new instance according to the ISO mirror image file; installing an operating system through a virtual console VNC or SPICE console of an OpenStack dashboard;
the conversion unit is used for converting the created virtual machine into a file with a preset format and uploading the file to the cloud platform, and comprises the following steps: and calling a preset script to create a snapshot of the virtual operating system, running a Glance Image-Update command, and converting the Image type into the Image type.
4. A device according to claim 3, further comprising:
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 file with a preset format by the conversion unit and then uploaded to the cloud platform.
5. A computing device, the computing device comprising: memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the method according to any one of claims 1 to 2.
6. A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method according to any of claims 1 to 2.
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 CN111045781A (en) | 2020-04-21 |
CN111045781B true 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) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
CN112068931B (en) * | 2020-08-28 | 2023-05-12 | 苏州浪潮智能科技有限公司 | Method and system for rapidly manufacturing virtual machine mirror image |
CN114443058A (en) * | 2020-10-30 | 2022-05-06 | 华为云计算技术有限公司 | Method for creating private mirror image in public cloud and related equipment |
CN113419814B (en) * | 2021-05-27 | 2022-03-08 | 济南浪潮数据技术有限公司 | Virtual machine creating method, device, equipment and storage medium in cloud platform |
CN114296864B (en) * | 2021-12-08 | 2024-12-10 | 中国—东盟信息港股份有限公司 | Method and device for converting iso image into container image |
CN116339761B (en) * | 2023-05-29 | 2024-03-08 | 天翼云科技有限公司 | Method, system, storage medium and equipment for automatically constructing mirror image template |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8881146B2 (en) * | 2011-10-24 | 2014-11-04 | Infosys Limited | System for configuring a virtual image instance including receiving a configuration file specifying software information corresponding to a desired instance of a networked node or cluster |
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
Also Published As
Publication number | Publication date |
---|---|
CN111045781A (en) | 2020-04-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111045781B (en) | Method, device and storage medium for creating mirror image by cloud platform | |
KR20220113663A (en) | Live migration of clusters in containerized environments | |
US8584081B2 (en) | Server side application integration framework | |
US11838335B2 (en) | Virtual computing system providing local screen sharing from hosted collaboration applications and related methods | |
US20180232174A1 (en) | Data Migration Between Cloud Storage Systems | |
US11030025B2 (en) | Managing inter-process communications in a containerized application environment | |
US20170163553A1 (en) | Methods and systems for providing software applications | |
US10795747B2 (en) | File synchronizing service status monitoring and error handling | |
CN112882726B (en) | Hadoop and Docker-based deployment method of environment system | |
US12041133B1 (en) | System and method for controlling remote sessions executing on other devices | |
US9875099B2 (en) | Computer-implemented method and system for executing android apps natively on any environment | |
CN111800468A (en) | A cloud-based multi-cluster management method, device, medium and electronic device | |
CN112667228A (en) | Application program construction method and device and computer equipment | |
US10827034B2 (en) | Providing application versions via delta volumes | |
CN114296953B (en) | Multi-cloud heterogeneous system and task processing method | |
CN115480910A (en) | Multi-cluster resource management method and device and electronic equipment | |
WO2025035886A1 (en) | Data migration method and apparatus based on data storage, and server and storage medium | |
KR101326231B1 (en) | Virtualization software service system, and sevice server and user terminal therefor | |
CN113626099B (en) | Application program starting method and device and electronic equipment | |
CN115562810A (en) | Full-automatic deployment method and device for shared storage cluster of database all-in-one machine | |
CN116070360A (en) | Synchronization management server, synchronization management system, and synchronization management method | |
CN114466401A (en) | Image transmission method and electronic device | |
CN117873506B (en) | Mirror image operation realization method and system based on VOI | |
CN113641641A (en) | Switching method, switching system, equipment and storage medium of file storage service | |
CN111414232A (en) | Method and device for processing template data of virtual machine |
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 |