CN111324418A - OpenStack-based virtual machine template generation method and device - Google Patents

OpenStack-based virtual machine template generation method and device Download PDF

Info

Publication number
CN111324418A
CN111324418A CN202010083401.3A CN202010083401A CN111324418A CN 111324418 A CN111324418 A CN 111324418A CN 202010083401 A CN202010083401 A CN 202010083401A CN 111324418 A CN111324418 A CN 111324418A
Authority
CN
China
Prior art keywords
virtual machine
volume
openstack
image
template
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.)
Withdrawn
Application number
CN202010083401.3A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010083401.3A priority Critical patent/CN111324418A/en
Publication of CN111324418A publication Critical patent/CN111324418A/en
Withdrawn 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
    • 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
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • 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
    • G06F2009/45575Starting, stopping, suspending or resuming 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)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for generating a virtual machine template based on OpenStack, wherein the method comprises the following steps: uploading an issue image of an operating system to OpenStack to create a virtual machine; creating a volume for the virtual machine, configuring the starting mode of the volume to be startable, and closing the virtual machine to mount the volume to the virtual machine; starting the virtual machine by taking the volume as a system starting disk so as to install the release image into the virtual machine and configure parameters of the virtual machine; and closing the virtual machine to unload the volume from the virtual machine, and uploading the volume to OpenStack in a template mirroring mode to be used as a virtual machine template. The invention uses the system mirror image to manufacture the virtual machine template so as to establish and configure the virtual machines in batch, thereby reducing the manual occupation and improving the working efficiency.

Description

OpenStack-based virtual machine template generation method and device
Technical Field
The present invention relates to the field of virtual machines, and in particular, to a method and an apparatus for generating a virtual machine template based on an OpenStack.
Background
The cloud data center operating system of the wave cloud sea can realize unified management and monitoring of physical resources and virtual resources, realize basic resource as a service (IaaS), help customers to realize service agility, and realize elastic expansion and dynamic circulation of the basic resources according to service requirements. However, it is difficult for OpenStack to configure virtual machines in batch currently, and in the prior art, configuration needs to be performed on OpenStack for different virtual machines respectively, which consumes labor and affects working efficiency.
Aiming at the problems that the execution and configuration of different virtual machines in the prior art consume labor and influence the working efficiency is strong, no effective solution is available at present.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and an apparatus for generating a virtual machine template based on OpenStack, which can use a system image to make a virtual machine template to create and configure virtual machines in batch, reduce human occupation, and improve work efficiency.
Based on the above object, a first aspect of the embodiments of the present invention provides a method for generating a virtual machine template based on an OpenStack, including the following steps:
uploading an issue image of an operating system to OpenStack to create a virtual machine;
creating a volume for the virtual machine, configuring the starting mode of the volume to be startable, and closing the virtual machine to mount the volume to the virtual machine;
starting the virtual machine by taking the volume as a system starting disk so as to install the release image into the virtual machine and configure parameters of the virtual machine;
and closing the virtual machine to unload the volume from the virtual machine, and uploading the volume to OpenStack in a template mirroring mode to be used as a virtual machine template.
In some embodiments, nova, finder, and shine components are deployed on OpenStack; the nova component is configured to upload an issue version image of an operating system to OpenStack and upload a volume to OpenStack in a template image mode; the shader component is configured to create volumes for the virtual machines; the work component is configured to create a virtual machine, close the virtual machine to mount a volume to the virtual machine, install a release image to the virtual machine and configure parameters of the virtual machine, and uninstall the volume from the virtual machine.
In some embodiments, further comprising: the integrity and availability of the volume and the template image are checked before the volume is uploaded to OpenStack in the form of the template image.
In some embodiments, the release image is an installation image of linux or windows.
In some embodiments, the volume is a virtio disk;
further comprising: additionally installing a virtio driver for the virtual machine when the volume is mounted to the virtual machine in response to the release image being an installation image of windows.
A second aspect of the present invention provides an OpenStack-based virtual machine template generation apparatus, including:
a processor; and
a memory storing program code executable by the processor, the program code when executed sequentially performing the steps of:
uploading an issue image of an operating system to OpenStack to create a virtual machine;
creating a volume for the virtual machine, configuring the starting mode of the volume to be startable, and closing the virtual machine to mount the volume to the virtual machine;
starting the virtual machine by taking the volume as a system starting disk so as to install the release image into the virtual machine and configure parameters of the virtual machine;
and closing the virtual machine to unload the volume from the virtual machine, and uploading the volume to OpenStack in a template mirroring mode to be used as a virtual machine template.
In some embodiments, nova, finder, and shine components are deployed on OpenStack; the nova component is configured to upload an issue version image of an operating system to OpenStack and upload a volume to OpenStack in a template image mode; the shader component is configured to create volumes for the virtual machines; the work component is configured to create a virtual machine, close the virtual machine to mount a volume to the virtual machine, install a release image to the virtual machine and configure parameters of the virtual machine, and uninstall the volume from the virtual machine.
In some embodiments, the steps further comprise: the integrity and availability of the volume and the template image are checked before the volume is uploaded to OpenStack in the form of the template image.
In some embodiments, the release image is an installation image of linux or windows.
In some embodiments, the volume is a virtio disk;
the method also comprises the following steps: additionally installing a virtio driver for the virtual machine when the volume is mounted to the virtual machine in response to the release image being an installation image of windows.
The invention has the following beneficial technical effects: according to the method and the device for generating the OpenStack-based virtual machine template, the virtual machine is created by uploading the release image of an operating system to OpenStack; creating a volume for the virtual machine, configuring the starting mode of the volume to be startable, and closing the virtual machine to mount the volume to the virtual machine; starting the virtual machine by taking the volume as a system starting disk so as to install the release image into the virtual machine and configure parameters of the virtual machine; the technical scheme includes that the virtual machine is closed to unload the volume from the virtual machine, the volume is uploaded to OpenStack in a template mirroring mode to serve as a virtual machine template, the virtual machine template can be manufactured by using a system mirror image to establish and configure the virtual machine in batches, manual occupation is reduced, and working efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow diagram of a method for generating a virtual machine template based on OpenStack according to the present invention;
fig. 2 is a schematic flowchart of an embodiment of a method for generating a virtual machine template based on OpenStack according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In view of the above, a first aspect of the embodiments of the present invention proposes an embodiment of a method for creating and configuring virtual machines in batch by using a system image to make a virtual machine template. Fig. 1 is a schematic flow diagram illustrating a method for generating a virtual machine template based on OpenStack according to the present invention.
The method for generating the OpenStack-based virtual machine template, as shown in FIG. 1, includes the following steps:
step S101: uploading an issue image of an operating system to OpenStack to create a virtual machine;
step S103: creating a volume for the virtual machine, configuring the starting mode of the volume to be startable, and closing the virtual machine to mount the volume to the virtual machine;
step S105: starting the virtual machine by taking the volume as a system starting disk so as to install the release image into the virtual machine and configure parameters of the virtual machine;
step S107: and closing the virtual machine to unload the volume from the virtual machine, and uploading the volume to OpenStack in a template mirroring mode to be used as a virtual machine template.
The method utilizes OpenStack to create the virtual machine by using the ISO mirror image, mounts the volume to the virtual machine and installs the volume as the system volume, so that the volume is unloaded by the virtual machine, and the volume is used to create the mirror image to combine and manufacture the template. The method can save the existing installation configuration of the virtual machine and generate the template; the virtual machines with the same configuration can be created by using the template, and if a large number of virtual machines with the same configuration are needed, the time for installing the configuration can be greatly saved, and the templates can be directly used for creating in batches. The use of templates to quickly create virtual machines may reduce the time consuming installation of the system.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like. Embodiments of the computer program may achieve the same or similar effects as any of the preceding method embodiments to which it corresponds.
In some embodiments, nova, finder, and shine components are deployed on OpenStack; the nova component is configured to upload an issue version image of an operating system to OpenStack and upload a volume to OpenStack in a template image mode; the shader component is configured to create volumes for the virtual machines; the work component is configured to create a virtual machine, close the virtual machine to mount a volume to the virtual machine, install a release image to the virtual machine and configure parameters of the virtual machine, and uninstall the volume from the virtual machine.
In some embodiments, the method further comprises: the integrity and availability of the volume and the template image are checked before the volume is uploaded to OpenStack in the form of the template image.
In some embodiments, the release image is an installation image of linux or windows.
In some embodiments, the volume is a virtio disk. The method further comprises the following steps: additionally installing a virtio driver for the virtual machine when the volume is mounted to the virtual machine in response to the release image being an installation image of windows.
The method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU (central processing unit), and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention. The above-described method steps and system elements may also be implemented using a controller and a computer-readable storage medium for storing a computer program for causing the controller to implement the functions of the above-described steps or elements.
The following further illustrates embodiments of the invention in accordance with the specific example shown in fig. 2.
For creating a virtual machine template of a linux system, firstly, the current openstack environment is required to be normally available in function, and components such as nova, circle, and gland are deployed, and the detailed execution flow is shown in fig. 2.
Step 1, uploading linux distribution ISO format images (centros, ubuntu and the like) on the existing openstack system, wherein the names of the images are as follows: CentOS7_ Linux for creating virtual machines, the create command is as follows:
$glance image-create--architecture x86_64--name CentOS7_Linux--min-disk 1--min-ram 1024--disk-format raw--container-format bare--file/root/Cirros_test/CentOS7.iso--visibility public
step 2, creating a virtual machine by using the iso-format mirror image uploaded in the step 1, wherein the name of the virtual machine is as follows: VM01_ CentOS7, for creating template usage, the creation commands are as follows:
$openstack server create--image CentOS7_Linux--flavor m1.tiny--key-name default--nic net-id=51ec6ecc-896f-495b-bb97-e103d3d49a01VM01_CentOS7
step 3, entering an openstack system, creating a blank volume as a system disk of the virtual machine, and setting the starting mode of the volume to be startable, wherein the volume name is as follows: CentOS _ volume, create command as follows:
$openstack volume create\--size 8--availability-zone nova–bootabletrue CentOS_volume
step 4, closing the virtual machine power supply created in the step 2, preparing for mounting the volume, executing the following command, using the instance ID of the virtual machine, and checking the instance ID in the openstack virtual machine details:
$ openstack server stop $ instance _ ID (created instance ID)
Step 5, mounting the volume created in the step 3 on a virtual machine to be used as a system disk, then starting a power supply of the virtual machine, and executing the following commands:
$ openstack server add volume instance _ ID $ volume _ ID $ -device/dev/vdb
$ openstack server start $ instance _ ID (created instance ID)
And 6, after the virtual machine is started, entering a console, installing and configuring an operating system of the virtual machine according to use requirements, wherein detailed description is omitted, the steps of installing the operating system are not different, corresponding parameters can be configured according to the use of the template created according to needs, and software needing to be preset is installed.
And 7, after the operating system is installed, firstly closing the power supply of the virtual machine, then separating the volume mounted on the virtual machine in the step 5, and using the volume to create a template, wherein the commands of closing the power supply and unloading the volume are as follows:
$ openstack server stop $ instance _ ID (created instance ID)
$ nova volume-detail < instanceId > (instance ID) < volume ID > (volume ID)
And 8, uploading the volume separated in the step 7 into a mirror image, designating the mirror image name $ image _ name as a template for use, and executing the following commands:
$cinder upload-to-image--disk-format$disk-format$volume_id$image_name
step 9, checking whether the mirror image and the separated volume information are complete and normal, and commanding the following steps:
mirror image
$openstack image show image_name
Roll of paper
$openstack volume show$Volume_Id
Step 10, using the uploaded image and the separated volume to create a virtual machine, and not reinstalling the virtual machine after restarting, and downloading the image to the local to be stored as a template for use, wherein the created configuration and preset software of the cloud host system are consistent with those of the virtual machine VM01_ CentOS7 created in steps 2 and 5:
$glance image-download–file Image_Name$Image_id
the test method for manufacturing the template by using the ISO mirror image is completed, wherein the steps 1, 2 and 3 are functions of uploading the mirror image, creating a virtual machine and creating a volume of the openstack, and the method mainly aims at creating the virtual machine which needs to be manufactured as the mirror image of the template, installing and deploying configuration and software which need to be preset, and facilitating the use of a subsequent template; 4, 5 and 6, mainly hanging the volume to the virtual machine, installing a virtual machine operating system to a system disk, mainly aiming at hanging the previously created volume to the virtual machine, using the volume as the system disk, and installing the operating system on the mounted volume; step 7, unloading the roll, mainly unloading the roll with the operating system installed for manufacturing a template; step 8, using the function of volume uploading mirror image, mainly speaking that the unloaded volume is uploaded as mirror image to be used as a virtual machine template; and 9, step 10 and step 9 are mainly to check whether the mirror image is uploaded successfully, and download the uploaded mirror image to the local, so that the mirror image can be conveniently used in the later virtual machine creation process, and can be uploaded to an openstack environment to be used at any time for creating a template of the virtual machine for use.
On the other hand, the Windows system template is made slightly different. Firstly, the current openstack environment is required to be normally available in function, and nova, circular, and glance components are deployed.
Step 1, uploading the Windows mirror image to the openstack environment, taking win7 as an example, and specifying parameters such as the name of the mirror image.
Step 2, because the Windows system does not recognize the virtio disk, a virtio drive needs to be installed for the Windows virtual machine, and metadata 'hw _ set _ cd rom' needs to be added when the browser is created at this time: enter hw _ set _ cdrom and virtio mirror paths in the custom fields (virtio mirror to be put into the corresponding directories in nova _ libvirt and nova _ computer containers), for example: /home/ICS-VirtiO-0.81.iso (the mirror image is to be put under/home of nova _ libvirt and nova _ computer containers)
And 3, creating instance by using the navigator, and selecting the win7 iso image uploaded in the first step.
And 4, establishing a new volume and mounting the new volume to the virtual machine according to the 4 th step and the 5 th step in the Linux system manufacturing process, and then restarting the virtual machine hard.
And 5, entering a virtual machine console, and installing a virtio driver. Since windows does not recognize virtio disks, system disks cannot be reported when the system is installed. And loading a driver, and selecting a win7 driver and a virtiosci driver in the driver image to install so as to identify the system disk.
And 6, after the operating system is installed, if the network card needs to be used, a network card driver (the driver is contained in the virtual iso file) needs to be installed, if the password needs to be reset, a closed-init (the installation package is contained in the virtual iso file) needs to be installed, then the virtual machine is closed, and the volume is separated from the virtual machine.
And 7, uploading the mirror image through the separated volume, manufacturing a template, customizing the name of the mirror image, selecting qcow2 as a mirror image format, and then selecting uploading.
And 8, completing template manufacturing after the mirror image is uploaded, and then creating the virtual machine through the newly manufactured template. After the template is made, the virtual machine for making the template is not used, and direct deletion is suggested.
As can be seen from the foregoing embodiments, in the method for generating a virtual machine template based on OpenStack according to the embodiments of the present invention, a virtual machine is created by uploading an issue version image of an operating system to OpenStack; creating a volume for the virtual machine, configuring the starting mode of the volume to be startable, and closing the virtual machine to mount the volume to the virtual machine; starting the virtual machine by taking the volume as a system starting disk so as to install the release image into the virtual machine and configure parameters of the virtual machine; the technical scheme includes that the virtual machine is closed to unload the volume from the virtual machine, the volume is uploaded to OpenStack in a template mirroring mode to serve as a virtual machine template, the virtual machine template can be manufactured by using a system mirror image to establish and configure the virtual machine in batches, manual occupation is reduced, and working efficiency is improved.
It should be particularly noted that, in the embodiments of the OpenStack-based virtual machine template generation method, the steps may be intersected, replaced, added, and deleted, and therefore, these reasonable permutation and combination transformations should also belong to the scope of the present invention, and should not limit the scope of the present invention to the described embodiments.
In view of the above object, according to a second aspect of the embodiments of the present invention, an embodiment of an apparatus capable of making a virtual machine template using a system image to create and configure virtual machines in batch is provided. The OpenStack-based virtual machine template generation device comprises:
a processor; and
a memory storing program code executable by the processor, the program code when executed sequentially performing the steps of:
uploading an issue image of an operating system to OpenStack to create a virtual machine;
creating a volume for the virtual machine, configuring the starting mode of the volume to be startable, and closing the virtual machine to mount the volume to the virtual machine;
starting the virtual machine by taking the volume as a system starting disk so as to install the release image into the virtual machine and configure parameters of the virtual machine;
and closing the virtual machine to unload the volume from the virtual machine, and uploading the volume to OpenStack in a template mirroring mode to be used as a virtual machine template.
In some embodiments, nova, finder, and shine components are deployed on OpenStack; the nova component is configured to upload an issue version image of an operating system to OpenStack and upload a volume to OpenStack in a template image mode; the shader component is configured to create volumes for the virtual machines; the work component is configured to create a virtual machine, close the virtual machine to mount a volume to the virtual machine, install a release image to the virtual machine and configure parameters of the virtual machine, and uninstall the volume from the virtual machine.
In some embodiments, the steps further comprise: the integrity and availability of the volume and the template image are checked before the volume is uploaded to OpenStack in the form of the template image.
In some embodiments, the release image is an installation image of linux or windows.
In some embodiments, the volume is a virtio disk. The method also comprises the following steps: additionally installing a virtio driver for the virtual machine when the volume is mounted to the virtual machine in response to the release image being an installation image of windows.
As can be seen from the foregoing embodiments, the OpenStack-based virtual machine template generation apparatus according to the embodiments of the present invention creates a virtual machine by uploading an issue version image of an operating system to OpenStack; creating a volume for the virtual machine, configuring the starting mode of the volume to be startable, and closing the virtual machine to mount the volume to the virtual machine; starting the virtual machine by taking the volume as a system starting disk so as to install the release image into the virtual machine and configure parameters of the virtual machine; the technical scheme includes that the virtual machine is closed to unload the volume from the virtual machine, the volume is uploaded to OpenStack in a template mirroring mode to serve as a virtual machine template, the virtual machine template can be manufactured by using a system mirror image to establish and configure the virtual machine in batches, manual occupation is reduced, and working efficiency is improved.
It should be particularly noted that, the above embodiment of the OpenStack-based virtual machine template generation apparatus employs the embodiment of the OpenStack-based virtual machine template generation method to specifically describe the working process of each module, and those skilled in the art can easily think that these modules are applied to other embodiments of the OpenStack-based virtual machine template generation method. Of course, since each step in the embodiment of the method for generating a virtual machine template based on OpenStack may be intersected, replaced, added, or deleted, these reasonable permutation, combination and transformation should also belong to the scope of the present invention, and the scope of the present invention should not be limited to the embodiment.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of an embodiment of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A method for generating a virtual machine template based on OpenStack is characterized by comprising the following steps:
uploading an issue image of an operating system to OpenStack to create a virtual machine;
creating a volume for the virtual machine, configuring the starting mode of the volume to be startable, and closing the virtual machine to mount the volume to the virtual machine;
booting the virtual machine with the volume as a system boot disk to install the release image to the virtual machine and configure parameters of the virtual machine;
and closing the virtual machine to unload the volume from the virtual machine, and uploading the volume to OpenStack in a template mirroring manner to be used as a virtual machine template.
2. The method of claim 1, wherein nova, circle, and angle components are deployed on the OpenStack; the nova component is configured to upload an issue version image of an operating system to OpenStack and upload the volume to OpenStack in a template image mode; the shader component is configured to create a volume for the virtual machine; the work component is configured to create a virtual machine, shut down the virtual machine to mount the volume to the virtual machine, install the release image to the virtual machine and configure parameters of the virtual machine, and uninstall the volume from the virtual machine.
3. The method of claim 1, further comprising: the integrity and availability of the volume and the template image are checked before the volume is uploaded to OpenStack in a template image mode.
4. The method of claim 1, wherein the release image is an installation image of linux or windows.
5. The method of claim 4, wherein the volume is a virtio disk;
further comprising: additionally installing a virtio driver for the virtual machine when the volume is mounted to the virtual machine in response to the release image being an installation image of a windows.
6. An OpenStack-based virtual machine template generation device, comprising:
a processor; and
a memory storing program code executable by the processor, the program code when executed sequentially performing the steps of:
uploading an issue image of an operating system to OpenStack to create a virtual machine;
creating a volume for the virtual machine, configuring the starting mode of the volume to be startable, and closing the virtual machine to mount the volume to the virtual machine;
booting the virtual machine with the volume as a system boot disk to install the release image to the virtual machine and configure parameters of the virtual machine;
and closing the virtual machine to unload the volume from the virtual machine, and uploading the volume to OpenStack in a template mirroring manner to be used as a virtual machine template.
7. The apparatus of claim 6, wherein nova, circle, and angle components are deployed on the OpenStack; the nova component is configured to upload an issue version image of an operating system to OpenStack and upload the volume to OpenStack in a template image mode; the shader component is configured to create a volume for the virtual machine; the work component is configured to create a virtual machine, shut down the virtual machine to mount the volume to the virtual machine, install the release image to the virtual machine and configure parameters of the virtual machine, and uninstall the volume from the virtual machine.
8. The apparatus of claim 6, wherein the steps further comprise: the integrity and availability of the volume and the template image are checked before the volume is uploaded to OpenStack in a template image mode.
9. The apparatus of claim 6, wherein the release image is an installation image of linux or windows.
10. The apparatus of claim 9, wherein the volume is a virtio disk;
the steps further include: additionally installing a virtio driver for the virtual machine when the volume is mounted to the virtual machine in response to the release image being an installation image of a windows.
CN202010083401.3A 2020-02-09 2020-02-09 OpenStack-based virtual machine template generation method and device Withdrawn CN111324418A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010083401.3A CN111324418A (en) 2020-02-09 2020-02-09 OpenStack-based virtual machine template generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010083401.3A CN111324418A (en) 2020-02-09 2020-02-09 OpenStack-based virtual machine template generation method and device

Publications (1)

Publication Number Publication Date
CN111324418A true CN111324418A (en) 2020-06-23

Family

ID=71167287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010083401.3A Withdrawn CN111324418A (en) 2020-02-09 2020-02-09 OpenStack-based virtual machine template generation method and device

Country Status (1)

Country Link
CN (1) CN111324418A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111880907A (en) * 2020-08-04 2020-11-03 浪潮云信息技术股份公司 Method for starting virtual machine by utilizing ISO (International organization for standardization) aiming at OpenStack platform
CN112000440A (en) * 2020-08-24 2020-11-27 浪潮云信息技术股份公司 Multi-boot volume virtual machine boot sequence changing method based on cloud platform
CN113419814A (en) * 2021-05-27 2021-09-21 济南浪潮数据技术有限公司 Virtual machine creating method, device, equipment and storage medium in cloud platform

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111880907A (en) * 2020-08-04 2020-11-03 浪潮云信息技术股份公司 Method for starting virtual machine by utilizing ISO (International organization for standardization) aiming at OpenStack platform
CN112000440A (en) * 2020-08-24 2020-11-27 浪潮云信息技术股份公司 Multi-boot volume virtual machine boot sequence changing method based on cloud platform
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

Similar Documents

Publication Publication Date Title
CN105745617B (en) Selective power management for pre-boot firmware updates
CN111324418A (en) OpenStack-based virtual machine template generation method and device
KR101856284B1 (en) Backing up firmware during initialization of device
EP2831722B1 (en) Method and system for verifying proper operation of a computing device after a system change
CN107291510B (en) Rapid starting method for Linux vehicle-mounted information system
CN111198695A (en) Automatic deployment method of micro-service administration management platform and electronic equipment
CN110780942A (en) System starting method and device, node equipment and computer readable storage medium
WO2023098052A1 (en) Server operation and maintenance method and apparatus, and device and storage medium
CN108874459A (en) Quick start method and device based on virtualization technology
CN113110891A (en) Firmware loading method and device for solid state disk, computer equipment and storage medium
CN114756290A (en) Operating system installation method, device and readable storage medium
CN113901473A (en) Method, device and equipment for safely starting server and readable medium
CN109471665B (en) Method for automatically installing Windows operating system
CN110688130A (en) Physical machine deployment method, physical machine deployment device, readable storage medium and electronic equipment
CN113419814B (en) Virtual machine creating method, device, equipment and storage medium in cloud platform
CN115951949A (en) Recovery method and device for configuration parameters of BIOS (basic input output System) and computing equipment
CN113276788B (en) Vehicle-mounted application upgrading method and device, vehicle-mounted terminal and storage medium
CN115202674A (en) Helm-based automatic deployment method for local volumes in kubernets cluster
CN113918179A (en) Method and system for automatically installing OS (operating system) by cooperation of host and intelligent network card under Linux
CN111857729A (en) Network card drive compiling method and device, computer equipment and storage medium
Al-Bokhaiti et al. Customization and Optimization of Android Operating System for Custom Board with the Implementation of an Administrative Tool
US20240036896A1 (en) Generating installation images based upon dpu-specific capabilities
CN113568628B (en) ISO automated production method based on debrian system
CN113448644B (en) Operating system ring3 mode OC hard disk configuration method, device, terminal and storage medium
US20240168732A1 (en) Method for generating driver package, method for deploying driver, electronic device, and computer readable 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20200623

WW01 Invention patent application withdrawn after publication