CN116541124A - Virtual computing instance creation method, server cluster and server - Google Patents

Virtual computing instance creation method, server cluster and server Download PDF

Info

Publication number
CN116541124A
CN116541124A CN202310308148.0A CN202310308148A CN116541124A CN 116541124 A CN116541124 A CN 116541124A CN 202310308148 A CN202310308148 A CN 202310308148A CN 116541124 A CN116541124 A CN 116541124A
Authority
CN
China
Prior art keywords
virtual computing
computing instance
information
instance
snapshot
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
CN202310308148.0A
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.)
XFusion Digital Technologies Co Ltd
Original Assignee
XFusion Digital Technologies 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 XFusion Digital Technologies Co Ltd filed Critical XFusion Digital Technologies Co Ltd
Priority to CN202310308148.0A priority Critical patent/CN116541124A/en
Publication of CN116541124A publication Critical patent/CN116541124A/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
    • 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/4557Distribution of virtual machine instances; Migration and load balancing
    • 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/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application relates to the field of computers, in particular to a virtual computing instance creation method, a server cluster and a server. The method comprises the following steps: obtaining a creation request of a virtual computing instance, wherein the creation request comprises first information of a source virtual computing instance and second information of a target virtual computing instance to be created; based on the first information, obtaining a virtual computing instance snapshot and storage information of the source virtual computing instance; obtaining hardware configuration information of the source virtual computing instance based on the virtual computing instance snapshot; modifying the hardware configuration information based on the second information to obtain target hardware configuration information; and creating and obtaining a target virtual computing instance based on the target hardware configuration information and the storage information. The method can simply, conveniently and quickly create the virtual computing instance.

Description

Virtual computing instance creation method, server cluster and server
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a virtual computing instance creation method and a cloud platform.
Background
With the development of cloud computing (cloud computing) technology, users can more conveniently utilize computing resources, storage resources and other resources provided by a cloud platform. In particular, the enterprise utilizes the resources provided by the cloud platform, and a resource infrastructure is not required to be built locally, so that the enterprise operation cost is reduced.
In the cloud computing technology, a server in a cloud platform may run one or more Virtual Machines (VMs) as hosts (host) to process multiple services at the same time, or to distribute and process larger data processing programs. Virtual machines refer to computer systems that run in an isolated environment with complete hardware system functionality through software emulation. In some scenarios, a virtual machine needs to be newly created in a server. For example, virtual machines in current cloud platforms are inadequate to meet the needs of data processing, requiring the addition of virtual machines. Currently, the scheme for creating the virtual machine is complicated in operation or increases the management complexity of the virtual machine.
Disclosure of Invention
The embodiment of the application provides a virtual computing instance creation method, a server cluster and a server, which can simply, conveniently and quickly create a virtual computing instance.
In a first aspect, there is provided a virtual computing instance creation method, the method comprising: obtaining a creation request of a virtual computing instance, wherein the creation request comprises first information of a source virtual computing instance and second information of a target virtual computing instance to be created; based on the first information, obtaining a virtual computing instance snapshot and storage information of the source virtual computing instance; obtaining hardware configuration information of the source virtual computing instance based on the virtual computing instance snapshot; modifying the hardware configuration information based on the second information to obtain target hardware configuration information; and creating and obtaining a target virtual computing instance based on the target hardware configuration information and the storage information.
In one possible implementation manner, the storage information is a volume snapshot, the target hardware configuration information includes disk configuration information, and creating the target virtual computing instance based on the target hardware configuration information and the storage information includes: creating a disk for obtaining the target virtual computing instance based on the disk configuration information; creating a target volume for obtaining the target virtual computing instance based on the volume snapshot; and mounting the target volume on the magnetic disk.
In one possible implementation, the second information further includes personalized configuration information of the target virtual computing instance; the modifying the hardware configuration information based on the second information to obtain target hardware configuration information includes: and modifying the hardware configuration information based on the personalized configuration information to obtain the target hardware configuration information.
In one possible implementation manner, the updating the hardware configuration information based on the personalized configuration information includes: and under the condition that the personalized configuration information is legal, updating the hardware configuration information based on the personalized configuration information.
In one possible implementation, before the obtaining the creation request of the virtual computing instance, the method further includes: displaying at least one virtual computing instance snapshot, wherein the at least one virtual computing instance snapshot corresponds to at least one virtual computing instance comprising the source virtual computing instance one by one; the creation request is generated in response to an operation of a virtual compute instance snapshot for the source virtual compute instance.
In one possible implementation, the method further includes: and adding a label to the target virtual computing instance, wherein the label is used for identifying that the target virtual computing instance is created based on a virtual computing instance snapshot of the source virtual computing instance.
In one possible implementation, the virtual computing instance is a virtual machine or container.
In one possible implementation manner, the obtaining, based on the first information, a virtual computing instance snapshot of the source virtual computing instance and storing information includes: generating indication information for indicating to create a target virtual computing instance by using the first information and the second information in response to the creation request, and storing the indication information, the first information and the second information in a file form to obtain a resource file, wherein the first information comprises the name of the snapshot of the virtual computing instance; inquiring in a storage device to obtain the snapshot of the virtual computing instance and the storage information through the virtual computing instance management device based on the resource file; the virtual computing instance management device is used for obtaining the name of the source virtual computing instance based on the name of the virtual computing instance snapshot, and inquiring a disk obtaining the source virtual computing instance in the storage device based on the name of the source virtual computing instance so as to obtain the storage information from the disk of the source virtual computing instance.
In one possible implementation, in a case of deleting the source virtual computing instance, the virtual computing instance snapshot and the resource file corresponding to the source virtual computing instance are deleted.
In a second aspect, a server cluster is provided, including: virtual computing instance creation means, virtual computing instance management means, service communication means, and storage means; wherein the virtual computing instance creation means is connected to the storage means through the communication service means; the virtual computing instance creation device is used for obtaining a creation request of a virtual computing instance, wherein the creation request comprises first information of a source virtual computing instance and second information of a target virtual computing instance to be created; the virtual computing instance creation means is configured to obtain, based on the first information, a virtual computing instance snapshot of the source virtual computing instance and the storage information from the storage means through the virtual computing instance management means; the virtual computing instance creating device is further used for obtaining hardware configuration information of the source virtual computing instance based on the virtual computing instance snapshot; the virtual computing instance creating device is further used for modifying the hardware configuration information based on the second information to obtain target hardware configuration information; the virtual computing instance creating device is further used for creating and obtaining a target virtual computing instance based on the target hardware configuration information and the storage information.
In a third aspect, a server is provided, comprising a processor and a memory; wherein the memory stores computer instructions and the processor is configured to execute the computer instructions to implement the method provided in the first aspect.
In a fourth aspect, there is provided a computer program product comprising instructions which, when executed by a computing device, cause the computing device to perform the method as provided in the first aspect.
In a fifth aspect, there is provided a computer readable storage medium comprising computer program instructions which, when executed by a computing device, perform the method as provided in the first aspect.
By the virtual computing instance creation method, the server cluster and the server provided by the embodiment of the application, the virtual computing instance with complete hardware running environment and software such as an operating system can be created by utilizing the virtual computing instance snapshot of the existing virtual computing instance. According to the method, the virtual computing instance can be created by utilizing the virtual computing instance snapshot of the existing virtual computing instance without setting hardware configuration information by a user, so that hardware configuration of the virtual computing instance is not required to be set manually by the user, meanwhile, hardware consistency of the newly created virtual computing instance and the previous virtual computing instance can be ensured, management of the virtual computing instance cluster is facilitated, namely, after the number of the virtual computing instances in the virtual computing instance cluster is increased, management complexity of the virtual computing instance cluster is limited.
Drawings
Fig. 1 is a schematic structural diagram of a cloud platform according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a virtual computing instance creating apparatus according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for creating a virtual computing instance according to an embodiment of the present application;
fig. 4 is a flowchart of a virtual machine creation method provided in an embodiment of the present application;
FIG. 5 is a flowchart of a method for creating a virtual computing instance according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a server cluster according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the embodiments. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in various places throughout this specification are not necessarily all referring to the same embodiment, but mean "one or more, but not all, embodiments" unless expressly specified otherwise.
Wherein, in the description of the embodiments of the present application, "/" means or is meant unless otherwise indicated, for example, a/B may represent a or B; "and/or" herein is merely an association relation describing associated objects, meaning that three relations may exist, e.g., a and/or B may represent: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" means two or more than two.
In the description of the embodiments of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying 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 one or more such feature. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Virtualization technology provides virtualized hardware systems, such as hardware like a simulation processor, disk, network card, etc., for Operating Systems (OS), application programs, etc., of virtual machines. In other words, the hardware system of the virtual machine is not limited by the traditional hardware architecture, and the hardware system meeting the needs of different users can be simulated from the physical resource pool according to the hardware configuration information of the virtual machine. Therefore, virtual machines are widely used, and in particular, in cloud computing technology, virtual machines have become an infrastructure that carries various services.
In a scene of expanding a virtual machine cluster or the like, virtual machines need to be created.
In one approach, by way of cloning, the entire virtual machine is replicated with the virtual machine closed. The scheme does not need to be specially configured with hardware of the virtual machine by a user, but the scheme needs to close the original virtual machine to influence the operation of the service. Further, copying the entire virtual machine requires a lot of memory resources.
In another approach, a virtual machine template is run through which the virtual machine is created. The scheme also does not require a user to specifically configure hardware of the virtual machine, but in the scheme, the template needs to be incorporated into virtual machine management, and the template is not used for executing services, but is only used for creating the virtual machine, which increases the complexity of virtual machine management. In addition, the virtual machine created by the scheme has no information such as service data, and data migration is required when the service of other virtual machines is replaced, so that the operation is complicated.
The embodiment of the application provides a virtual computing instance creation method. The method can acquire the hardware configuration information of the existing virtual computing instance by utilizing the snapshot of the virtual computing instance of the existing virtual computing instance, and can create the virtual computing instance with complete hardware running environment and software capable of running an operating system and the like by utilizing the hardware configuration information. According to the method, the virtual computing instance can be created by utilizing the virtual computing instance snapshot of the existing virtual computing instance without setting hardware configuration information by a user, so that hardware configuration of the virtual computing instance is not required to be set manually by the user, hardware consistency of the newly created virtual computing instance and the previous virtual computing instance is ensured, management of the virtual computing instance cluster is facilitated, namely after the number of the virtual computing instances in the virtual computing instance cluster is increased, management complexity of the virtual computing instance cluster is limited.
Next, a method provided in the embodiment of the present application will be specifically described.
In the embodiment of the present application, the virtual computing instance may be a virtual machine or a container (container).
As described above, the hardware system of the virtual computing instance, such as the virtual machine, is obtained by software simulation, and the virtual computing instance snapshot may be a snapshot (snapshot) of data generated by software running in the hardware system of the virtual computing instance. The software runtime generation data of the hardware system emulating the virtual computing instance includes information for the software to emulate the virtual computing instance hardware system, which may be referred to as hardware configuration information of the virtual computing instance. In one example, taking a virtual machine as an example, the software emulating the hardware system of the virtual machine may be a virtual machine monitor (virtual machine monitor, VMM). In one example, taking a virtual machine as an example, the software emulating the hardware system of the virtual machine may be a functional module of KubeVirt, and the virtual compute instance snapshot may be obtained from KubeVirt. Wherein KubeVirt is a virtual machine management device in the Kubernetes platform. Kubernetes is abbreviated as K8S, isAn open-source container orchestration platform that supports automated deployment, large scale scalability, and application containerization management.
The hardware configuration information is used to indicate the hardware configuration or parameters of the virtual computing instance, such as the number of cores, the frequency, etc. of the processor (e.g., central processing unit (central processing unit, abbreviated as CPU)) of the virtual computing instance, the capacity of the disk of the virtual computing instance, the bandwidth of the network card, etc. The software of the hardware system simulating the virtual computing instance can simulate the hardware such as a processor, a disk, a network card and the like based on the hardware configuration information, and the hardware can form the hardware system of the virtual computing instance.
Referring to fig. 1, a cloud computing platform 100 provided in an embodiment of the present application is shown. The cloud computing platform 100 includes a virtual computing instance creation means 110, a virtual computing instance management means 120, a communication service means 130, and a storage means 140. Wherein the virtual computing instance creation device 110, the virtual computing instance management device 120, and the communication service device 130 constitute a front-end computing system of the cloud computing platform 100, and the storage device 140 serves as a back-end storage system of the cloud computing platform 100.
In some embodiments, the virtual computing instance creation means 110, the virtual computing instance management means 120, or the communication service means 130 may be implemented by hardware. For example, the virtual computing instance creation means 110, the virtual computing instance management means 120, or the communication service means 130.
In some embodiments, the virtual computing instance creation means 110, the virtual computing instance management means 120 or the communication service means 130 may also be implemented in software. For example, the virtual computing instance creation means 110, the virtual computing instance management means 120, or the communication service means 130 may be implemented as a virtual computing instance or the like. For another example, the virtual compute instance creation apparatus 110, the virtual compute instance management apparatus 120, or the communication service apparatus 130 may be implemented as one or more processes (processes).
In some embodiments, the virtual computing instance management apparatus 120 may be KubeVirt, the communication service apparatus 130 may be an application programming interface (application programming interface, API) server (server), and the virtual computing instance creation apparatus 110 may be implemented as a plug-in the K8S platform.
Embodiments of the present application are not limited to a particular implementation of virtual computing instance creation means 110, virtual computing instance management means 120, or communication service means 130.
Storage 140 may include a plurality of disks that may be virtualized as virtual disks of a virtual compute instance.
The virtual computing instance creation means 110 may be connected via the communication service means 130 and the storage means 140. Specifically, as shown in fig. 1, the storage device 140 is connected to the communication service device 130, and the communication service device 130 and the storage device 140 are connected via an interface 141. In one example, interface 141 may be a container storage interface (container storage interface, CSI).
The virtual computing instance method provided in the embodiment of the present application is mainly implemented by the virtual computing instance creating device 110. In some embodiments, as shown in FIG. 2, virtual compute instance 110 includes a communication module 111, a control module 112, a cache module 113, and a verification module 114.
Wherein the communication module 111 is configured to perform information interaction with the outside of the virtual computing instance creation device 110, for example, to obtain a creation request of the virtual computing instance, to obtain storage information through information interaction between the communication service device 130 and the storage device 140, to obtain a snapshot of the virtual computing instance from the virtual computing instance management device 120, and so on.
The control module 112 may parse the virtual compute instance snapshot to obtain hardware configuration information for the virtual compute instance. After acquiring the hardware configuration information, the control module 112 may create a virtual computing instance creation task and execute the creation task to complete creation of the virtual computing instance.
The caching module 113 can be used to cache data such as virtual compute instance snapshots, hardware configuration information, virtual compute instance creation tasks, and the like.
The verification module 114 may be used to verify whether information required for virtual computing instance creation is legal, such as whether personalized configuration information, which will be described below, is legal, etc.
The communication module 111, the control module 112, the cache module 113, and the verification module 114 may create software modules, such as applications, processes, or threads, in the apparatus 110 for virtual compute instances. The embodiments of the present application are not limited to specific implementations of the communication module 111, the control module 112, the buffer module 113, and the verification module 114.
The virtual compute instance management apparatus 120 is configured to generate a virtual compute instance snapshot. It is understood that a snapshot refers to a fully available copy of a given data set that includes an image of the corresponding data at some point in time (the point in time when the copy began). Wherein the data set of the virtual compute instance snapshot of the virtual compute instance includes hardware configuration information of the virtual compute instance and other related information (number of volumes, names of volume snapshots, etc.). The data set of the volume snapshot of the virtual compute instance includes data in the disk of the virtual compute instance. Wherein, the volume snapshot may also be referred to as a disk snapshot, and the data in the disk of the virtual computing instance may be referred to as storage information of the virtual computing instance.
The communication service apparatus 130 has a plurality of interfaces, for example, APIs. The virtual compute instance creation apparatus 110 may invoke an interface of the communication server apparatus 130 to interact with other components (e.g., the storage apparatus 140).
The above examples introduce a cloud platform that may be used to implement the virtual computing instance creation methods provided by embodiments of the present application. Next, a flow of the virtual computing instance creation method provided in the embodiments of the present application is described in conjunction with the cloud platform.
Referring to fig. 3, the virtual computing instance creation means 110 may acquire a creation request through step 301. The creation request is a creation request of a virtual compute instance. More specifically, the creation request may be a request to create a virtual compute instance based on a virtual compute instance snapshot. For ease of description, the virtual computing instance to be created may be referred to as a target virtual computing instance, and the virtual computing instance snapshot is a snapshot of the source virtual computing instance. That is, a target virtual computing instance is created using a virtual computing instance snapshot of a virtual computing instance, then the virtual computing instance is referred to as a source virtual computing instance.
Wherein the creation request includes information of the source virtual computing instance and information of the target virtual computing instance to be created. For the aspect description, information of a source virtual computing instance may be referred to as first information, and information of a target virtual computing instance to be created may be referred to as second information. The first information is used for acquiring a virtual computing instance snapshot of the source virtual computing instance. The second information may include identification information, such as a name, ID, etc., of the target virtual computing instance. The identification information of the target virtual computing instance may be set by a user, or may be generated based on the identification information generation rule of the virtual computing instance.
In some embodiments, a user may issue an operation for a particular virtual compute instance snapshot to trigger the virtual compute instance creation device 110 to generate a creation request. For example, a user may refer to a tenant of the cloud platform 100, and may refer to a manager or an operation and maintenance person of the cloud platform 100.
In one example, the virtual computing instance creation device 110 may obtain identification information of at least one individual virtual computing instance snapshot from the virtual computing instance management device. Wherein each virtual compute instance snapshot corresponds to a virtual compute instance. The virtual computing instance creation means 110 may present the identification information of the at least one virtual computing instance snapshot via a display means. The user may operate on the identification information of one of the at least one virtual compute instance snapshot, which triggers the virtual compute instance creation device 110 to generate a creation request. That is, the virtual computing instance creation device 110 may receive an operation for a certain virtual computing instance snapshot and generate an operation including identification information of the virtual computing instance snapshot in response to the operation. In addition, in this example, the information of the source virtual computing instance included in the creation request is specifically identification information of a virtual computing instance snapshot of the source virtual computing instance.
In one example, virtual computing instance creation device 110 may obtain identification information of one or more virtual computing instances from a virtual computing instance management device. The virtual computing instance creation means 110 may display the identification information of the one or more virtual computing instances through a display means. The user may operate on the identification information of one of the one or more virtual computing instances, which triggers the virtual computing instance creation device 110 to generate a creation request. In addition, in this example, the information of the source virtual computing instance included in the creation request is specifically identification information of the virtual computing instance.
Identification information of an object (e.g., a virtual compute instance or a snapshot of a virtual compute instance) is used to distinguish the object from other objects in cloud platform 100. In some embodiments, the identification information of the object may be a name or a unique identifier (unique identifier, ID).
In some embodiments, the second information in the creation request may also include personalized configuration information. In one example, the personalized configuration information may include network parameters. The network parameters include internet protocol (internet protocol, IP) addresses, media access control (media access control, MAC) addresses, etc. The network parameters are used as personalized configuration information of the virtual computing instances for identifying different virtual computing instances in the network, and therefore, different network parameters need to be configured for the different virtual computing instances. In other examples, the user may add personalized configuration information, such as the number of cores of the CPU of the target virtual compute instance, etc., in the creation request as needed.
In some embodiments, as shown in fig. 3, virtual computing instance creation device 110 may send a creation request to communication service device 130. The communication service apparatus 130 may perform step 302 of determining whether the syntax of the information of the source virtual computing instance in the creation request is accurate. The syntax of the identification information of the virtual computing instance and/or the identification information of the virtual computing instance snapshot is to conform to the specification of the cloud platform 100, and the snapshot for creating the virtual computing instance is acquired based on the identification information of the virtual computing instance or the identification information of the virtual computing instance snapshot. If the judgment result of step 302 is no, reporting an error, and suspending the creation of the virtual computing instance.
In some embodiments, if the determination result of step 302 is yes, the verification module 114 in the virtual computing instance creating apparatus 110 may execute step 303 to determine whether the personalized configuration of the target virtual computing instance is legal. Specifically, it may be determined whether the personalized configuration information in the creation request is legal. For example, the personalized configuration information includes network parameters, and in step 303, it may be determined whether the network parameters conform to network protocol specifications or standards adopted by the cloud platform 100, and whether the network parameters are repeated with network parameters of existing virtual machines in the cloud platform 100. If the network parameters do not meet the network protocol specification or standard adopted by the cloud platform 100, or the network parameters are repeated with the network parameters of the existing virtual machines in the cloud platform 100, it may be determined that the personalized configuration is illegal.
If the result of the step 303 is no, an error is reported, and the virtual computing instance creation is aborted.
If the result of the determination in step 303 is yes, the communication service apparatus 130 may generate a virtual computing instance creation task in response to the creation request, and store the creation task in a database, which may be a distributed key-value storage system (ETCD) in one example. The creation task may be represented by a resource file, and the storage of the creation task in the database specifically refers to the storage of the resource file representing the creation task in the database. The virtual computing instance creation task is specifically, for example, based on the first information and the second information in the creation request, and creates a virtual machine computing instance by using the first information and the second information. The resource file is used to represent the creation of a generated virtual machine computing instance using the first information and the second information. Specifically, in response to the creation request, instruction information for instructing creation of a new virtual computing instance using the first information and the second information may be generated, and the first information, the second information, and the instruction information may be stored in the form of a file, resulting in a resource file. Wherein, as described above, the first information is identification information of the virtual computing instance snapshot. The identification information of the virtual computing instance snapshot may specifically be a name of the virtual computing instance snapshot.
The virtual compute instance creation device 110 may obtain a virtual compute instance creation task from a database, the creation task comprising a creation request. The virtual compute instance creation means 110 may perform the creation task, in particular as follows.
At step 306, a virtual compute instance snapshot of the source virtual compute instance may be obtained based on the information of the source virtual compute instance in the create request.
When the information of the source virtual computing embodiment in the creation request is specifically the identification information of the virtual computing instance snapshot, the virtual computing instance creation device 110 may obtain the virtual computing instance snapshot identified by the identification information based on the identification information of the virtual computing instance snapshot. Specifically, the virtual computing instance creation device 110 may transmit the identification information of the virtual computing instance snapshot to the virtual computing instance management device 120. The virtual computing instance management apparatus 120 may query the storage apparatus 140 for the virtual computing instance snapshot based on the identification information, and transmit the queried virtual computing instance snapshot to the virtual computing instance creation apparatus 110.
When the information of the source virtual computing embodiment in the creation request is specifically the identification information of the virtual computing instance, the virtual computing instance creation device 110 may acquire, based on the identification information of the virtual computing instance, a virtual computing instance snapshot of the virtual computing instance identified by the identification information. Specifically, the virtual computing instance creation device 110 may transmit the identification information of the virtual computing instance to the virtual computing instance management device 120. The virtual computing instance management apparatus 120 may query the identification information of the virtual computing instance snapshot corresponding to the identification information based on the identification information, query the storage apparatus 140 for the virtual computing instance snapshot, and then send the queried virtual computing instance snapshot to the virtual computing instance creation apparatus 110.
The virtual compute instance snapshot includes hardware configuration information of the source virtual compute instance. The virtual computing instance creation device 110 may obtain the hardware configuration information of the source virtual computing instance from the virtual computing instance snapshot, and modify the hardware configuration information of the source virtual computing instance based on the second information, to obtain the target hardware configuration information. Specifically, the second information includes identification information of the target virtual computing instance, and the identification information of the source virtual computing instance in the hardware configuration information of the source virtual computing instance can be replaced by the identification information of the target virtual computing instance, so that the virtual computing instance is identified as the identified target hardware configuration information of the target virtual computing instance.
In some embodiments, the second information further includes personalized configuration information, as described above. Based on the second information, modifying the hardware configuration information of the source virtual computing instance, and obtaining the target hardware configuration information further comprises: and modifying the hardware configuration information of the source virtual computing instance in the virtual computing instance snapshot by using the personalized configuration information to obtain target hardware configuration information. For example, the hardware configuration information may include network parameters of the network card, and the personalized configuration information includes network parameters. Modifying the hardware configuration information includes replacing network parameters in the hardware configuration information of the source virtual computing instance with network parameters in the personalized configuration information.
With continued reference to fig. 3, in step 307, the virtual compute instance creation apparatus 110 invokes software (e.g., VMM) of a hardware device capable of emulation, emulating a hardware device such as a processor, memory, network card, etc. according to the target hardware configuration information. The simulated hardware devices form the hardware system of the target virtual computing instance. Specifically, the target hardware configuration information includes configuration information of a processor, configuration information of a memory, and configuration information of a network card. The configuration information of the processor includes the number of the computing cores, the operating frequency of the computing cores, and the like. The VMM may select a computing core from a resource pool of the processor according to configuration information such as the number of computing cores, the operating frequency of the computing cores, and the like, and take the selected computing core as the processor of the target virtual computing instance. The configuration information of the memory may include the size of the memory, the type of medium, and the like. The VMM may select a memory from a resource pool of the memory according to configuration information such as a size of the memory and a media type, and use the selected memory as a memory of the target virtual computing instance. The configuration information of the network card includes bandwidth, supported communication protocols, network parameters (e.g., IP address), etc. The VMM may select a corresponding network card from the communication resource pool according to the bandwidth of the network card, the supported communication protocol, and the like, and perform network configuration on the selected network card according to the network parameter in the configuration information, and then use the network card as the network card of the target virtual computing instance. Thus, the processor, the memory and the network card of the target virtual computing example can be obtained. The processor, the memory and the network card of the target virtual computing instance form a hardware system of the target virtual computing instance.
In step 307, a disk of the target virtual compute instance may also be created. The target hardware configuration information may include configuration information of a disk, including a storage medium, capacity, and the like of the disk. The VMM may select a corresponding disk from the storage resource pool according to the storage medium and capacity of the disk, etc., and use the selected disk as the disk of the target virtual computing instance.
In some embodiments, in step 306, the virtual compute instance creation device 110 may also obtain the stored information of the source virtual compute instance. In one example, the virtual computing instance creation device 110 may send information of the source virtual computing instance in the creation request to the virtual computing instance management device 120. The virtual computing instance management apparatus 120 may query the storage apparatus 140 for a disk of the source virtual computing instance based on the information of the source virtual computing instance, and transmit the information on the disk as storage information to the virtual computing instance creation apparatus 110. When the information of the source virtual computing instance is the identification information of the virtual computing instance snapshot, the virtual computing instance management device 120 may obtain the virtual computing instance corresponding to the virtual computing instance snapshot, that is, the source virtual computing instance, so as to obtain the identification information (for example, name) of the source virtual computing instance, and further, may query a disk of the source virtual computing instance from the storage device 140 by using the identification information of the source virtual computing instance, and obtain the storage information of the source virtual computing instance from the disk. In one example, when the storage information is a volume snapshot, the virtual computing instance snapshot of the source virtual computing instance includes identification information (e.g., a name) of the volume snapshot, the virtual computing instance snapshot may be obtained based on the identification information of the virtual computing instance snapshot, the identification information of the volume snapshot may be obtained from the virtual computing instance snapshot, and further the volume snapshot may be obtained from the storage device 140 by querying according to the identification information of the volume snapshot. In one example, the virtual computing instance creation means may use the information of the source virtual computing instance to invoke an interface between the communication service means 130 and the storage means 140, and the storage means 140 queries and retrieves the stored information of the source virtual computing instance.
As described above, the storage information of the virtual computing instance refers to data stored in the disk of the virtual computing instance, including an operating system, an application program, service data, and the like of the virtual computing instance. After obtaining the storage information, the virtual computing instance creation device 110 may store the storage information in a disk of the target virtual computing instance, to obtain a storage disk, where the storage disk is mounted on a hardware system of the target virtual computing instance. I.e., the storage disk is the storage disk of the target virtual computing instance, the processor of the virtual computing instance, etc. may call programs, data, etc. in the storage disk. Thus, a target virtual compute instance is obtained having a hardware system as well as an operating system, applications, business data, etc., which can be used to execute a business.
In some embodiments, the storage information obtained in step 306 may be, in particular, a volume snapshot of the source virtual computing instance. In step 308, the volume snapshot may be restored to the disk of the target virtual compute instance in a volume restore manner. Specifically, as described above, a snapshot refers to one fully available copy of a specified data set. For a volume snapshot, it is one fully available copy of the data stored by the disk. Volume restore refers to storing the available copy to disk.
In one example, the virtual computing instance creation device 110 may send information of the source virtual computing instance in the creation request to the virtual computing instance management device 120. The virtual computing instance management apparatus 120 may query the storage apparatus 140 for a volume snapshot of the source virtual computing instance based on the information of the source virtual computing instance, and transmit the queried volume snapshot to the virtual computing instance creation apparatus 110.
In one example, as described above, the virtual compute instance snapshot includes the name of the volume snapshot. The virtual compute instance creation means may call an interface between the communication service means 130 and the storage means 140 using the name of the volume snapshot, and query and retrieve the volume snapshot in the storage means 140.
In some embodiments, after step 308, the virtual compute instance creation device 110 may also perform step 309 to determine whether the creation of the target virtual compute instance was successful.
In one example, the creation of the target virtual computing instance may be confirmed as successful when the creation of the hardware system of the target virtual computing instance is completed. Otherwise, confirming that the creation of the target virtual computing instance fails. It may be appreciated that after the hardware system of the target virtual computing instance is created, software such as an operating system, an application program, and the like may be installed in the hardware system, so that the target virtual computing instance implements the relevant service. Thus, upon successful creation of the hardware system that created the target virtual computing instance, the target virtual computing instance creation may be confirmed to be successful.
In one example, when creation of the hardware system of the target virtual computing instance is completed and the storage information of the source virtual computing instance is successfully stored in the disk of the target virtual computing instance, the success of the creation of the target virtual computing instance may be confirmed. Otherwise, confirming that the creation of the target virtual computing instance fails.
When the determination result of step 309 is yes, the virtual computing instance creation apparatus 110 may execute step 310, in which the state of the virtual computing instance creation task is updated to a successful state.
When the determination result of step 309 is no, the virtual computing instance creation apparatus 110 may execute step 311 in which the state of the virtual computing instance creation task is updated to a failure state in the database. In the case where it is confirmed that the creation of the target virtual computing instance fails, if the disk of the target virtual computing instance already stores the storage information, the virtual computing instance creation device 110 may instruct the storage device 140 to delete the storage information in the disk of the target virtual computing instance.
In some embodiments, after the target virtual computing instance is successfully created, a label may be added to the target virtual computing instance. The tag is used to identify that the target virtual computing instance was created based on a virtual computing instance snapshot of the source virtual computing instance. For example, the tag may be a mapping table that records a correspondence between identification information of the target virtual computing instance and identification information of the source virtual computing instance to indicate that the target virtual computing instance was created based on the virtual computing instance snapshot of the source virtual computing instance. In the embodiment, the label is added for the target virtual computing instance, so that the created target virtual computing instance can be traced, when the target virtual computing instance fails, the source virtual computing instance can be quickly found, the service is taken over by the source virtual computing instance, and a large amount of time cost and operation cost are saved.
Thus, a virtual compute instance having a complete hardware runtime environment, capable of running software such as an operating system, etc., may be created from a snapshot of the virtual compute instance of an existing virtual compute instance. According to the method, the virtual computing instance can be created by utilizing the virtual computing instance snapshot of the existing virtual computing instance without setting hardware configuration information by a user, so that hardware configuration of the virtual computing instance is not required to be set manually by the user, meanwhile, hardware consistency of the newly created virtual computing instance and the previous virtual computing instance can be ensured, management of the virtual computing instance cluster is facilitated, namely, after the number of the virtual computing instances in the virtual computing instance cluster is increased, management complexity of the virtual computing instance cluster is limited. Taking the K8S platform as an example, the created virtual computing instance is used as a resource registered by KubeVirt, and the virtual computing instance can be integrated into the unified management of the KubeVirt, so that the management complexity is limited to increase.
In addition, according to the method provided by the embodiment of the application, the storage information of the source virtual computing instance can be stored on the disk of the target virtual computing instance, so that the target virtual computing instance has or retains the function of the source virtual computing instance, and when the source virtual computing instance fails, the target virtual computing instance can take over the source virtual computing instance to work.
Next, in connection with fig. 4, in a specific embodiment, a virtual computing instance creation method provided in an embodiment of the present application is described by way of example.
In the embodiment shown in fig. 4, the cloud platform 100 may be a K8S platform, the virtual computing instance management apparatus 120 may be KubeVirt, and the control module 112 in the virtual computing instance creation apparatus 110 may be referred to as a virtual machine creation controller. The created virtual computing instance is specifically a virtual machine, and accordingly, the virtual computing instance snapshot may be referred to as a virtual machine snapshot.
Referring to fig. 4, in step 1, a user may issue a command for creating a snapshot of a virtual machine, where the command is used to instruct to snapshot a source virtual machine, and obtain a snapshot1 of the source virtual machine.
In step 2, a user submits an application for creating a new virtual machine by using the snapshot of the source virtual machine snapshot1, namely, an operation aiming at the snapshot of the source virtual machine snapshot1 is generated, and KubeVirt is triggered to generate a creation request.
In step 3, a resource file vmfrom napshot1 is created in the K8S platform. The resource file vmfrom napshot1 represents the virtual machine creation task, which is the representation information of the virtual machine creation task. The resource file vmfrom snapshot1 contains the virtual machine snapshot name of the source virtual machine, the name of the target virtual machine to be created, personalized configuration information, and the like. The association relation between the file identification of the resource file and the name of the virtual machine snapshot of the source virtual machine can be obtained, and the association relation indicates that the owner (owner) of the resource file is the virtual machine snapshot.
In step 4, the virtual machine creation controller obtains a virtual machine snapshot (i.e., snapshot 1) of the source virtual machine from the content of the resource file vmfrom snapshot 1. Hardware configuration information and volume snapshots of the source virtual machine may be obtained based on the virtual machine snapshots. Wherein, as shown in fig. 4, the virtual machine snapshot includes hardware configuration information of the virtual machine. The virtual machine snapshot also includes details of the virtual machine volume and a snapshot name of the virtual machine volume. The details of the virtual machine volumes include the number of volumes of the virtual machine, the storage pool where the volumes are located, the names of the volumes, and the like. Wherein one virtual machine may have n volumes. Volume snapshots may be queried based on volume snapshot names. The volume snapshot includes detailed information of the volume snapshot, which is an available copy of the data set on the disk.
In step 5, the virtual machine creation controller resumes creation of the target volume from the volume snapshot via the communication service device 130 and the interface 141 in the storage device 140. Before step 5, a disk of the target virtual machine is created based on disk configuration information in hardware configuration information of the virtual machine. In step 5, the volume snapshot is restored to the disk of the target virtual machine, and the target volume is obtained.
In step 6, the target volume creation is successful.
In step 7, the virtual machine creation controller modifies the hardware configuration information of the source virtual machine according to the name and the personalized configuration information of the target virtual machine in the resource file vmfrom napshot 1.
At step 8, the target volume and the modified hardware configuration information are combined to create the required information for the virtual machine.
At step 9, a virtual machine is created: based on the modified hardware configuration information, simulating to obtain a hardware system of the target virtual machine, and mounting the target volume to the hardware system.
At step 10, the completion of the creation of the target virtual machine may be confirmed and the state of the virtual machine creation task updated to a successful state. In addition, a label may be added to the created new virtual machine.
The steps shown in fig. 4 are implemented with particular reference to the embodiment shown in fig. 3 and described above.
When the resource file vmfrom snapshot1 can be recovered, the process specifically includes: and deleting the source virtual machine. Wherein, according to the K8S rule, the virtual machine snapshot of the virtual machine is deleted along with the deletion of the virtual machine. In addition, according to the K8S rule, along with the deletion of the owner, the files belonging to the owner are also deleted. As described above, the owner of the resource file vmfrom napshot is the virtual machine snapshot of the source virtual machine. Thus, with the deletion of the virtual machine snapshot, the resource file vmfrom snapshot is also deleted.
After the virtual machine is deleted, resources occupied by the virtual machine, such as processor resources, memory resources, network card resources, disk resources, and the like, are released. After the virtual machine snapshot and the resource file are deleted, the storage resources they occupy are released.
According to the method, the virtual machine is created through the snapshot, so that a large amount of space and resource waste can be reduced. Specifically, the snapshot exists as a basic resource of the cloud platform containing the virtual machine, can be shot at any time, and does not need to consume additional storage and other resources through snapshot creation or reference a third party component.
According to the method, the virtual machine is managed based on the KubeVirt, the created virtual machine is used as a registered resource of the KubeVirt, the unified management of the KubeVirt can be incorporated, the original functions of the original virtual machine are reserved, and the new virtual machine can be traced through the label.
In addition, the method does not require invasive modification of K8S. Specifically, the method realizes the expansion of the function by means of the K8S plug-in, avoids the difficulty in maintenance of the K8S caused by invasive modification, and avoids the incompatibility of the K8S and the outside caused by the invasive modification.
Based on the above description of the virtual computing instance creation method, the embodiments of the present application provide another virtual computing instance creation method. Referring to fig. 5, the method includes the following steps.
Step 501, a creation request of a virtual computing instance is obtained, where the creation request includes first information of a source virtual computing instance and second information of a target virtual computing instance to be created. The implementation of step 301 in fig. 3 may be referred to specifically, and will not be described herein.
Step 502, obtaining a virtual computing instance snapshot and storage information of the source virtual computing instance based on the first information; the implementation may be specifically referred to the description of step 306 in fig. 3, and will not be described herein.
And step 503, obtaining hardware configuration information of the source virtual computing instance based on the virtual computing instance snapshot. The implementation may be specifically referred to the description of step 306 in fig. 3, and will not be described herein.
And step 504, modifying the hardware configuration information based on the second information to obtain target hardware configuration information. The implementation may be specifically referred to the description of step 306 in fig. 3, and will not be described herein.
And step 505, creating and obtaining a target virtual computing instance based on the target hardware configuration information and the storage information. The implementation may be specifically referred to the description of steps 307 to 308 in fig. 3, and will not be described herein.
In some embodiments, the storage information is a volume snapshot, the target hardware configuration information includes disk configuration information, and creating the target virtual computing instance based on the target hardware configuration information and the storage information includes: creating a disk for obtaining the target virtual computing instance based on the disk configuration information; creating a target volume for obtaining the target virtual computing instance based on the volume snapshot; and mounting the target volume on the magnetic disk. The implementation of step 308 in fig. 3 may be specifically referred to above, and will not be described herein.
In some embodiments, the second information further includes personalized configuration information for the target virtual computing instance; the modifying the hardware configuration information based on the second information to obtain target hardware configuration information includes: and modifying the hardware configuration information based on the personalized configuration information to obtain the target hardware configuration information. The implementation may be specifically referred to the description of step 306 in fig. 3, and will not be described herein.
In one example of this embodiment, the updating the hardware configuration information based on the personalized configuration information includes: and under the condition that the personalized configuration information is legal, updating the hardware configuration information based on the personalized configuration information. The implementation of step 303 in fig. 3 may be referred to, and will not be described herein.
In some embodiments, prior to the obtaining the creation request for the virtual compute instance, the method further comprises: displaying at least one virtual computing instance snapshot, wherein the at least one virtual computing instance snapshot corresponds to at least one virtual computing instance comprising the source virtual computing instance one by one; the creation request is generated in response to an operation of a virtual compute instance snapshot for the source virtual compute instance. The implementation of step 301 in fig. 3 may be referred to above, and will not be described herein.
In some embodiments, the method further comprises: and adding a label to the target virtual computing instance, wherein the label is used for identifying that the target virtual computing instance is created based on a virtual computing instance snapshot of the source virtual computing instance. The implementation of step 310 in fig. 3 may be referred to above, and will not be described herein.
In some embodiments, the virtual computing instance is a virtual machine or container.
In some embodiments, the obtaining, based on the first information, a virtual compute instance snapshot of the source virtual compute instance and storing information includes: generating indication information for indicating to create a target virtual computing instance by using the first information and the second information in response to the creation request, and storing the indication information, the first information and the second information in a file form to obtain a resource file, wherein the first information comprises the name of the snapshot of the virtual computing instance; inquiring in a storage device to obtain the snapshot of the virtual computing instance and the storage information through the virtual computing instance management device based on the resource file; the virtual computing instance management device is used for obtaining the name of the source virtual computing instance based on the name of the virtual computing instance snapshot, and inquiring a disk obtaining the source virtual computing instance in the storage device based on the name of the source virtual computing instance so as to obtain the storage information from the disk of the source virtual computing instance.
In one example of this embodiment, in the event that the source virtual computing instance is deleted, the virtual computing instance snapshot and resource file corresponding to the source virtual computing instance are deleted. By the virtual computing instance creation method provided by the embodiment of the application, the virtual computing instance with complete hardware running environment and software such as an operating system can be created by utilizing the virtual computing instance snapshot of the existing virtual computing instance. According to the method, the virtual computing instance can be created by utilizing the virtual computing instance snapshot of the existing virtual computing instance without setting hardware configuration information by a user, so that hardware configuration of the virtual computing instance is not required to be set manually by the user, meanwhile, hardware consistency of the newly created virtual computing instance and the previous virtual computing instance can be ensured, management of the virtual computing instance cluster is facilitated, namely, after the number of the virtual computing instances in the virtual computing instance cluster is increased, management complexity of the virtual computing instance cluster is limited.
The present embodiments provide a server cluster 600. As shown in fig. 6, the server cluster 600 includes: virtual computing instance creation means 610, virtual computing instance management means 620, service communication means 630, and storage means 640; wherein the virtual computing instance creation means 610 is connected to the storage means 620 through the communication service means 630; wherein, the liquid crystal display device comprises a liquid crystal display device,
The virtual computing instance creating means 610 is configured to obtain a creation request of a virtual computing instance, where the creation request includes first information of a source virtual computing instance and second information of a target virtual computing instance to be created;
the virtual computing instance creation means 610 is further configured to obtain, based on the first information, a virtual computing instance snapshot and storage information of the source virtual computing instance from the storage means 640 through the virtual computing instance management means 620;
the virtual computing instance creating means 610 is further configured to obtain hardware configuration information of the source virtual computing instance based on the virtual computing instance snapshot;
the virtual computing instance creating device 610 is further configured to modify the hardware configuration information based on the second information to obtain target hardware configuration information;
the virtual computing instance creating means 610 is further configured to create a target virtual computing instance based on the target hardware configuration information and the storage information.
The functions of the virtual compute instance creation apparatus 610 may also be implemented with reference to the description of the method embodiments shown in fig. 3 or fig. 4 above, or with reference to the description of the virtual compute instance creation apparatus 110 above. Virtual compute instance management apparatus 620 may be implemented with reference to the description of virtual compute instance management apparatus 120 above. Service communication device 630 may be implemented with reference to the description of service communication device 130 above. Storage 640 may be implemented with reference to the description of storage 140 above.
Referring to fig. 7, the embodiment of the present application further provides a server 700. Wherein the server 700 may be one or more servers in the server cluster 600. As shown in fig. 7, the server 700 includes a processor 710 and a memory 720; wherein the memory 720 stores computer instructions, and the processor 710 is configured to execute the computer instructions, so that the server 700 performs the method shown in fig. 5.
In some embodiments, the processor 710 may be a central processing unit (central processing unit, CPU), but may also be other general purpose processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), field programmable gate arrays (field programmable gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general purpose processor may be a microprocessor, but in the alternative, it may be any conventional processor.
In some embodiments, memory 720 may be a volatile memory (volatile memory) or a non-volatile memory, such as a register or the like. Specifically, the volatile memory refers to a memory in which data stored therein is lost when power supply is interrupted. Among them, volatile memories are mainly random access memories (random access memory, RAM), including Static RAM (SRAM) and Dynamic RAM (DRAM). The nonvolatile memory is a memory in which data stored therein is not lost even if power supply is interrupted. Common nonvolatile memories include Read Only Memory (ROM), optical discs, magnetic disks, solid state disks, and various memory cards based on flash memory technology.
Embodiments of the present application also provide a computer program product comprising instructions. The computer program product may be software or a program product containing instructions capable of running on a computing device or stored in any useful medium. The computer program product, when run on a computing device, causes the computing device to perform the method shown in fig. 5.
Embodiments of the present application also provide a computer-readable storage medium. The computer readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc. The computer-readable storage medium includes instructions that instruct a computing device to perform the method shown in fig. 5.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; these modifications or substitutions do not depart from the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method of virtual computing instance creation, the method comprising:
obtaining a creation request of a virtual computing instance, wherein the creation request comprises first information of a source virtual computing instance and second information of a target virtual computing instance to be created;
based on the first information, obtaining a virtual computing instance snapshot and storage information of the source virtual computing instance;
obtaining hardware configuration information of the source virtual computing instance based on the virtual computing instance snapshot;
modifying the hardware configuration information based on the second information to obtain target hardware configuration information;
and creating and obtaining a target virtual computing instance based on the target hardware configuration information and the storage information.
2. The method of claim 1, wherein the storage information is a volume snapshot, the target hardware configuration information comprises disk configuration information, and wherein creating the target virtual computing instance based on the target hardware configuration information and the storage information comprises:
creating a disk for obtaining the target virtual computing instance based on the disk configuration information;
creating a target volume for obtaining the target virtual computing instance based on the volume snapshot;
And mounting the target volume on the magnetic disk.
3. The method of claim 1 or 2, wherein the second information further comprises personalized configuration information for the target virtual computing instance; the modifying the hardware configuration information based on the second information to obtain target hardware configuration information includes:
and modifying the hardware configuration information based on the personalized configuration information to obtain the target hardware configuration information.
4. The method of claim 3, wherein the updating the hardware configuration information based on the personalized configuration information comprises:
and under the condition that the personalized configuration information is legal, updating the hardware configuration information based on the personalized configuration information.
5. The method of any of claims 1-4, wherein prior to the obtaining a creation request for a virtual compute instance, the method further comprises:
displaying at least one virtual computing instance snapshot, wherein the at least one virtual computing instance snapshot corresponds to at least one virtual computing instance comprising the source virtual computing instance one by one;
the creation request is generated in response to an operation of a virtual compute instance snapshot for the source virtual compute instance.
6. The method according to any one of claims 1-5, further comprising:
and adding a label to the target virtual computing instance, wherein the label is used for identifying that the target virtual computing instance is created based on a virtual computing instance snapshot of the source virtual computing instance.
7. The method of any of claims 1-6, wherein the deriving a virtual compute instance snapshot of the source virtual compute instance and storing information based on the first information comprises:
generating indication information for indicating to create a target virtual computing instance by using the first information and the second information in response to the creation request, and storing the indication information, the first information and the second information in a file form to obtain a resource file, wherein the first information comprises the name of the snapshot of the virtual computing instance;
inquiring in a storage device to obtain the snapshot of the virtual computing instance and the storage information through the virtual computing instance management device based on the resource file;
the virtual computing instance management device is used for obtaining the name of the source virtual computing instance based on the name of the virtual computing instance snapshot, and inquiring a disk obtaining the source virtual computing instance in the storage device based on the name of the source virtual computing instance so as to obtain the storage information from the disk of the source virtual computing instance.
8. The method according to any one of claims 1-7, further comprising:
and deleting the snapshot of the virtual computing instance and the resource file corresponding to the source virtual computing instance under the condition of deleting the source virtual computing instance.
9. A server cluster, comprising: virtual computing instance creation means, virtual computing instance management means, service communication means, and storage means; wherein the virtual computing instance creation means is connected to the storage means through the communication service means;
the virtual computing instance creation device is used for obtaining a creation request of a virtual computing instance, wherein the creation request comprises first information of a source virtual computing instance and second information of a target virtual computing instance to be created;
the virtual computing instance creating means is configured to obtain, based on the first information, a virtual computing instance snapshot of the source virtual computing instance and storage information from the storage means through the virtual computing instance management means;
the virtual computing instance creating device is further used for obtaining hardware configuration information of the source virtual computing instance based on the virtual computing instance snapshot;
The virtual computing instance creating device is further used for modifying the hardware configuration information based on the second information to obtain target hardware configuration information;
the virtual computing instance creating device is further used for creating and obtaining a target virtual computing instance based on the target hardware configuration information and the storage information.
10. A server comprising a processor and a memory; wherein the memory stores computer instructions and the processor is configured to execute the computer instructions to implement the method of any one of claims 1-8.
CN202310308148.0A 2023-03-27 2023-03-27 Virtual computing instance creation method, server cluster and server Pending CN116541124A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310308148.0A CN116541124A (en) 2023-03-27 2023-03-27 Virtual computing instance creation method, server cluster and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310308148.0A CN116541124A (en) 2023-03-27 2023-03-27 Virtual computing instance creation method, server cluster and server

Publications (1)

Publication Number Publication Date
CN116541124A true CN116541124A (en) 2023-08-04

Family

ID=87445939

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310308148.0A Pending CN116541124A (en) 2023-03-27 2023-03-27 Virtual computing instance creation method, server cluster and server

Country Status (1)

Country Link
CN (1) CN116541124A (en)

Similar Documents

Publication Publication Date Title
US11467755B2 (en) Method and system for enabling agentless backup and restore operations on a container orchestration platform
CN102799464B (en) Virtual machine creation method and system, virtual machine reloading method and system
AU2014311782B2 (en) Scalable distributed storage architecture
CN108073423B (en) Accelerator loading method and system and accelerator loading device
US11070419B2 (en) Methods and systems to troubleshoot and localize storage failures for a multitenant application run in a distributed computing system
US10754741B1 (en) Event-driven replication for migrating computing resources
WO2019061352A1 (en) Data loading method and device
CN106777394B (en) Cluster file system
US11709692B2 (en) Hot growing a cloud hosted block device
CN110520844A (en) Cloud management platform, virtual machine management method and its system
US11307934B1 (en) Virtual backup and restore of virtual machines
CN108062239B (en) Accelerator loading method and system and accelerator loading device
CN113296891B (en) Platform-based multi-scene knowledge graph processing method and device
CN112202855A (en) Communication device for storing bare metal server and elastic block, intelligent network card and system
US11977559B2 (en) Providing instant and distributed access to a source blob via copy-on-read blobs and link blobs
CN115774742A (en) Data storage newly-increased method, device, equipment, medium and product of private cloud
CN116541124A (en) Virtual computing instance creation method, server cluster and server
US10102020B2 (en) Methods, systems, and computer readable media for virtual machine (VM) deployment using read-only memory
CN111737223B (en) File copying method, device, equipment and storage medium
US11262932B2 (en) Host-aware discovery and backup configuration for storage assets within a data protection environment
EP3647953B1 (en) System and method for data backup in mixed disk environment
CN111399753B (en) Method and device for writing pictures
US11429492B2 (en) Protecting and identifying virtual machines that have the same name in a multi-tenant distributed environment
CN118132205A (en) Management method and device of desktop cloud virtual machine, electronic equipment and storage medium
CN114840267A (en) Cloud application program running method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination