CN116700897A - Method and device for creating computing environment template, computing equipment and storage medium - Google Patents

Method and device for creating computing environment template, computing equipment and storage medium Download PDF

Info

Publication number
CN116700897A
CN116700897A CN202310693874.9A CN202310693874A CN116700897A CN 116700897 A CN116700897 A CN 116700897A CN 202310693874 A CN202310693874 A CN 202310693874A CN 116700897 A CN116700897 A CN 116700897A
Authority
CN
China
Prior art keywords
virtual machine
template
computing environment
environment
computing device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310693874.9A
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.)
Capitalonline Data Service Co ltd
Original Assignee
Capitalonline Data Service 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 Capitalonline Data Service Co ltd filed Critical Capitalonline Data Service Co ltd
Priority to CN202310693874.9A priority Critical patent/CN116700897A/en
Publication of CN116700897A publication Critical patent/CN116700897A/en
Pending legal-status Critical Current

Links

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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a method and a device for creating a computing environment template, computing equipment and a storage medium, and relates to the technical field of computers. According to the embodiment of the application, firstly, an operation environment which is adapted to a virtual machine manager is configured in first physical computing equipment, the virtual machine manager is installed, then, a virtual machine is created in the first physical computing equipment through the virtual machine manager, a computing environment template is created in the virtual machine, the computing environment template comprises a hardware environment and a software environment, and then the computing environment template is packaged, wherein the computing environment template is configured with a virtual machine initialization tool. By adopting the scheme, the virtual machine can be created by the on-line physical computing equipment, the computing environment template is created by the virtual machine, the required hardware environment is simple, the limitation of the on-line physical computing equipment is less, and the template creation efficiency is high. Therefore, the purpose of breaking through the physical limitation of creating the template and creating the computing environment template more efficiently and conveniently can be achieved.

Description

Method and device for creating computing environment template, computing equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for creating a computing environment template, a computing device, and a storage medium.
Background
In the field of computer technology, when a computing environment template needs to be created for a cloud/remote computing device, the template needs to be created in an environment with the same configuration, the required hardware environment is complex, the limitation of off-line physical computing devices is more, and the template creation efficiency is lower.
The traditional method for creating the computing environment template needs to use at least two offline physical computing devices, wherein one offline physical computing device is used for creating the template, and the requirement is that the hardware configuration of the device is the same as the hardware configuration of the cloud/remote computing device; the other offline physical computing device is used for making image files of other configurations except hardware in the cloud/remote computing device, and importing the image files into the offline physical computing device for creating the template, so that all configurations of the offline physical computing device for creating the template are identical to the target physical computing device of the cloud/remote computing device of the computing environment template to be deployed.
This conventional method has various drawbacks such as: when a physical computing device with special hardware configuration is used as a device for creating a template, the difficulty of finding an off-line physical computing device with the same hardware configuration is high; at least two off-line physical computing devices are required to be used simultaneously, and high requirements are imposed on sites for creating a computing environment template by using the off-line physical computing devices; in addition, operations such as creating, exporting, importing an image file, etc. between at least two offline physical computing devices are required to be repeated, so that the time taken to create the computing environment template is long. Therefore, the method for creating the template in the computing environment requires a complex hardware environment, is more limited by off-line physical computing equipment, and has lower template creation efficiency.
Disclosure of Invention
The embodiment of the application provides a method, a device, computing equipment and a storage medium for creating a computing environment template, so as to fully or partially solve the technical problems.
In a first aspect, an embodiment of the present application provides a method for creating a computing environment template, applied to a first physical computing device, where the method includes:
configuring an operating environment adapted to a virtual machine manager in the first physical computing device, and installing the virtual machine manager;
creating, by the virtual machine manager, a virtual machine in the first physical computing device;
creating a computing environment template in the virtual machine, wherein the computing environment template comprises a hardware environment and a software environment;
and packaging the computing environment template, wherein the computing environment template is configured with a virtual machine initialization tool.
In a second aspect, an embodiment of the present application provides a method for configuring a computing environment, applied to a target physical computing device, where the method includes:
acquiring a computing environment template, wherein the computing environment template is configured with a virtual machine initialization tool;
invoking the virtual machine initialization tool to create a virtual machine on the target physical computing device;
Invoking the computing environment template creates a computing environment in the virtual machine, the computing environment comprising a hardware environment and a software environment.
In a third aspect, an embodiment of the present application provides an apparatus for creating a computing environment template, applied to a first physical computing device, where the first physical computing device has a function of running a virtual machine, and the apparatus includes:
an environment configuration module for configuring an operating environment adapted to a virtual machine manager in the first physical computing device;
the manager installation module is used for installing a virtual machine manager;
a virtual machine creation module configured to create, by the virtual machine manager, a virtual machine in the first physical computing device;
the template creation module is used for creating a computing environment template in the virtual machine, wherein the computing environment template comprises a hardware environment and a software environment;
and the template packaging module is used for packaging the computing environment template, and the computing environment template is configured with a virtual machine initialization tool.
In a fourth aspect, an embodiment of the present application provides a configuration apparatus of a computing environment, applied to a target physical computing device, where the apparatus includes:
The template acquisition module is used for acquiring a computing environment template, and the computing environment template is configured with a virtual machine initialization tool;
a virtual machine creation module for calling the virtual machine initialization tool to create a virtual machine on the target physical computing device;
and the computing environment creation module is used for calling the computing environment template to create a computing environment in the virtual machine, wherein the computing environment comprises a hardware environment and a software environment.
In a fifth aspect, embodiments of the present application provide a physical computing device comprising a memory, a processor and a computer program stored on the memory, the processor implementing the method according to any of the embodiments of the present application when the computer program is executed.
In a sixth aspect, embodiments of the present application provide a computing device readable storage medium having stored therein a computer program which, when executed by a processor, implements a method according to any of the embodiments of the present application.
Compared with the related art, the application has the following advantages:
according to the embodiment of the application, firstly, an operating environment adapted to a virtual machine manager is configured in first physical computing equipment under the online state, and the virtual machine manager is installed; secondly, creating a virtual machine in the first physical computing device through the virtual machine manager; again, in the virtual machine, a computing environment template is created, which may include a hardware environment and a software environment; finally, the computing environment template is packaged, wherein the computing environment template is configured with a virtual machine initialization tool, and therefore the creating process of the computing environment template is completed. Furthermore, the packaged computing environment templates can be arranged to a plurality of target physical computing devices at the distal end/cloud end of the computing environment templates to be deployed in batches at the cloud end. In addition, after encapsulation, the created computing environment template can be tested, the availability of the encapsulated computing environment template can be verified, and the experience of a user in using the target physical computing device can be ensured by deploying the computing environment template after offline and online testing. In the embodiment of the application, because the mode of creating the computing environment template through the virtual machine is used, only one off-line physical computing device is needed in the process of creating the computing environment template, and other off-line physical computing devices are not needed to be equipped; meanwhile, the virtual machine is used for creating the computing environment template, so that the hardware configuration of the off-line physical computing device and the hardware configuration of the target physical computing device at the cloud end/far end of the computing environment template to be deployed are not required to be completely the same, and only the off-line physical computing device can create and run the virtual machine. Therefore, compared with the related art, the method and the system have the advantages that the required hardware environment is simple, the limitation of off-line physical computing equipment is small, and the template creation efficiency is high. That is, the application breaks through the physical limitation of creating templates and can more efficiently and conveniently create the computing environment templates.
The foregoing description is only an overview of the present application, and is intended to provide a better understanding of the technical means of the present application, as it is embodied in the present specification, and is intended to provide a better understanding of the above and other objects, features and advantages of the present application, as it is embodied in the following description.
Drawings
In the drawings, the same reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily drawn to scale. It is appreciated that these drawings depict only some embodiments according to the application and are not therefore to be considered limiting of its scope.
FIG. 1 illustrates a schematic diagram of one example application for creating a computing environment template;
FIG. 2 illustrates a schematic diagram of one example application of creating a computing environment template in accordance with one embodiment of the application;
FIG. 3 illustrates a flow chart of a method of creating a computing environment template for application to a first physical computing device in accordance with an embodiment of the application;
FIG. 4 illustrates a flow chart of a method of configuration of a computing environment for a target physical computing device in accordance with an embodiment of the application;
FIG. 5 illustrates a block diagram of an apparatus for creating a computing environment template deployed at a first physical computing device in accordance with one embodiment of the application;
FIG. 6 illustrates a block diagram of a configuration apparatus of a computing environment for a target physical computing device to which an embodiment of the application is applied;
FIG. 7 is a block diagram illustrating a physical computing device used to implement an embodiment of the application.
Detailed Description
Hereinafter, only certain exemplary embodiments are briefly described. As will be recognized by those skilled in the pertinent art, the described embodiments may be modified in numerous different ways without departing from the spirit or scope of the present application. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.
In order to facilitate understanding of the technical solutions of the embodiments of the present application, the following describes related technologies of the embodiments of the present application. The following related technologies may be optionally combined with the technical solutions of the embodiments of the present application, which all belong to the protection scope of the embodiments of the present application.
In one related art prior to the present application, at least two physical computing devices under the line are needed in creating the computing environment template, as shown in fig. 1, which is a schematic diagram of an application example of creating the computing environment template. Firstly, a first off-line physical computing device with the same hardware configuration as a target physical computing device with a template to be installed needs to be found; secondly, using another offline physical computing device (second physical computing device), making all mirror images of the target physical computing device at the far end/cloud end through a network, and importing mirror image files into the first physical computing device so that all configurations of the first physical computing device and the target physical computing device are completely the same; thirdly, in the configured first physical computing device, installing an operating system, corresponding application software, hardware drivers, scripts and the like according to the configuration requirements of a user using the target physical computing device, and packaging the configured computing environment into a template; and finally, uploading the packaged computing environment template to a cloud end, testing by using a cloud end server, and deploying the packaged computing environment template on target physical computing equipment after the testing is completed. However, this method of creating a computing environment template in the related art has a number of drawbacks, such as: when a physical computing device with special hardware configuration is used as a device for creating a template, the difficulty of finding an off-line physical computing device with the same hardware configuration is high; at least two off-line physical computing devices are required to be used simultaneously, and high requirements are imposed on sites for creating a computing environment template by using the off-line physical computing devices; in addition, operations such as creating, exporting, importing an image file, etc. between at least two offline physical computing devices are required to be repeated, so that the time taken to create the computing environment template is long. Therefore, the method for creating the template in the computing environment requires a complex hardware environment, is more limited by off-line physical computing equipment, and has lower template creation efficiency.
In view of the above, the embodiments of the present application provide a new method for creating a computing environment template, so as to solve all or part of the above technical problems, and achieve the purposes of more efficiently and conveniently creating a computing environment template and breaking through the physical limitation of creating the template.
The embodiment of the application relates to a method for creating a computing environment template, which is applied to a scene that an off-line physical computing device creates the computing environment template for a target physical computing device at a far end/cloud end, has no special requirements on the required hardware and other configurations of the off-line physical computing device, and can be a desktop computer or a notebook computer, for example, as long as the off-line physical computing device can run a virtual machine manager (Hypervisor) and create a virtual machine. After a virtual machine is created in the online physical computing device, a computing environment template is created for the target physical computing device of the remote/cloud end through the virtual machine.
The scheme of the embodiment of the application can be applied to various scenes needing to create the computing environment template, including but not limited to creating a software environment template for a cloud platform, creating an operating system template for bare metal and the like, so as to achieve the purpose of breaking through the physical limitation of creating the computing environment template, thereby providing convenience, saving time and improving efficiency for the work of creating the computing environment template by a person skilled in the art and deploying the computing environment template on a plurality of computing devices in a cloud in batches.
In order to more clearly demonstrate the method for creating a computing environment template provided in the embodiment of the present application, a specific application example of the solution of the embodiment of the present application is given below, and fig. 2 is a schematic diagram showing an application example of creating a computing environment template according to an embodiment of the present application. As shown in fig. 2, the first offline physical computing device is referred to in the figure, and the computing device may be any physical computing device capable of running a virtual machine manager (also called virtual machine monitor, abbreviated as VMM) and creating a virtual machine, including, but not limited to, a desktop computer, a notebook computer, a tablet computer, etc.; the operating system used in the first physical computing device may be a Linux operating system. The offline environment test referred in the figure may be that the packaged computing environment template is installed on other physical computing devices offline, and the computing device may be any physical computing device, which is not required to be configured identically to the first physical computing device or the target physical computing device of the remote/cloud end of the computing environment template to be deployed; the computing device may run a virtual machine.
First, any first physical computing device capable of running a virtual machine needs to be found, a virtual machine initialization tool cluster-init is called, a virtual machine running environment of a virtual machine manager KVM (Keyboard Video Mouse, a virtual machine manager) is created, and an operating system of KVM running is built. Wherein: cloud-init is a tool developed specifically for the initialization of virtual machines in cloud environments, which reads relevant data from various data sources and configures the virtual machines accordingly. Common data sources include: metadata services, configDrive, etc. of the cloud platform, common configurations include: setting hostname, hosts files of the virtual machine, setting user name and password, updating local cache of the apt-get, adjusting the size of a file system and the like; KVM is a virtual machine manager (Hypervisor); there are a variety of virtual machine managers (hypervisors) such as VMware vSphere, microsoft Hypericum-V, citrix XenServer, IBM PowerVM, red Hat Enterprise Virtulization, huawei FusionSphere, open source KVM, xen, virtualBSD, and the like.
Secondly, in the first physical computing device, a hardware image of the target physical computing device at the far end/cloud end of the template to be installed (i.e. a hardware image of the target physical computing device to be installed with the template) is made, and the step mainly configures a GPU customized by a user or special hardware according to the requirement of the user using the target physical computing device so as to install corresponding hardware drivers in the packaged computing environment template later. Since the KVM itself cannot perform any hardware simulation, it is necessary to set an address space of a virtual server through the/dev/KVM interface, provide it with virtual I/O devices (Input/Output devices), and map its video display back to the display screen of the host. Wherein: the host is the first physical computing device in the application; the I/O device belongs to a hardware component in a computer, and is an external device that can input data to the computer or can receive data output from the computer. However, if the virtual machine used is not a KVM, but is another virtual machine that can virtualize a hardware environment, this step may be omitted, and the hardware environment may be directly configured in the virtual machine.
Then, in the first physical computing device, a KVM virtual machine is created. Thus, in the created KVM virtual machine, according to the configuration requirement of the user using the target physical computing device, a computing environment template required by the user is created, including an operating system, application software, a hardware driver, a script, and the like (i.e., an installation system, an installation software, a driver, and the like), the created computing environment is packaged into a template, and a virtual machine initialization tool cluster-init is installed on the packaged template, and network configuration is deleted, history record is deleted, and the like.
Finally, the computing environment template can be tested by using other offline physical computing devices, cloud servers and the like (i.e., offline environment test, cloud environment test), and the template can be stored in a cloud environment after the test is completed and deployed on the target physical computing devices, wherein the deployment can be batch deployment on a plurality of target physical computing devices (i.e., cloud batch deployment on the target physical computing devices 1, 2, n and the like).
The scheme has low requirement on hardware for creating the computing environment template, improves the creating speed of the computing environment template, and can shorten the time which originally takes tens of hours to create 1 computing environment template to less than one hour. Therefore, the application can break through the physical limitation of creating the template and create the computing environment template more efficiently and conveniently.
The embodiment of the application provides a method for creating a computing environment template, which is applied to first physical computing equipment, and fig. 3 is a flowchart of the method for creating the computing environment template, which is applied to the first physical computing equipment according to one embodiment of the application. As shown in fig. 3, the method 300 includes:
In step S301, a running environment adapted to a virtual machine manager is configured in a first physical computing device, and the virtual machine manager is installed.
The first physical computing device according to the embodiment of the present application may be any physical computing device capable of running a virtual machine manager and creating a virtual machine, including, but not limited to, a desktop computer, a notebook computer, a tablet computer, and the like, and does not require that the first physical computing device be configured identically to a target physical computing device hardware/software of a remote/cloud end of a computing environment template to be deployed.
The virtual machine manager (Hypervisor), also known as Virtual Machine Monitor (VMM), is involved. There are a number of virtual machine managers (hypervisors) including, but not limited to, the following:
1. VMware vSphere, a kind of virtual machine manager, can integrate the server in order to help users to make full use of the hardware, provide virtualization and centralized management of at most three server host computers, the operating system of adaptation includes Windows, suSE Linux 11;
2. Hyper-V is a virtual machine manager, and can be created by adopting two simulation modes of Para-virtualization (Para-virtualization) and Full-virtualization (Full-virtualization), wherein the Para-virtualization mode requires that the virtual machine is the same as an operating system (usually Windows with the same version) of a physical host machine so as to enable the virtual machine to achieve high performance; the full virtualization approach requires the CPU to support full virtualization functions (such as Inter-VT or AMD-V) in order to be able to create virtual machines using different operating systems (such as Linux and Mac OS);
3. Xen, an open source virtual machine monitor, can run up to 100 full featured operating systems on a single computer. The operating system must be explicitly modified ("ported") to run on Xen (but provide compatibility with user applications). This allows Xen to achieve high performance virtualization without special hardware support.
4. KVM, which is a short term for kernel-based Virtual Machine, is a full-virtualization lightweight virtual machine monitor based on a Linux kernel and assisted by hardware. KVM has become one of the mainstream VMMs in the academia. With KVM, multiple virtual machines may be allowed to run, which may employ operating systems including, but not limited to Linux, windows. However, the KVM does not provide a function of hardware simulation (i.e. simulating the memory, hard disk, etc. of each virtual machine), such as cannot simulate I/O devices, so the virtualization of the KVM requires hardware support (such as Intel VT technology or AMD technology), for example, by simulating a hardware device with a QEMU tool capable of simulating any hardware, and combining the QEMU after modification with the KVM to form KVM-QEMU, so as to complete the hardware virtualization function.
5. QEMU, a virtual machine monitor developed with help of fabricb belard (fabricb belard) and other developers, is widely used in Linux systems. The QEMU can simulate the whole computer system, including a cpu and other peripheral devices, and can also be used to virtualize a plurality of different virtual machines on a host.
In one possible implementation, configuring, in the first physical computing device, a running environment adapted to the virtual machine manager, the initialized running environment of the virtual machine manager being configurable by invoking a virtual machine initialization tool; and calling an operating system running tool, configuring the mode of the operating system running by the virtual machine manager, and configuring the required running environment.
In the embodiment of the application, since different initialization running environments are required for running different virtual machine managers in the first physical computing device, the initialization running environments suitable for the virtual machine manager can be configured by calling a virtual machine initialization tool, for example, for a KVM virtual machine manager, a virtual machine initialization tool closed-init can be called, the size of a system hard disk adaptation area required to be used by the virtual machine manager, the host name (hostname) of the virtual machine, a system file (hosts file), a user name password, local cache of an update software source (apt-get) and the size of a file system are set, so that the initialization running environments suitable for the virtual machine manager are configured; meanwhile, since different virtual machine managers need different operating systems for running in the first physical computing device, for example, KVM needs Linux system, hyper-V needs Windows system, VMware vSphere needs Windows system or SuSE Linux 11 system, and the like, the operating system running by the virtual machine manager can be configured by calling an operating system running tool in the first physical computing device.
The virtual machine initialization tool according to the embodiment of the present application may set an initialization environment suitable for running a virtual machine in the first physical computing device, for example, a virtual machine initialization tool closed-init, which is not limited in this aspect of the present application.
The operating system running tool according to the embodiment of the present application may run an operating system in the first physical computing device, where a corresponding virtual machine manager may be run, and the present application is not limited in this regard.
In step S302, a virtual machine is created in a first physical computing device by a virtual machine manager.
In one possible implementation, the virtual machine created by the virtual machine manager may be one or more than one virtual machine; one computing environment template may be created in one virtual machine, or a plurality of computing environment templates may be created in a plurality of virtual machines at the same time, which is not limited in this regard by the present application.
In step S303, in the virtual machine, a computing environment template is created, the computing environment template including a hardware environment and a software environment.
The computing environment template according to the embodiments of the present application is a computing environment template created according to the requirement configuration of the user using the target physical computing device, and the computing environment template may include a specific hardware configuration, such as a GPU customized by the user using the target physical computing device, or may include a specific software configuration, such as a customized operating system software, various application software, a hardware driver, a specific script program, and the like, which is not limited in this aspect of the present application.
In a possible implementation manner, the hardware environment and the software environment in the computing environment template created in the virtual machine may include: in the virtual machine, configuring a hardware environment according to an image file of a target physical computing device of a remote end/cloud end of a computing environment template to be installed; in the virtual machine, a software environment is configured according to the configuration requirement file, and the software environment comprises an operating system, application software and a hardware driver.
In the embodiment of the application, because some virtual machine managers cannot simulate the hardware environment required by the target physical computing equipment, the mirror image hardware environment of the target physical computing equipment at the cloud end/far end of the computing environment template to be deployed can be made through the first physical computing equipment, and then corresponding hardware drivers are installed in the created computing environment template, so that the computing environment template can drive the hardware on the target physical computing equipment after being deployed to the equipment.
In an embodiment, in a KVM virtual machine, since the KVM does not provide a function of hardware simulation, such as an I/O device cannot be simulated, the virtualization of the KVM requires hardware support, and the first physical computing device and the target physical computing device at the cloud/remote end of the computing environment template to be deployed can be connected through a network, and a hardware image of the target physical computing device at the cloud/remote end of the computing environment template to be deployed is made on the first physical computing device, that is, according to a requirement of a user using the target physical computing device, a GPU or special hardware customized by the user is configured, so that a corresponding hardware driver can be installed in the packaged computing environment template. For example, an address space of a virtual server is set up through the/dev/kvm interface, which is provided with virtual I/O devices (Input/Output Input Output devices), and whose video display is mapped back to the display screen of the first physical computing device. However, if the virtual machine used is not a KVM, but is another virtual machine that can virtualize a hardware environment, this step may be omitted, and the hardware environment may be directly configured in the virtual machine.
The configuration requirements file according to the embodiments of the present application uses the specific requirements of the computing environment template required by the user of the target physical computing device, including but not limited to the specific hardware requirements, software requirements, etc., which are not limited in any way by the present application.
In step S304, a computing environment template is packaged, the computing environment template being configured with a virtual machine initialization tool.
In the embodiment of the present application, since the packaged computing environment templates need to be deployed on the cloud/remote target physical computing devices, in general, the configuration of multiple target physical computing devices may not be identical, for example, some device system hard disks are 100G in size, some device system hard disks are 200G in size, some device system hard disks are 300G in size, if the computing environment templates need to be deployed on multiple target physical computing devices, a virtual machine initialization tool is needed, an environment suitable for the computing environment templates to run is configured on the target physical computing devices, for example, a system hard disk adaptation area suitable for the computing environment templates to run is partitioned in the target physical computing devices. Thus, the computing environment templates that need to be packaged are configured with virtual machine initialization tools.
The encapsulation, namely hiding the attribute and the implementation detail of the object, only discloses an interface externally, and controls the read and modified access level of the attribute in the program; the abstracted data and actions (or functions) are combined to form an organic whole, i.e., the data is organically combined with source code of the operation data to form a class, wherein the data and the functions are members of the class. Similar to packaging a computing environment template that has been configured with the required hardware, software, etc., into a package, forming a whole.
In one possible implementation, for a computing environment template created by using a KVM virtual machine, after the template is packaged, a virtual machine initialization tool group-init, deleting network configuration, deleting a history record, and so on may be installed, and when the packaged computing environment template is deployed on a target physical computing device, the virtual machine initialization tool group-init may be first invoked to configure a system hard disk adaptation area size, network configuration, and so on suitable for the operation of the template, and then the computing environment template is operated.
In some embodiments, the creating scheme of the computing environment template may further include: uploading the packaged computing environment template to a second physical computing device to test the packaged computing environment template at the second physical computing device.
The second physical computing device involved in the embodiment of the present application may be any offline physical computing device, including but not limited to a desktop computer, a notebook computer, a tablet computer, etc., and does not require that the computing device be configured identically to the first physical computing device or the target physical computing device of the remote/cloud end of the computing environment template to be deployed.
The test related to the embodiment of the application mainly carries out template verification on the packaged computing environment template, and can further optimize the template after verification, and the verification content comprises, but is not limited to, whether a virtual machine initialization tool is normally started, a network is configured, the hard disk is expanded, the super user authority (root authority) is not limited in any way, and the like.
In some embodiments, the method for creating a computing environment template may further include: uploading the packaged computing environment template to a cloud end so as to test the packaged computing environment template at the cloud end.
The method for uploading the encapsulated computing environment template to the cloud end in the embodiment of the application can comprise a physical computing device uploaded to the cloud end or a virtual computing device uploaded to the cloud end, and the computing environment template can be deployed on a target computing device at a remote end/cloud end through the cloud end, so that the method is not limited in any way.
The embodiment of the application also provides a configuration method of the computing environment, which is applied to the target physical computing device, and fig. 4 is a flowchart of the configuration method of the computing environment, which is applied to the target physical computing device according to an embodiment of the application. As shown in fig. 4, the method includes:
in step S401, a computing environment template configured with a virtual machine initialization tool is acquired.
The method for acquiring the computing environment template in the embodiment of the application can be that the target physical computing equipment acquires the computing environment template from the cloud through a network; or may be a computing environment template that the target physical computing device obtains from other physical hardware offline, and the application is not limited in this regard.
In step S402, a virtual machine initialization tool is invoked to create a virtual machine on a target physical computing device.
In the embodiment of the application, since the configurations of different target physical computing devices are not identical, for example, some device system hard disks are 100G in size, some device system hard disks are 200G in size, and some device system hard disks are 300G in size, a virtual machine initialization tool configured on an encapsulated computing environment template can be called, a system hard disk adaptation area suitable for the operation of the computing environment template is partitioned on the target physical computing device, and a corresponding virtual machine is created to operate a required computing environment in the virtual machine.
In step S403, a computing environment template is invoked to create a computing environment in the virtual machine, the computing environment comprising a hardware environment and a software environment.
The hardware environment and the software environment in the related computing environment may be configured according to the requirements of a user using the target physical computing device, may include special hardware configurations, such as a GPU customized by the user, and may also include special software configurations, such as customized operating system software, various application software, hardware drivers, special script programs, and the like, which are not limited in this respect by the present application.
Correspondingly to the application scene and the method of the method provided by the embodiment of the application, the embodiment of the application also provides a device for creating the computing environment template, which is applied to the first physical computing equipment. FIG. 5 is a block diagram illustrating the structure of an apparatus for creating a computing environment template for a first physical computing device according to an embodiment of the present application, where the apparatus for creating a computing environment template may include:
an environment configuration module 501 configured to configure, in the first physical computing device, an operating environment adapted to a virtual machine manager;
a manager installation module 502 for installing a virtual machine manager;
a virtual machine creation module 503, configured to create a virtual machine in the first physical computing device through the virtual machine manager;
a template creation module 504, configured to create a computing environment template in the virtual machine, where the computing environment template includes a hardware environment and a software environment;
the template packaging module 505 is configured to package the computing environment template, where the computing environment template is configured with a virtual machine initialization tool.
In one possible implementation, the environment configuration module 501 may include:
the initialization running environment configuration sub-module is used for calling a virtual machine initialization tool and configuring the initialization running environment of the virtual machine manager;
The operating system configuration submodule is used for calling an operating system running tool and configuring an operating system running by the virtual machine manager.
In one possible implementation, the template creation module 504 may include:
a hardware environment configuration submodule, configured to configure a hardware environment in the virtual machine according to an image file of a target physical computing device to be installed with the computing environment template;
and the software environment configuration submodule is used for configuring a software environment in the virtual machine according to the configuration requirement file, and the software environment comprises an operating system, application software and a hardware driver.
In one possible embodiment, the apparatus may further include:
and the first testing module is used for uploading the computing environment template to a second physical computing device so as to test the packaged computing environment template on the second physical computing device.
In one possible embodiment, the apparatus may further include:
and the second testing module is used for uploading the computing environment template to the cloud so as to test the packaged computing environment template at the cloud.
Correspondingly to the application scene and the method of the method provided by the embodiment of the application, the embodiment of the application also provides a configuration device of the computing environment, which is deployed on the target physical computing equipment. FIG. 6 is a block diagram illustrating a configuration apparatus for a computing environment of a target physical computing device according to an embodiment of the present application, the apparatus may include:
A template obtaining module 601, configured to obtain a computing environment template, where the computing environment template is configured with a virtual machine initialization tool;
a virtual machine creation module 602, configured to invoke the virtual machine initialization tool to create a virtual machine on the target physical computing device;
a computing environment creation module 603, configured to invoke the computing environment template to create a computing environment in the virtual machine, where the computing environment includes a hardware environment and a software environment.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. The functions of each module in each device of the embodiment of the present application may be referred to the corresponding descriptions in the above methods, and have corresponding beneficial effects, which are not described herein.
Corresponding to the application scenario and method of the method provided by the embodiment of the present application, the embodiment of the present application further provides a physical computing device, and fig. 7 is a block diagram of a physical computing device used to implement the embodiment of the present application. As shown in fig. 7, the physical computing device includes:
a memory 701 and a processor 702, the memory 701 storing a computer program executable on the processor 702. The processor 702, when executing the computer program, implements the methods of the embodiments described above. The number of memories 701 and processors 702 may be one or more.
The first physical computing device further includes: and the communication interface 703 is used for communicating with external equipment and performing data interaction transmission.
If the memory 701, the processor 702, and the communication interface 703 are implemented independently, the memory 701, the processor 702, and the communication interface 703 may be connected to each other and perform communication with each other through buses. The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 7, but not only one bus or one type of bus.
In some embodiments, if the memory 701, the processor 702, and the communication interface 703 are integrated on a single chip, the memory 701, the processor 702, and the communication interface 703 may communicate with each other through internal interfaces.
The embodiment of the application also provides a computer readable storage medium which stores a computer program, and the computer program realizes the method for creating the computing environment template and the method for configuring the computing environment provided by the embodiment of the application when being executed by a processor.
The embodiment of the application also provides a chip, which comprises a processor and is used for calling the instructions stored in the memory from the memory and running the instructions stored in the memory, so that the communication equipment provided with the chip executes the method provided by the embodiment of the application.
The embodiment of the application also provides a chip, which comprises: the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method provided by the application embodiment.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Srocessing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field Programmable gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be a processor supporting an advanced reduced instruction set machine (Advanced RISC Machines, ARM) architecture.
Further, optionally, the memory may include a read-only memory and a random access memory, and may further include a nonvolatile random access memory. The memory may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), programmable ROM (PROM), erasable Programmable ROM (EPROM), electrically Erasable EPROM (EEPROM), or flash Memory, among others. Volatile memory can include random access memory (Random Access Memory, RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic RAM (Dynamic Random Access Memory, DRAM), synchronous DRAM (SDRAM), double Data Rate Synchronous DRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DR RAM).
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. Furthermore, embodiments of the application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein. The computer program product includes one or more computer instructions. The processes or functions in accordance with the present application are fully or partially produced when computer program instructions are loaded and executed on a computing device/computer. The computing device/computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. Computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description of the present specification, reference to the terms "one embodiment," "an embodiment," "some embodiments," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
Any process or method description in a flowchart or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process. And the scope of the preferred embodiments of the present application includes additional implementations in which functions may be performed in a substantially simultaneous manner or in an opposite order from that shown or discussed, including in accordance with the functions that are involved.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the methods of the embodiments described above may be performed by a program that, when executed, comprises one or a combination of the steps of the method embodiments, instructs the associated hardware to perform the method.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules described above, if implemented in the form of software functional modules and sold or used as a stand-alone product, may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
While the preferred embodiments of the present application have been described, those skilled in the art will recognize that additional changes and modifications can be made thereto, once the basic inventive concepts are known, in light of the above description of the present application, which is to be considered as illustrative of the principles and embodiments of the present application. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all alterations and modifications as fall within the scope of the embodiments of the application; also, it should be understood that various changes and substitutions can be made herein by one having ordinary skill in the art without departing from the spirit and scope of the present application as defined by the following claims. In view of the foregoing, the disclosure should not be construed as limiting the application, which is defined by the scope of the appended claims.

Claims (10)

1. A method of creating a computing environment template for a first physical computing device, the method comprising:
configuring an operating environment adapted to a virtual machine manager in the first physical computing device, and installing the virtual machine manager;
creating, by the virtual machine manager, a virtual machine in the first physical computing device;
creating a computing environment template in the virtual machine, wherein the computing environment template comprises a hardware environment and a software environment;
and packaging the computing environment template, wherein the computing environment template is configured with a virtual machine initialization tool.
2. The method of claim 1, wherein the configuring, in the first physical computing device, a runtime environment adapted to a virtual machine manager comprises:
calling a virtual machine initialization tool, and configuring an initialization running environment of a virtual machine manager;
and calling an operating system running tool to configure an operating system running by the virtual machine manager.
3. The method of claim 1, wherein the creating, in the virtual machine, a computing environment template comprises:
configuring a hardware environment in the virtual machine according to an image file of a target physical computing device to be installed with the computing environment template;
And in the virtual machine, configuring a software environment according to the configuration requirement file, wherein the software environment comprises an operating system, application software and a hardware driver.
4. The method of claim 1, wherein the method further comprises:
uploading the computing environment template to a second physical computing device to test the packaged computing environment template at the second physical computing device.
5. The method of claim 1, wherein the method further comprises:
and uploading the computing environment template to a cloud end so as to test the packaged computing environment template at the cloud end.
6. A method of configuring a computing environment for application to a target physical computing device, the method comprising:
acquiring a computing environment template, wherein the computing environment template is configured with a virtual machine initialization tool;
invoking the virtual machine initialization tool to create a virtual machine on the target physical computing device;
invoking the computing environment template creates a computing environment in the virtual machine, the computing environment comprising a hardware environment and a software environment.
7. An apparatus for creating a computing environment template for application to a first physical computing device, wherein the first physical computing device has functionality to run a virtual machine, the apparatus comprising:
An environment configuration module for configuring an operating environment adapted to a virtual machine manager in the first physical computing device;
the manager installation module is used for installing a virtual machine manager;
a virtual machine creation module configured to create, by the virtual machine manager, a virtual machine in the first physical computing device;
the template creation module is used for creating a computing environment template in the virtual machine, wherein the computing environment template comprises a hardware environment and a software environment;
and the template packaging module is used for packaging the computing environment template, and the computing environment template is configured with a virtual machine initialization tool.
8. A configuration apparatus of a computing environment for application to a target physical computing device, the apparatus comprising:
the template acquisition module is used for acquiring a computing environment template, and the computing environment template is configured with a virtual machine initialization tool;
a virtual machine creation module for calling the virtual machine initialization tool to create a virtual machine on the target physical computing device;
and the computing environment creation module is used for calling the computing environment template to create a computing environment in the virtual machine, wherein the computing environment comprises a hardware environment and a software environment.
9. A physical computing device comprising a memory, a processor and a computer program stored on the memory, the processor implementing the method of any one of claims 1-6 when the computer program is executed.
10. A computing device readable storage medium having stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-6.
CN202310693874.9A 2023-06-12 2023-06-12 Method and device for creating computing environment template, computing equipment and storage medium Pending CN116700897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310693874.9A CN116700897A (en) 2023-06-12 2023-06-12 Method and device for creating computing environment template, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310693874.9A CN116700897A (en) 2023-06-12 2023-06-12 Method and device for creating computing environment template, computing equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116700897A true CN116700897A (en) 2023-09-05

Family

ID=87825273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310693874.9A Pending CN116700897A (en) 2023-06-12 2023-06-12 Method and device for creating computing environment template, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116700897A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101416175A (en) * 2006-03-30 2009-04-22 微软公司 Creating templates of offline resources
CN103793242A (en) * 2013-10-09 2014-05-14 中国电子设备系统工程公司研究所 Quick information system deploying method on basis of virtual computing environment
CN104572239A (en) * 2013-10-18 2015-04-29 宇宙互联有限公司 Cloud platform-based template making system and method
US9043786B1 (en) * 2012-06-29 2015-05-26 Emc Corporation Blueprint-driven environment template creation in a virtual infrastructure
US20170155569A1 (en) * 2015-11-30 2017-06-01 Telefonaktiebolaget Lm Ericsson (Publ) Test case based virtual machine (vm) template generation
CN113064698A (en) * 2021-04-06 2021-07-02 北京元年科技股份有限公司 Method for providing product environment and corresponding device, system, equipment and medium
CN113760462A (en) * 2021-09-07 2021-12-07 广东电网有限责任公司 Method and device for constructing verification environment of dispatching automation system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101416175A (en) * 2006-03-30 2009-04-22 微软公司 Creating templates of offline resources
US9043786B1 (en) * 2012-06-29 2015-05-26 Emc Corporation Blueprint-driven environment template creation in a virtual infrastructure
CN103793242A (en) * 2013-10-09 2014-05-14 中国电子设备系统工程公司研究所 Quick information system deploying method on basis of virtual computing environment
CN104572239A (en) * 2013-10-18 2015-04-29 宇宙互联有限公司 Cloud platform-based template making system and method
US20170155569A1 (en) * 2015-11-30 2017-06-01 Telefonaktiebolaget Lm Ericsson (Publ) Test case based virtual machine (vm) template generation
CN113064698A (en) * 2021-04-06 2021-07-02 北京元年科技股份有限公司 Method for providing product environment and corresponding device, system, equipment and medium
CN113760462A (en) * 2021-09-07 2021-12-07 广东电网有限责任公司 Method and device for constructing verification environment of dispatching automation system

Similar Documents

Publication Publication Date Title
CN109154888B (en) Super fusion system equipped with coordinator
US9501289B2 (en) Method of a UEFI firmware and computer system thereof
US8830228B2 (en) Techniques for enabling remote management of servers configured with graphics processors
US9542174B2 (en) Deployment of software images with distinct configuration logic
US20090265708A1 (en) Information Processing Apparatus and Method of Controlling Information Processing Apparatus
US9184991B2 (en) Method and apparatus for developing service processor solutions
JP2006018814A (en) System and method for development of emulated device in virtual machine environment
US9720703B2 (en) Data driven hardware chips initialization via hardware procedure framework
US9417886B2 (en) System and method for dynamically changing system behavior by modifying boot configuration data and registry entries
US20180046486A1 (en) Cloud based platform simulation for management controller development
US9672047B1 (en) Systems and methods for accessing a bootable partition on a serial peripheral interface device
Cerling et al. Mastering Microsoft Virtualization
US10042666B2 (en) Platform simulation for management controller development on virtual machines
CN111459606A (en) Method for quickly creating virtual machine under virtualization and server
US9519489B2 (en) Boot from modified image
US11080082B2 (en) Cross-hypervisor virtual machine conversion
CN112286633A (en) Virtual machine creating method, device, equipment and storage medium based on CloudStack platform
US8813072B1 (en) Inverse virtual machine
US20230185580A1 (en) Single node deployment of container platform
CN116700897A (en) Method and device for creating computing environment template, computing equipment and storage medium
CN116069584A (en) Extending monitoring services into trusted cloud operator domains
CN114237814A (en) Virtual machine migration method and device across virtualization platforms and computer equipment
US11238015B2 (en) Instant hyper-v streaming
US20210149577A1 (en) Migration of storage for workloads between desktop and cloud environments
CN106557354B (en) Method for setting attribute parameters of private image and computer equipment

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