CN113419814B - Virtual machine creating method, device, equipment and storage medium in cloud platform - Google Patents
Virtual machine creating method, device, equipment and storage medium in cloud platform Download PDFInfo
- Publication number
- CN113419814B CN113419814B CN202110587531.5A CN202110587531A CN113419814B CN 113419814 B CN113419814 B CN 113419814B CN 202110587531 A CN202110587531 A CN 202110587531A CN 113419814 B CN113419814 B CN 113419814B
- Authority
- CN
- China
- Prior art keywords
- cloud platform
- icos
- operating system
- virtual machine
- parameters
- 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
- 238000000034 method Methods 0.000 title claims abstract description 40
- 230000004044 response Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 9
- 230000004048 modification Effects 0.000 claims description 6
- 238000012986 modification Methods 0.000 claims description 6
- 230000003044 adaptive effect Effects 0.000 claims description 3
- 230000005540 biological transmission Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
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
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- 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
-
- 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/4557—Distribution of virtual machine instances; Migration and load balancing
-
- 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/45575—Starting, stopping, suspending or resuming virtual machine instances
-
- 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/45595—Network integration; Enabling network access in virtual machine instances
Abstract
The invention discloses a virtual machine creating method, a virtual machine creating device, virtual machine creating equipment and a storage medium in a cloud platform. The method comprises the following steps: modifying module parameters of the ICOS cloud platform to add mirror image metadata, a network card model, UEFI starting parameters, CPU parameters and system bus type parameters in the ICOS cloud platform, and identifying the system type of a file to be installed based on the mirror image metadata; if the XML belongs to the mac operating system, transmitting the parameters of the mac operating system in the generated XML file; creating a mac operating system virtual machine based on a file to be installed, a network card model in an ICOS cloud platform, CPU parameters and system bus type parameters; guiding to enter a mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI starting parameters in the ICOS cloud platform; and performing service deployment on the mac operating system virtual machine through the component of the ICOS cloud platform. The scheme of the invention realizes the quick establishment of the mac operating system virtual machine and the stable operation of the service, and provides a convenient and quick operation mode for users.
Description
Technical Field
The invention relates to the technical field of cloud platforms, in particular to a method, a device, equipment and a storage medium for creating a virtual machine in a cloud platform.
Background
An In Cloud OpenStack (ICOS for short) Cloud platform is a Cloud data center operating system which is rich In functions, high In availability, safe and comprehensive In supporting tool and is self-developed by combining Cloud and sea series products based on open source OpenStack In wave tide. In the openstack cloud platform, the nova module provides cloud host management service for the cloud platform, generally speaking, the cloud platform is used for carrying out uniform resource management on the cloud host, so that the cloud platform has wider operation capacity, and meanwhile, the resource scheduling and operation are more effective and convenient.
At present, the virtual machine created by the ICOS cloud platform mainly comprises a Linux system and a Windows system. However, with the large-scale application of the Openstack cloud platform, the range of practical field use scenes is also wider and wider. How to ensure that the cloud platform has better compatibility with different operating systems and more convenient management capability has become a key development direction of the current cloud platform. The mac operating system is an operating system developed by apple, and the existing ICOS cloud platform cannot support virtual machine creation of the mac operating system, so that improvement is urgently needed.
Disclosure of Invention
In view of this, it is necessary to provide a method, an apparatus, a device, and a storage medium for creating a virtual machine in a cloud platform, for solving the problem that the existing cloud platform does not support mac operating system virtual creation.
According to an aspect of the present invention, a method for creating a virtual machine in a cloud platform is provided, where the method includes:
modifying module parameters of the ICOS cloud platform to add mirror image metadata, a network card model, UEFI starting parameters, CPU parameters and system bus type parameters in the ICOS cloud platform;
identifying the system type of a file to be installed based on the mirror pixel data;
responding to the fact that the system type of the file to be installed is a mac operating system, and adding a preset field in the generated XML file to transparently transmit the mac operating system parameters to a qemu module of the ICOS cloud platform;
creating a mac operating system virtual machine based on the file to be installed, the network card model in the ICOS cloud platform, the CPU parameters and the system bus type parameters;
guiding to enter a mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI starting parameters in the ICOS cloud platform; and
and performing service deployment on the mac operating system virtual machine through the component of the ICOS cloud platform.
In some embodiments, the step of modifying module parameters of the ICOS cloud platform to add mirror metadata, a network card model, UEFI startup parameters, CPU parameters, and system bus type parameters to the ICOS cloud platform includes:
modifying a code module of the ICOS cloud platform to add a MACOS character string in the OSType type so as to identify a file to be installed;
adding an e1000-82545em network card model in a network card module of an ICOS cloud platform;
adding an environment configuration file in an ICOS cloud platform to enable a mac operating system virtual machine to boot in a UEFI mode;
adding a Penryn type CPU in an ICOS cloud platform;
a virtio-sata type bus is added in the ICOS cloud platform.
In some embodiments, the step of identifying the system type of the file to be installed based on the mirror metadata comprises:
acquiring a system type of a file to be installed;
in response to the fact that the system type of the file to be installed is matched with the MACOS character string added in the OSType type, confirming that the file to be installed is a mac operating system virtual machine;
and in response to the fact that the system type of the file to be installed is not matched with the MACOS character string added in the OSType type, confirming that the file to be installed is a LINUX operating system virtual machine or a WINDOWS operating system virtual machine.
In some of these embodiments, the method further comprises:
uploading the file to be installed to a work module of an ICOS cloud platform, wherein the file to be installed comprises a boot file and a mac system mirror image;
and respectively creating a first cloud hard disk and a second hard disk based on the boot file and the mac system mirror image.
In one embodiment, the step of creating a mac operating system virtual machine based on the file to be installed, the network card model in the ICOS cloud platform, the CPU parameters, and the system bus type parameters includes:
configuring a system disk to be started by taking a first cloud hard disk as a template;
configuring the bus type as virtio-sata;
configuring a cloud host name, an available domain and a host;
configuring a network and a security group based on an e1000-82545em network card model;
the CPU is configured to be adaptive based on the CPU parameters, and the model is of Penryn type.
In one embodiment, the step of booting into the mac operating system of the created mac operating system virtual machine in a UEFI manner based on UEFI startup parameters in the ICOS cloud platform includes:
in response to the fact that the mac operating system virtual machine is established, mounting the second cloud hard disk and restarting the mac operating system virtual machine;
and sequentially entering a console page of the mac operating system virtual machine, entering a page guide system of the mac operating system, and entering the mac operating system according to the prompt of the guide system.
In one embodiment, the step of performing service deployment on the mac operating system virtual machine through the component of the ICOS cloud platform includes:
carrying out mounting and unloading of a network card and a cloud hard disk of a mac operating system through a neutron component of an ICOS cloud platform;
and starting and shutting down the mac operating system virtual machine through a shader component of the ICOS cloud platform.
According to another aspect of the present invention, there is provided an apparatus for creating a virtual machine in a cloud platform, the apparatus including:
the parameter modification module is used for modifying module parameters of the ICOS cloud platform so as to add mirror pixel data, a network card model, UEFI starting parameters, CPU parameters and system bus type parameters in the ICOS cloud platform;
the identification module is used for identifying the system type of the file to be installed based on the mirror pixel data;
the parameter transmission module is used for transmitting the mac operating system parameters to a qemu module of the ICOS cloud platform by adding preset fields in the generated XML file when the system type of the file to be installed is the mac operating system;
the creating module is used for creating a mac operating system virtual machine based on the file to be installed, the network card model in the ICOS cloud platform, the CPU parameters and the system bus type parameters;
the boot starting module is used for booting the mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI starting parameters in the ICOS cloud platform;
and the service deployment module is used for deploying the service of the mac operating system virtual machine through the component of the ICOS cloud platform.
According to still another aspect of the present invention, there is also provided a computer apparatus including: at least one processor; and
a memory storing a computer program executable on the processor, the processor performing the virtual machine creation method in the cloud platform as described above when executing the program.
According to still another aspect of the present invention, there is also provided a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the aforementioned method for creating a virtual machine in a cloud platform.
Firstly, a network card model is added in an ICOS cloud platform in a mode of adding configuration items and modifying module codes in the ICOS cloud platform, metadata of a mirror image is configured to be UEFI boot start, then when a file to be installed is judged to belong to a mac operating system, a mac operating system virtual machine is created based on the file to be installed, a network card model in the ICOS cloud platform, CPU parameters and system bus type parameters, and then the created mac operating system virtual machine is booted to enter the mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI start parameters in the ICOS cloud platform; and finally, performing service deployment on the mac operating system virtual machine through the component of the ICOS cloud platform, thereby realizing the rapid establishment of the mac operating system virtual machine and the stable operation of the service, and providing a convenient and rapid operation mode for users.
In addition, the invention also provides a virtual machine creating device in the cloud platform, a computer device and a computer readable storage medium, which can also achieve the technical effects and are not described herein again.
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, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for creating a virtual machine in a cloud platform according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the creation of a mac OS virtual machine according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating the creation and operation of a virtual machine of an ICOS cloud platform supporting a mac operating system according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a virtual machine creating apparatus in a cloud platform according to another embodiment of the present invention;
fig. 5 is an internal structural view of a computer device according to another embodiment of 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 an embodiment, referring to fig. 1, the present invention provides a method for creating a virtual machine in a cloud platform, where the method includes the following steps:
s100, modifying module parameters of the ICOS cloud platform to add mirror pixel data, a network card model, UEFI starting parameters, CPU parameters and system bus type parameters in the ICOS cloud platform;
the ICOS is an InCloud OpenStack cloud platform, and is a cloud data center operating system which is rich in functions, high in availability, safe and comprehensive in supporting tools, is developed by combining open source OpenStack and cloud and sea series products. UEFI (Unified Extensible Firmware Interface), specifically, a specification of a personal computer system, is used to define a software Interface between an operating system and system Firmware, as an alternative to BIOS. The extensible firmware interface is responsible for power-on self-test (POST), contacting the operating system, and providing an interface to connect the operating system to the hardware.
S200, identifying the system type of a file to be installed based on the mirror pixel data;
s300, in response to the fact that the system type of the file to be installed is a mac operating system, adding a preset field in the generated XML file to transparently transmit mac operating system parameters to a qemu module of the ICOS cloud platform;
s400, creating a mac operating system virtual machine based on the file to be installed, the network card model in the ICOS cloud platform, the CPU parameters and the system bus type parameters;
s500, guiding to enter a mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI starting parameters in the ICOS cloud platform; and
s600, service deployment is carried out on the mac operating system virtual machine through the component of the ICOS cloud platform.
Firstly, adding a network card model in an ICOS cloud platform in a real mode of adding configuration items and modifying codes in the ICOS cloud platform, configuring metadata of a mirror image for UEFI boot start, then creating a mac operating system virtual machine based on a file to be installed, a network card model in the ICOS cloud platform, CPU parameters and system bus type parameters when judging that the file to be installed belongs to a mac operating system, and then booting to enter the mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI start parameters in the ICOS cloud platform; and finally, performing service deployment on the mac operating system virtual machine through the component of the ICOS cloud platform, thereby realizing the rapid establishment of the mac operating system virtual machine and the stable operation of the service, and providing a convenient and rapid operation mode for users.
In another embodiment, the step S100 specifically includes the following steps:
s110, modifying a code module of the ICOS cloud platform to add a MACOS character string in the OSType type so as to identify a file to be installed;
s120, adding an e1000-82545em network card model in a network card module of the ICOS cloud platform;
s130, adding an environment configuration file in the ICOS cloud platform to enable the mac operating system virtual machine to be booted and started in a UEFI mode;
s140, adding a Penryn type CPU in the ICOS cloud platform;
and S150, adding a virtio-sata type bus in the ICOS cloud platform.
The Mac operating system image running needs the participation of a boot system and an image file, so that the method is greatly different from the creating mode of a common virtual machine. Meanwhile, as the maccosx needs to run on a specific hardware environment, the cloud platform is required to provide corresponding configuration parameters to meet the requirement of simulating the running of the operating system. The method of the invention realizes the rapid deployment of the maccosX virtual machine and the rapid application of related services mainly by setting mirror pixel data, adding a network card model, adding parameters such as UEFI (unified extensible firmware interface) starting parameters and a CPU (central processing unit) model, system bus type parameters and the like on an ICOS (internet communications operating system) cloud platform.
In yet another embodiment, the aforementioned step S200 includes the steps of:
s210, acquiring the system type of a file to be installed;
s220, in response to the fact that the system type of the file to be installed is matched with the MACOS character string added in the OSType type, confirming that the file to be installed is a mac operating system virtual machine;
and S230, in response to the fact that the system type of the file to be installed is not matched with the MACOS character string added in the OSType type, confirming that the file to be installed is a LINUX operating system virtual machine or a WINDOWS operating system virtual machine.
In yet another embodiment, the method further comprises the steps of:
s710, uploading the file to be installed to a work module of an ICOS cloud platform, wherein the file to be installed comprises a guide file and a mac system mirror image;
s720, respectively creating a first cloud hard disk and a second hard disk based on the boot file and the mac system mirror image.
In yet another embodiment, based on the foregoing example, the step S400 specifically includes the following sub-steps: :
s410, configuring a system disk to be started by taking a first cloud hard disk as a template;
s420, configuring the bus type into virtio-sata;
s430, configuring a cloud host name, an available domain and a host;
s440, configuring a network and a security group based on an e1000-82545em network card model;
s450, configuring the CPU based on the CPU parameters to configure the CPU to be self-adaptive, wherein the model is of a Penryn type.
In yet another embodiment, the aforementioned step S500 includes the steps of:
s510, in response to the fact that the mac operating system virtual machine is established, mounting the second cloud hard disk and restarting the mac operating system virtual machine;
s520, sequentially entering a console page of the mac operating system virtual machine, entering a page guide system of the mac operating system, and entering the mac operating system according to the prompt of the guide system.
In yet another embodiment, the aforementioned step S60 includes the steps of:
s610, mounting and dismounting a network card and a cloud hard disk of the mac operating system through a neutron component of the ICOS cloud platform;
and S620, starting and shutting down the mac operating system virtual machine through a shader component of the ICOS cloud platform.
In another embodiment, please refer to fig. 2 and fig. 3, in order to effectively solve the problem that the current openstack cannot support the maccosx cloud host, and achieve that a user can quickly create a maccosx virtual machine based on an ICOS cloud platform, and achieve quick deployment and operation of services, the following detailed description is performed on a virtual machine of an operating system in which a maccosx (which is a name for different versions of a mac operating system, and refers to a class of mac operating systems) is created on a certain ICOS cloud platform, and specifically includes the following steps:
firstly, adding a MACOS character string in an OSType of an ICOS code module so as to identify a maccosX image (after the MACOS character string is added, the MACOS character string is changed into three operating system types of LINUX, WINDOWS and MACOS). So that whether the virtual machine image to be created is a maccosx image can be judged according to whether the os _ type in the image contains the MACOS field, and corresponding parameters are set accordingly.
And secondly, adding an 'e 1000-82545 em' network card model into the ICOS network card model. For the maccosX virtual machine, the network card of "e 1000-82545 em" is used as the virtual network card. In the process of creating the actual virtual machine, the network card is selected as the virtual network card of the virtual machine, and virtio drive is not supported.
Third, the configuration environment may boot in UEFI. Configuration files/var/lib/libvirt/qemu/nvram/vars. fd files ([ name ] of virtual machine) and/usr/share/OVMF _ code. fd files need to be fixed in the environment. So that the subsequent operation of the maccosx virtual machine can be performed in a UEFI boot manner.
Fourthly, judging whether the system type is the mirror image of the system type of the MACOS, adding a [ qemu: commandline ] field in the finally generated XML file, and transmitting relevant parameters of the maccosX operating system to qemu in a specified parameter form, wherein the content of the added field can be a code with the following parameters:
and fifthly, uploading the maccosX image and the boot file ESP. When creating the mirror image, os _ type selects MACOS, and sets mirror pixel data "hw _ firmware _ type" ═ uefi "and" hw _ machine _ type "═ q35" for the maccosX mirror image; and respectively manufacturing corresponding cloud hard disks by using the mirror images.
Sixthly, starting the virtual machine by using a cloud hard disk manufactured by ESP.qcow2 as a system disk: starting to create a maccosX virtual machine, selecting items and users, starting a template to start a cloud hard disk, and selecting a corresponding cloud hard disk; the bus type is selected from 'virtio-sata'; inputting a cloud host name, and selecting an available domain and a host; selecting a resource specification (vCPU number and virtual memory size); selecting "network" and "security group"; the CPU mode selects "adaptive", and the CPU model selects "Penryn".
And seventhly, mounting the cloud hard disk manufactured by the maccosX mirror image after the virtual machine is completely established. After the cloud hard disk is mounted successfully, restarting the virtual machine hard; after the restart is completed, entering a console page of a mac operating system virtual machine of the mac operating system virtual machine, entering a maccosX page guide system, and entering the maccosX operating system according to the prompt of the guide system.
And eighthly, mounting and dismounting the maccosX network card and the cloud hard disk, turning on and off the computer and the like through a neutron and a circular component of the ICOS cloud platform.
It should be noted that, if it is determined in the fourth step that the virtual machine is not a mirror image of the system type of the MACOS, at this time, a LINUX operating system virtual machine or a WINDOWS operating system virtual machine may need to be installed, and the specific creation mode may be created according to a mode of a virtual machine in an existing openstack cloud platform, which is not limited by the present invention.
The method of the invention provides a method and a strategy for supporting the creation of a maccosX virtual machine through the way that an ICOS cloud platform provides operation parameters matched with the maccosX operation platform, the way that a configuration item and a modification code are added in the ICOS cloud platform to realize the method, the way that an 'e 1000-82545 em' network card model is added in the ICOS cloud platform provides a virtual network card for the maccosX system, an ESP (electronic stability program) is uploaded to a glance platform respectively, the mirror image type is selected as MACOS, metadata of the mirror image is configured to UEFI (unified extensible firmware interface) boot start, the machine architecture is designated as 'q 35' type, the CPU model is set as 'Penryn' and the system bus type is designated as 'virtual-sata'. The method comprises the steps of firstly creating a cloud hard disk by using ESP.qcow2, starting a virtual machine by using the cloud hard disk, then mounting a volume created by a macos mirror image on a cloud host in a manner of mounting the cloud hard disk, and finally entering a macos X system in a UEFI manner by restarting the cloud host, so that the rapid creation of the macos X virtual machine and the stable operation of services are realized by the above operation, and a convenient and fast operation manner is provided for a user. The maccosX virtual machine can realize the communication with the virtual machine in the cloud platform and the operation of mounting and dismounting the cloud hard disk through the neutron component and the shader component on the ICOS cloud platform. And managing to realize the stable operation of the service in the maccosX system.
In another embodiment, referring to fig. 4, the present invention further provides an apparatus 80 for creating a virtual machine in a cloud platform, where the apparatus includes:
the parameter modification module 81 is used for modifying module parameters of the ICOS cloud platform so as to add mirror pixel data, a network card model, UEFI starting parameters, CPU parameters and system bus type parameters in the ICOS cloud platform;
the identification module 82 is used for identifying the system type of the file to be installed based on the mirror pixel data;
the parameter transmission module 83 is configured to, when the system type of the file to be installed is a mac operating system, transparently transmit mac operating system parameters to a qemu module of the ICOS cloud platform by adding a preset field in the generated XML file;
a creating module 84, configured to create a mac operating system virtual machine based on the file to be installed, the network card model in the ICOS cloud platform, the CPU parameter, and the system bus type parameter;
the boot starting module 85 is used for booting the mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI starting parameters in the ICOS cloud platform;
and the service deployment module 86 is used for deploying the service to the mac operating system virtual machine through the components of the ICOS cloud platform.
Firstly, a network card model is added in an ICOS cloud platform in a mode of adding configuration items and modifying codes in the ICOS cloud platform, metadata of a mirror image is configured to be UEFI boot, then when a file to be installed is judged to belong to a mac operating system, a mac operating system virtual machine is created based on the file to be installed, a network card model in the ICOS cloud platform, CPU parameters and system bus type parameters, and then the created mac operating system virtual machine is booted to enter the mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI boot parameters in the ICOS cloud platform; and finally, performing service deployment on the mac operating system virtual machine through the component of the ICOS cloud platform, thereby realizing the rapid establishment of the mac operating system virtual machine and the stable operation of the service, and providing a convenient and rapid operation mode for users.
It should be noted that, for specific limitations of the virtual machine creation apparatus in the cloud platform, refer to the above limitations on the virtual machine creation method in the cloud platform, and details are not repeated here. The modules in the virtual machine creation apparatus in the cloud platform may be wholly or partially implemented by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
According to another aspect of the present invention, a computer device is provided, the computer device may be a server, and the internal structure thereof is shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. When executed by a processor, the computer program implements the method for creating a virtual machine in a cloud platform, and specifically, the method includes the following steps:
modifying module parameters of the ICOS cloud platform to add mirror image metadata, a network card model, UEFI starting parameters, CPU parameters and system bus type parameters in the ICOS cloud platform;
identifying the system type of a file to be installed based on the mirror pixel data;
responding to the fact that the system type of the file to be installed is a mac operating system, and adding a preset field in the generated XML file to transparently transmit the mac operating system parameters to a qemu module of the ICOS cloud platform;
creating a mac operating system virtual machine based on the file to be installed, the network card model in the ICOS cloud platform, the CPU parameters and the system bus type parameters;
guiding to enter a mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI starting parameters in the ICOS cloud platform; and
and performing service deployment on the mac operating system virtual machine through the component of the ICOS cloud platform.
According to still another aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method for creating a virtual machine in a cloud platform described above, specifically, comprising performing the steps of:
modifying module parameters of the ICOS cloud platform to add mirror image metadata, a network card model, UEFI starting parameters, CPU parameters and system bus type parameters in the ICOS cloud platform;
identifying the system type of a file to be installed based on the mirror pixel data;
responding to the fact that the system type of the file to be installed is a mac operating system, and adding a preset field in the generated XML file to transparently transmit the mac operating system parameters to a qemu module of the ICOS cloud platform;
creating a mac operating system virtual machine based on the file to be installed, the network card model in the ICOS cloud platform, the CPU parameters and the system bus type parameters;
guiding to enter a mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI starting parameters in the ICOS cloud platform; and
and performing service deployment on the mac operating system virtual machine through the component of the ICOS cloud platform.
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 hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features. The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (9)
1. A virtual machine creation method in a cloud platform is characterized by comprising the following steps:
modifying module parameters of the ICOS cloud platform to add mirror image metadata, a network card model, UEFI starting parameters, CPU parameters and system bus type parameters in the ICOS cloud platform;
the method comprises the following steps of modifying module parameters of the ICOS cloud platform to add mirror pixel data, a network card model, UEFI starting parameters, CPU parameters and system bus type parameters into the ICOS cloud platform, wherein the steps comprise:
modifying a code module of the ICOS cloud platform to add a MACOS character string in the OSType type so as to identify a file to be installed;
adding an e1000-82545em network card model in a network card module of an ICOS cloud platform;
adding an environment configuration file in an ICOS cloud platform to enable a mac operating system virtual machine to boot in a UEFI mode;
adding a Penryn type CPU in an ICOS cloud platform;
adding a virtio-sata type bus in an ICOS cloud platform;
identifying the system type of the file to be installed based on the MACOS character string added in the OSType type;
responding to the fact that the system type of the file to be installed is a mac operating system, and adding a preset field in the generated XML file to transparently transmit the mac operating system parameters to a qemu module of the ICOS cloud platform;
creating a mac operating system virtual machine based on the file to be installed, the network card model in the ICOS cloud platform, the CPU parameters and the system bus type parameters;
guiding to enter a mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI starting parameters in the ICOS cloud platform; and
and performing service deployment on the mac operating system virtual machine through the component of the ICOS cloud platform.
2. The method for creating the virtual machine in the cloud platform according to claim 1, wherein the step of identifying the system type of the file to be installed based on the MACOS character string added to the OSType type includes:
acquiring a system type of a file to be installed;
in response to the fact that the system type of the file to be installed is matched with the MACOS character string added in the OSType type, confirming that the file to be installed is a mac operating system virtual machine;
and in response to the fact that the system type of the file to be installed is not matched with the MACOS character string added in the OSType type, confirming that the file to be installed is a LINUX operating system virtual machine or a WINDOWS operating system virtual machine.
3. The method for creating the virtual machine in the cloud platform according to claim 1, wherein the method further comprises:
uploading the file to be installed to a work module of an ICOS cloud platform, wherein the file to be installed comprises a boot file and a mac system mirror image;
and respectively creating a first cloud hard disk and a second cloud hard disk based on the boot file and the mac system mirror image.
4. The method for creating the virtual machine in the cloud platform according to claim 3, wherein the step of creating the mac operating system virtual machine based on the file to be installed, the network card model in the ICOS cloud platform, the CPU parameters and the system bus type parameters comprises:
configuring a system disk to be started by taking a first cloud hard disk as a template;
configuring the bus type as virtio-sata;
configuring a cloud host name, an available domain and a host;
configuring a network and a security group based on an e1000-82545em network card model;
the CPU is configured to be adaptive based on the CPU parameters, and the model is of Penryn type.
5. The method for creating the virtual machine in the cloud platform according to claim 3, wherein the step of booting the mac operating system of the created mac operating system virtual machine in a UEFI manner based on UEFI starting parameters in the ICOS cloud platform comprises the following steps:
in response to the fact that the mac operating system virtual machine is established, mounting the second cloud hard disk and restarting the mac operating system virtual machine;
and sequentially entering a console page of the mac operating system virtual machine, entering a page guide system of the mac operating system, and entering the mac operating system according to the prompt of the guide system.
6. The method for creating the virtual machine in the cloud platform according to claim 5, wherein the step of performing service deployment on the mac operating system virtual machine through the component of the ICOS cloud platform comprises:
carrying out mounting and unloading of a network card and a cloud hard disk of a mac operating system through a neutron component of an ICOS cloud platform;
and starting and shutting down the mac operating system virtual machine through a shader component of the ICOS cloud platform.
7. An apparatus for creating a virtual machine in a cloud platform, the apparatus comprising:
the parameter modification module is used for modifying module parameters of the ICOS cloud platform so as to add mirror pixel data, a network card model, UEFI starting parameters, CPU parameters and system bus type parameters in the ICOS cloud platform;
wherein the parameter modification module is further configured to:
modifying a code module of the ICOS cloud platform to add a MACOS character string in the OSType type so as to identify a file to be installed;
adding an e1000-82545em network card model in a network card module of an ICOS cloud platform;
adding an environment configuration file in an ICOS cloud platform to enable a mac operating system virtual machine to boot in a UEFI mode;
adding a Penryn type CPU in an ICOS cloud platform;
adding a virtio-sata type bus in an ICOS cloud platform;
the identification module is used for identifying the system type of the file to be installed based on the MACOS character string added in the OSType type;
the parameter transmission module is used for transmitting the mac operating system parameters to a qemu module of the ICOS cloud platform by adding preset fields in the generated XML file when the system type of the file to be installed is the mac operating system;
the creating module is used for creating a mac operating system virtual machine based on the file to be installed, the network card model in the ICOS cloud platform, the CPU parameters and the system bus type parameters;
the boot starting module is used for booting the mac operating system of the created mac operating system virtual machine in a UEFI mode based on UEFI starting parameters in the ICOS cloud platform;
and the service deployment module is used for deploying the service of the mac operating system virtual machine through the component of the ICOS cloud platform.
8. A computer device, comprising: at least one processor; and
a memory storing a computer program operable on the processor, the processor when executing the program performing the method of any of claims 1-6.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110587531.5A CN113419814B (en) | 2021-05-27 | 2021-05-27 | Virtual machine creating method, device, equipment and storage medium in cloud platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110587531.5A CN113419814B (en) | 2021-05-27 | 2021-05-27 | Virtual machine creating method, device, equipment and storage medium in cloud platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113419814A CN113419814A (en) | 2021-09-21 |
CN113419814B true CN113419814B (en) | 2022-03-08 |
Family
ID=77713043
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110587531.5A Active CN113419814B (en) | 2021-05-27 | 2021-05-27 | Virtual machine creating method, device, equipment and storage medium in cloud platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113419814B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116009899B (en) * | 2023-01-04 | 2023-09-15 | 北京首都在线科技股份有限公司 | Mirror image making method and device of operating system, electronic equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108206750A (en) * | 2016-12-16 | 2018-06-26 | 北京国双科技有限公司 | The configuration method and device of virtual machine network interface card |
CN108632360A (en) * | 2018-04-12 | 2018-10-09 | 北京百悟科技有限公司 | A kind of virtual cloud terminal and virtual cloud terminal server |
CN109002346A (en) * | 2018-07-10 | 2018-12-14 | 广东微云科技股份有限公司 | A kind of conversion method of Windows virtual machine boot program |
CN109284153A (en) * | 2017-07-21 | 2019-01-29 | 中兴通讯股份有限公司 | Method, relevant device and the computer media of single machine experience multiple operating system |
CN111045781A (en) * | 2019-11-07 | 2020-04-21 | 中国电子科技集团公司电子科学研究院 | Method and device for creating mirror image on cloud platform and storage medium |
CN111324418A (en) * | 2020-02-09 | 2020-06-23 | 苏州浪潮智能科技有限公司 | OpenStack-based virtual machine template generation method and device |
CN112286633A (en) * | 2020-10-28 | 2021-01-29 | 平安科技(深圳)有限公司 | Virtual machine creating method, device, equipment and storage medium based on CloudStack platform |
CN112416377A (en) * | 2020-11-23 | 2021-02-26 | 苏州浪潮智能科技有限公司 | Boot image manufacturing method and device, electronic equipment and storage medium |
CN112463296A (en) * | 2020-11-25 | 2021-03-09 | 苏州浪潮智能科技有限公司 | Method and device for creating virtual machine |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11762666B2 (en) * | 2019-01-29 | 2023-09-19 | Walmart Apollo, Llc | Methods and apparatus for hypervisor boot up |
-
2021
- 2021-05-27 CN CN202110587531.5A patent/CN113419814B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108206750A (en) * | 2016-12-16 | 2018-06-26 | 北京国双科技有限公司 | The configuration method and device of virtual machine network interface card |
CN109284153A (en) * | 2017-07-21 | 2019-01-29 | 中兴通讯股份有限公司 | Method, relevant device and the computer media of single machine experience multiple operating system |
CN108632360A (en) * | 2018-04-12 | 2018-10-09 | 北京百悟科技有限公司 | A kind of virtual cloud terminal and virtual cloud terminal server |
CN109002346A (en) * | 2018-07-10 | 2018-12-14 | 广东微云科技股份有限公司 | A kind of conversion method of Windows virtual machine boot program |
CN111045781A (en) * | 2019-11-07 | 2020-04-21 | 中国电子科技集团公司电子科学研究院 | Method and device for creating mirror image on cloud platform and storage medium |
CN111324418A (en) * | 2020-02-09 | 2020-06-23 | 苏州浪潮智能科技有限公司 | OpenStack-based virtual machine template generation method and device |
CN112286633A (en) * | 2020-10-28 | 2021-01-29 | 平安科技(深圳)有限公司 | Virtual machine creating method, device, equipment and storage medium based on CloudStack platform |
CN112416377A (en) * | 2020-11-23 | 2021-02-26 | 苏州浪潮智能科技有限公司 | Boot image manufacturing method and device, electronic equipment and storage medium |
CN112463296A (en) * | 2020-11-25 | 2021-03-09 | 苏州浪潮智能科技有限公司 | Method and device for creating virtual machine |
Also Published As
Publication number | Publication date |
---|---|
CN113419814A (en) | 2021-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6649510B2 (en) | File processing method and device based on patch upgrade, terminal, and storage medium | |
US9519654B2 (en) | Method, device, processing center and system for desktop synchronization | |
US10447814B2 (en) | Joint servicing of software packages | |
CN112130871B (en) | Method and device for remotely deploying middleware, computer equipment and storage medium | |
CN110968331B (en) | Method and device for running application program | |
CN110673923A (en) | XWIKI system configuration method, system and computer equipment | |
CN111966423B (en) | Method and equipment for realizing memory operating system | |
CN111026723B (en) | Big data cluster management control method and device, computer equipment and storage medium | |
CN113419814B (en) | Virtual machine creating method, device, equipment and storage medium in cloud platform | |
CN111078305A (en) | Information acquisition method and device, server and information management system | |
CN111324418A (en) | OpenStack-based virtual machine template generation method and device | |
CN114385251A (en) | Operating system booting method, system, terminal and storage medium based on memory | |
CN113419813A (en) | Method and device for deploying bare engine management service based on container platform | |
CN109471665B (en) | Method for automatically installing Windows operating system | |
CN109284137B (en) | Hypervisor-based QNX operating system starting method and device | |
CN111309389A (en) | Multi-user management method and system based on BIOS | |
CN116450165A (en) | Method, system, terminal and storage medium for quickly building environment and deploying program | |
CN110688130A (en) | Physical machine deployment method, physical machine deployment device, readable storage medium and electronic equipment | |
CN113918179A (en) | Method and system for automatically installing OS (operating system) by cooperation of host and intelligent network card under Linux | |
CN113708971A (en) | Openstack cloud platform deployment method and related device | |
CN109828752B (en) | Project code automatic generation method, device, computer equipment and storage medium | |
CN111008043A (en) | Server starting method of cloud platform and terminal | |
CN111563038A (en) | SDK test method, device, computer equipment and computer readable storage medium | |
CN111240805A (en) | Cloud operating system user switching processing method and device | |
CN111241553A (en) | BIOS (basic input output System) permission setting method, device, equipment 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 |