CN106844035B - Method and device for realizing resource release or recovery of cloud server - Google Patents

Method and device for realizing resource release or recovery of cloud server Download PDF

Info

Publication number
CN106844035B
CN106844035B CN201710071560.XA CN201710071560A CN106844035B CN 106844035 B CN106844035 B CN 106844035B CN 201710071560 A CN201710071560 A CN 201710071560A CN 106844035 B CN106844035 B CN 106844035B
Authority
CN
China
Prior art keywords
cloud server
host
cloud
computing resource
target host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710071560.XA
Other languages
Chinese (zh)
Other versions
CN106844035A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710071560.XA priority Critical patent/CN106844035B/en
Publication of CN106844035A publication Critical patent/CN106844035A/en
Application granted granted Critical
Publication of CN106844035B publication Critical patent/CN106844035B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • 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/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/5083Techniques for rebalancing the load in a distributed system

Abstract

The invention discloses a method and a device for realizing resource release of a cloud server, which are used for releasing computing resources of a closed cloud server in time and improving the resource utilization rate of a cloud server host, and the method comprises the following steps: in response to a request for closing the cloud server, ending the process of the cloud server; releasing computing resources used by the cloud server in the first host, and triggering the first host to delete a configuration file of the cloud server, wherein the configuration file comprises a computing resource value corresponding to the cloud server; and updating the available computing resource value of the first host according to the computing resource value corresponding to the cloud server. The invention also discloses a method and a device for realizing the cloud server recovery.

Description

Method and device for realizing resource release or recovery of cloud server
Technical Field
The invention relates to the technical field of internet, in particular to a method and a device for realizing resource release or recovery of a cloud server.
Background
In the prior art, a user may request a cloud server to use in a host, where the cloud server is used as a process on the host, and a computing resource such as a Central Processing Unit (CPU), a memory, and a storage resource such as a disk need to be allocated to the cloud server in the host to start the cloud server. After the cloud server expires, a period of time may be reserved for the user to continue to use the cloud server for a user renewal, at this time, the cloud server of the user is closed, but the computing resources such as the CPU, the memory and the like of the cloud server cannot be directly allocated to other cloud servers for use, otherwise, if the original cloud server is restarted, the situation of insufficient resource allocation may exist, the allocated computing resources such as the CPU, the memory and the like are continuously reserved for the cloud server, and the idle computing resources of the host computer and the resource waste are caused.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for implementing resource release or recovery of a cloud server, so as to solve the technical problem in the prior art that a host resource is wasted when a cloud server is temporarily turned off.
In order to solve the problems, the technical scheme provided by the invention is as follows:
a method of enabling cloud server resource release, the method comprising:
in response to a request to close a cloud server, ending a process of the cloud server;
releasing computing resources used by the cloud server in a first host, and triggering the first host to delete a configuration file of the cloud server, wherein the configuration file comprises a computing resource value corresponding to the cloud server;
and updating the available computing resource value of the first host according to the computing resource value corresponding to the cloud server.
Correspondingly, when the storage resource of the cloud server is a cloud hard disk, the method further includes:
and releasing the association relationship between the cloud hard disk and the first host.
Correspondingly, the method further comprises the following steps:
and storing the network configuration information of the cloud server, and triggering the first host to delete the network configuration information.
A method of implementing cloud server recovery, the method comprising:
responding to a request for starting a cloud server, and selecting a target host, wherein an available computing resource value of the target host meets a computing resource value corresponding to the cloud server, and the target host is a first host or a second host;
allocating the computing resources of the target host machine to the cloud server to generate a configuration file, wherein the configuration file comprises a computing resource value corresponding to the cloud server, and updating an available computing resource value of the target host machine according to the computing resource value corresponding to the cloud server;
associating storage resources of the cloud server to the target host;
and starting the process of the cloud server in the target host according to the configuration file.
Correspondingly, the associating the storage resource of the cloud server to the target host includes:
and when the storage resources of the cloud server are cloud hard disks, establishing an association relationship between the cloud hard disks corresponding to the cloud server and the target host machine.
Correspondingly, the associating the storage resource of the cloud server to the target host includes:
and when the storage resources of the cloud server are in the first host and the target host is the second host, transmitting the storage resources of the cloud server from the first host to the second host.
Correspondingly, the method further comprises the following steps:
and acquiring the network configuration information of the cloud server, and sending the network configuration information of the cloud server to the target host machine.
An apparatus for enabling cloud server resource release, the apparatus comprising:
a termination unit configured to terminate a process of a cloud server in response to a request to close the cloud server;
the release unit is used for releasing the computing resources used by the cloud server in a first host machine and triggering the first host machine to delete the configuration file of the cloud server, wherein the configuration file comprises the computing resource value corresponding to the cloud server;
and the updating unit is used for updating the available computing resource value of the first host according to the computing resource value corresponding to the cloud server.
Correspondingly, when the storage resource of the cloud server is a cloud hard disk, the apparatus further includes:
and the releasing unit is used for releasing the association relationship between the cloud hard disk and the first host.
Correspondingly, the device further comprises:
and the storage unit is used for storing the network configuration information of the cloud server and triggering the first host to delete the network configuration information.
An apparatus to implement cloud server recovery, the apparatus comprising:
the cloud server comprises a selecting unit, a processing unit and a processing unit, wherein the selecting unit is used for responding to a request for starting the cloud server and selecting a target host machine, the available computing resource value of the target host machine meets the computing resource value corresponding to the cloud server, and the target host machine is a first host machine or a second host machine;
the allocation unit is used for allocating the computing resources of the target host to the cloud server, generating a configuration file, wherein the configuration file comprises a computing resource value corresponding to the cloud server, and updating an available computing resource value of the target host according to the computing resource value corresponding to the cloud server;
the association unit is used for associating the storage resources of the cloud server to the target host;
and the starting unit is used for starting the process of the cloud server in the target host according to the configuration file.
Correspondingly, the association unit is specifically configured to:
and when the storage resources of the cloud server are cloud hard disks, establishing an association relationship between the cloud hard disks corresponding to the cloud server and the target host machine.
Correspondingly, the association unit is specifically configured to:
and when the storage resources of the cloud server are in the first host and the target host is the second host, transmitting the storage resources of the cloud server from the first host to the second host.
Correspondingly, the device further comprises:
and the acquisition unit is used for acquiring the network configuration information of the cloud server and sending the network configuration information of the cloud server to the target host.
Therefore, the embodiment of the invention has the following beneficial effects:
when the cloud server is temporarily closed, the embodiment of the invention can end the process of the cloud server and release the computing resources, such as a CPU (central processing unit), a memory and the like, used by the cloud server in the first host, and the resources of the first host can be distributed to other cloud servers for use, so that the resource utilization rate of the host is improved, and the resource waste of the host is reduced; meanwhile, when the cloud server needs to be started again, computing resources can be distributed for the cloud server again in the target host, original storage resources of the cloud server are associated to the target host, the cloud server is restarted, and the cloud server can be turned off and on at any time according to actual requirements.
Drawings
FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a cloud server and a host according to an embodiment of the present disclosure;
fig. 3 is a flowchart of an embodiment of a method for implementing resource release of a cloud server according to the present invention;
fig. 4 is a schematic diagram of an embodiment of a method for implementing resource release of a cloud server according to the present invention;
fig. 5 is a flowchart of an embodiment of a method for implementing cloud server recovery according to the present invention;
fig. 6 is a schematic diagram of an embodiment of a method for implementing cloud server recovery according to the present invention;
fig. 7 is a schematic diagram of an embodiment of an apparatus for implementing resource release of a cloud server according to the present invention;
FIG. 8 is a diagram illustrating an embodiment of an apparatus for implementing cloud server recovery according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a server provided in an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
The embodiment of the invention provides a method and a device for realizing cloud server resource release and a method and a device for realizing cloud server recovery, which aim at the technical problems that when a cloud server of a user in the prior art is closed, computing resources such as a CPU (Central processing Unit) and a memory of a host machine where the cloud server is located are still occupied, the idle computing resources such as the CPU and the memory cannot be allocated to other cloud servers, so that the computing resources of the host machine are idle, and resource waste is caused. So as to achieve the purpose of recycling the computing resources. In the embodiment of the invention, the host is a server capable of bearing a virtualization operating system, the cloud server is a process on the host virtualized based on virtualization capability, and the virtualization capability is not limited to virtualization technologies such as qemu/kvm, xen and vmware.
Referring to fig. 1 and fig. 2, an application scenario of the method and the apparatus for releasing resources of a cloud server and the method and the apparatus for recovering the cloud server provided in the embodiment of the present invention is described first. In practical application, the device for realizing resource release of the cloud server and the device for realizing recovery of the cloud server provided in the embodiment of the present invention may be integrated into a server, and the server may interact with a plurality of hosts.
Referring to fig. 3, an embodiment of a method for releasing resources of a cloud server provided in the embodiment of the present invention is shown, and the embodiment of the present invention will be described in terms of a device for releasing resources of a cloud server, where the device for releasing resources of a cloud server may be specifically integrated into a server, and the embodiment may include the following steps:
step 301: and responding to the request for closing the cloud server, and ending the process of the cloud server.
The embodiment of the invention can be applied to the following scenes at least: (1) When the cloud server expires, the host automatically generates a request for closing the cloud server, and at the moment, a method for starting to execute resource release of the cloud server is triggered; (2) The user actively selects to temporarily close the cloud server, the host generates a request for closing the cloud server in response to the closing selection of the user, and at the moment, the method for releasing the resources of the cloud server is started. After receiving the request for closing the cloud server, the server may send an instruction to the host where the cloud server is located to end the process of the cloud server. In this embodiment, the host where the cloud server is located may be referred to as a first host.
Step 302: and releasing the computing resources used by the cloud server in the first host, and triggering the first host to delete the configuration file of the cloud server, wherein the configuration file comprises the computing resource value corresponding to the cloud server.
Each cloud server has a unique identifier, in practical application, a configuration table may be maintained, a first host corresponding to the cloud server is recorded, and the computing resources used by the cloud server in the first host may include a CPU, a memory, and the like. After the process of the cloud server is finished, the cloud server is destroyed and cleared from the first host machine, namely the computing resources used by the cloud server in the first host machine are empty, the first host machine is triggered to delete the configuration file of the cloud server, the cloud server is in an empty state on the first host machine, and the first host machine cannot obtain any information of the cloud server, so that the host machine can allocate the computing resources such as a CPU (central processing unit), a memory and the like used before the cloud server to other cloud servers for use.
Step 303: and updating the available computing resource value of the first host according to the computing resource value corresponding to the cloud server.
After the computing resources used by the cloud server in the first host are released, the released computing resources become the available computing resources of the first host again, and then the available computing resource value of the first host can be updated. For example, assuming that the computing resources of the first host include 64-core CPUs and 128G memories, the computing resources occupied by the cloud server are 4-core CPUs and 4G memories, when the computing resources used by the cloud server in the first host are not released, the available computing resource value of the first host is 60-core CPUs and 124G memories, and after the computing resources used by the cloud server in the first host are released, the available computing resource value of the first host is updated to 64-core CPUs and 128G memories.
In some possible implementation manners of the present invention, when the storage resource of the cloud server is a cloud hard disk, the method may further include:
and releasing the association relationship between the cloud hard disk and the first host.
After the cloud server is powered off, the data in the cloud server can be reserved so that the cloud server can be used again after being powered on. The cloud server can use a cloud hard disk as a storage resource to store data, the cloud hard disk is called a cloud disk for short, is a network storage technology, and refers to a system which integrates a large number of storage devices of different types in a network through application software to cooperatively work through functions such as cluster application, network technology or a distributed file system and provides data storage and service access functions to the outside. After the cloud server is shut down, the storage resources of the cloud server are not destroyed, and only the association relation between the cloud hard disk and the first host is removed, so that the cloud application is in an independent state. In practical applications, the cloud hard disk corresponding to the cloud server may be recorded in the configuration table through the identifier of the cloud server and the identifier of the cloud hard disk, but the association relationship between the cloud hard disk and the first host is released.
In some possible implementations of the present invention, it is also possible:
and storing the network configuration information of the cloud server, and triggering the first host to delete the network configuration information.
The cloud server further has some network configuration information, such as IP (Internet Protocol) resources of the cloud server, network defense policy information, and the like, and in order that the network configuration information cannot be reset when the cloud server is restarted, the network configuration information of the cloud server may be saved, and the network configuration information may be deleted in the first host, so that the network configuration information is unbound to the first host.
Referring to fig. 4, for example, the cloud server a needs to be closed, the cloud server a is closed and destroyed in the first host, the computing resources used by the cloud server a in the first host are released, and meanwhile, the association relationship between the cloud server a and the cloud hard disk a is released, so that the purpose of releasing the resources of the cloud server is achieved.
Therefore, when the cloud server is temporarily closed, the embodiment of the invention can end the process of the cloud server and release the computing resources, such as a CPU (central processing unit), a memory and the like, used by the cloud server in the first host, and the resources of the first host can be distributed to other cloud servers for use, so that the resource utilization rate of the host is improved, and the resource waste of the host is reduced.
Referring to fig. 5, an embodiment of a method for implementing cloud server recovery provided in the embodiment of the present invention is shown, and the embodiment of the present invention will be described from the perspective of a device for implementing cloud server recovery, where the device for implementing cloud server recovery may be specifically integrated into a server, and the embodiment may include the following steps:
step 501: and responding to a request for starting the cloud server, and selecting a target host, wherein the available computing resource value of the target host meets the computing resource value corresponding to the cloud server, and the target host is a first host or a second host.
After the cloud server expires, the user may generate a request for starting the cloud server when the user renews the charge and prepares to use, or the user actively selects to start the cloud server, or may generate a request for starting the cloud server, and at this time, the method for recovering the cloud server starts to be executed. The method comprises the steps that firstly, a proper host machine needs to be selected for the cloud server, the first host machine may be loaded with other cloud servers after being used for a period of time, if the available resource value of the first host machine can meet the computing resource value corresponding to the cloud server, the first host machine can be selected as a target host machine, if the available resource value of the first host machine cannot meet the computing resource value corresponding to the cloud server, a host machine with an available computing resource value meeting the computing resource value corresponding to the cloud server needs to be selected again, the other host machines different from the first host machine can be called as second host machines, and the selected host machine (the first host machine or the second host machine) can be called as the target host machine.
Step 502: and allocating the computing resources of the target host machine to the cloud server, generating a configuration file, wherein the configuration file comprises a computing resource value corresponding to the cloud server, and updating the available computing resource value of the target host machine according to the computing resource value corresponding to the cloud server.
In practical application, a target host corresponding to the cloud server may be recorded in the configuration table, and the computing resources used by the cloud server in the target host are updated according to the computing resource value corresponding to the cloud server. And meanwhile, sending the configuration file to the target host, wherein the configuration file can comprise a computing resource value corresponding to the cloud server, so that the target host can complete the distribution of the computing resource to the cloud server.
Step 503: and associating the storage resources of the cloud server to the target host.
When the cloud server needs to be started, the storage resources originally used by the cloud server need to be retrieved, and the storage resources of the cloud server are associated to the target host.
In some possible implementation manners of the present invention, the specific implementation of associating the storage resource of the cloud server to the target host may include:
and when the storage resource of the cloud server is a cloud hard disk, establishing an association relation between the cloud hard disk corresponding to the cloud server and the target host.
When the storage resource of the cloud server is a cloud hard disk, according to the recorded corresponding relation between the cloud server and the cloud hard disk, an association relation is established between the cloud hard disk and the target host machine, namely the cloud hard disk associated with the cloud server is mounted on the target host machine.
In some possible implementation manners of the present invention, a specific implementation of associating storage resources of a cloud server to a target host may include:
and when the storage resources of the cloud server are in the first host and the target host is the second host, the storage resources of the cloud server are transmitted from the first host to the second host.
If the disk of the first host is used as the storage resource in the first host by the cloud server, the storage resource is not destroyed after the cloud server is closed, that is, the storage resource of the cloud server is still in the first host, if the first host is still selected as the target host when the cloud server is restarted, the storage resource of the cloud server does not need to be deviated, and if the second host is selected as the target host, the storage resource of the cloud server needs to be transmitted from the first host to the second host in advance.
In some possible implementations of the present invention, it is also possible to:
and sending the network configuration information of the cloud server to the target host machine from the network configuration information of the cloud server.
In addition, network configuration information related to the cloud server is associated with the target host, for example, IP (Internet Protocol, protocol for interconnection between networks) resources of the cloud server and network defense policy information are applied to the target host, similarly to the first creation of the cloud server.
Step 504: and starting the process of the cloud server in the target host according to the configuration file.
The cloud server can be redefined and started in the target host according to the configuration file, for example, in practical application, a cloud server is defined by configuration for the use requirement of libvirt on the target host, and then the cloud server is started, so that the original data can be continuously used.
Referring to fig. 6, for example, if the cloud server a needs to be restarted, the second host may be selected as a target host, computing resources are allocated to the cloud server a in the second host, and the cloud hard disk a used by the cloud server a is mounted to the second host, so that the cloud server a is restarted.
Therefore, when the cloud server needs to be started again, computing resources can be distributed for the cloud server again in the target host, original storage resources of the cloud server are associated to the target host, the cloud server is restarted, and the cloud server can be turned off and on at any time according to actual requirements.
Referring to fig. 7, an embodiment of an apparatus for implementing resource release of a cloud server provided in an embodiment of the present invention is shown, and may include:
a finishing unit 701, configured to finish a process of the cloud server in response to a request for closing the cloud server.
A releasing unit 702, configured to release a computing resource used by the cloud server in the first host, and trigger the first host to delete a configuration file of the cloud server, where the configuration file includes a computing resource value corresponding to the cloud server.
An updating unit 703 is configured to update the available computing resource value of the first host according to the computing resource value corresponding to the cloud server.
In some possible implementation manners of the present invention, when the storage resource of the cloud server is a cloud hard disk, an embodiment of the apparatus for implementing resource release of the cloud server provided in the embodiment of the present invention may further include:
and the releasing unit is used for releasing the association relationship between the cloud hard disk and the first host.
In some possible implementation manners of the present invention, an embodiment of the apparatus for implementing resource release of a cloud server provided in the embodiment of the present invention may further include:
and the storage unit is used for storing the network configuration information of the cloud server and triggering the first host to delete the network configuration information.
Therefore, when the cloud server is temporarily closed, the embodiment of the invention can end the process of the cloud server and release the computing resources, such as a CPU (central processing unit), a memory and the like, used by the cloud server in the first host, and the resources of the first host can be allocated to other cloud servers for use, so that the resource utilization rate of the host is improved, and the resource waste of the host is reduced.
Referring to fig. 8, an embodiment of an apparatus for implementing cloud server recovery provided in the embodiment of the present invention is shown, and may include:
the selecting unit 801 is configured to select a target host in response to a request for starting the cloud server, where an available computing resource value of the target host meets a computing resource value corresponding to the cloud server, and the target host is a first host or a second host.
An allocating unit 802, configured to allocate the computing resource of the target host to the cloud server, generate a configuration file, where the configuration file includes a computing resource value corresponding to the cloud server, and update an available computing resource value of the target host according to the computing resource value corresponding to the cloud server.
An associating unit 803, configured to associate the storage resource of the cloud server to the target host.
In some possible implementations of the present invention, the association unit may specifically be configured to:
and when the storage resource of the cloud server is a cloud hard disk, establishing an association relation between the cloud hard disk corresponding to the cloud server and the target host.
In some possible implementations of the present invention, the association unit may specifically be configured to:
and when the storage resources of the cloud server are in the first host and the target host is the second host, the storage resources of the cloud server are transmitted from the first host to the second host.
The starting unit 804 is configured to start a process of the cloud server in the target host according to the configuration file.
In some possible implementation manners of the present invention, the method may further include:
and the acquisition unit is used for acquiring the network configuration information of the cloud server and sending the network configuration information of the cloud server to the target host.
Therefore, when the cloud server needs to be started again, the embodiment of the invention can allocate the computing resources for the cloud server again in the target host, and associate the original storage resources of the cloud server with the target host, thereby realizing the restart of the cloud server, and realizing the closing and opening of the cloud server at any time according to the actual requirement.
Correspondingly, an embodiment of the present invention further provides a server, as shown in fig. 9, where the server may include:
a processor 901, a memory 902, an input device 903, and an output device 904. The number of the processors 901 in the server may be one or more, and one processor is taken as an example in fig. 9. In some embodiments of the present invention, the processor 901, the memory 902, the input device 903 and the output device 904 may be connected by a bus or other means, wherein the connection by the bus is exemplified in fig. 9.
The memory 902 may be used to store software programs and modules, and the processor 901 executes various functional applications of the server and data processing by operating the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The input device 903 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the server.
Specifically, in this embodiment, the processor 901 loads an executable file corresponding to one or more processes of an application program into the memory 902 according to the following instructions, and the processor 901 runs the application program stored in the memory 902, thereby implementing various functions:
in response to a request to close a cloud server, ending a process of the cloud server;
the method comprises the steps that computing resources used by a cloud server in a first host are released, the first host is triggered to delete a configuration file of the cloud server, and the configuration file comprises a computing resource value corresponding to the cloud server;
and updating the available computing resource value of the first host according to the computing resource value corresponding to the cloud server.
Correspondingly, when the storage resource of the cloud server is a cloud hard disk, the method further includes:
and releasing the association relationship between the cloud hard disk and the first host.
Correspondingly, the method also comprises the following steps:
and storing the network configuration information of the cloud server, and triggering the first host to delete the network configuration information.
And/or the presence of a gas in the gas,
responding to a request for starting a cloud server, and selecting a target host, wherein an available computing resource value of the target host meets a computing resource value corresponding to the cloud server, and the target host is a first host or a second host;
allocating the computing resources of the target host machine to the cloud server to generate a configuration file, wherein the configuration file comprises a computing resource value corresponding to the cloud server, and updating an available computing resource value of the target host machine according to the computing resource value corresponding to the cloud server;
associating storage resources of the cloud server to the target host;
and starting the process of the cloud server in the target host according to the configuration file.
Correspondingly, the associating the storage resource of the cloud server to the target host includes:
and when the storage resources of the cloud server are cloud hard disks, establishing an association relationship between the cloud hard disks corresponding to the cloud server and the target host machine.
Correspondingly, the associating the storage resource of the cloud server to the target host includes:
and when the storage resources of the cloud server are in the first host and the target host is the second host, transmitting the storage resources of the cloud server from the first host to the second host.
Correspondingly, the method also comprises the following steps:
and acquiring the network configuration information of the cloud server, and sending the network configuration information of the cloud server to the target host.
Therefore, when the cloud server is temporarily closed, the process of the cloud server can be ended, and computing resources, such as a CPU (central processing unit), a memory and the like, used by the cloud server in the first host can be released, the resources of the first host can be distributed to other cloud servers for use, the resource utilization rate of the host is improved, and the resource waste of the host is reduced; meanwhile, when the cloud server needs to be started again, computing resources can be distributed for the cloud server again in the target host, original storage resources of the cloud server are associated to the target host, the cloud server is restarted, and the cloud server can be turned off and on at any time according to actual requirements.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system or the device disclosed by the embodiment, the description is simple because the system or the device corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. A method for realizing resource release of a cloud server is characterized by comprising the following steps:
in response to a request for closing a cloud server sent by a first host, sending an instruction to the first host to end the process of the cloud server, wherein the request for closing the cloud server is generated under the condition that a user selects to close the cloud server;
releasing computing resources used by the cloud server in a first host, and triggering the first host to delete a configuration file of the cloud server, so that the first host can allocate the computing resources used by the cloud server to other cloud servers for use, wherein the computing resources comprise a memory, and the configuration file comprises a computing resource value corresponding to the cloud server;
updating the available computing resource value of the first host according to the computing resource value corresponding to the cloud server;
when the storage resource of the cloud server is a cloud hard disk, the method further comprises the following steps:
releasing the association relationship between the cloud hard disk and the first host;
and storing the network configuration information of the cloud server, and triggering the first host to delete the network configuration information so as to reset the network configuration information when the cloud server is restarted.
2. A method for realizing cloud server recovery, the method comprising:
responding to a request for starting a cloud server sent by a first host, and selecting a target host, wherein the available computing resource value of the target host meets the computing resource value corresponding to the cloud server, the target host is the first host or a second host, and the request for starting the cloud server comprises the request for starting the cloud server selected by a user;
allocating the computing resources of the target host machine to the cloud server to generate a configuration file, wherein the configuration file comprises a computing resource value corresponding to the cloud server, and updating an available computing resource value of the target host machine according to the computing resource value corresponding to the cloud server;
associating storage resources of the cloud server to the target host;
starting the process of the cloud server in the target host according to the configuration file;
wherein the associating the storage resources of the cloud server to the target host comprises:
when the storage resources of the cloud server are cloud hard disks, establishing an association relationship between the cloud hard disks corresponding to the cloud server and the target host;
and acquiring the network configuration information of the cloud server, and sending the network configuration information of the cloud server to the target host.
3. The method of claim 2, wherein associating the storage resources of the cloud server to the target host comprises:
and when the storage resources of the cloud server are in the first host and the target host is the second host, transmitting the storage resources of the cloud server from the first host to the second host.
4. An apparatus for implementing resource release of a cloud server, the apparatus comprising:
the end unit is used for responding to a request for closing the cloud server sent by a first host, and sending an instruction to the first host to end the process of the cloud server, wherein the generation condition of the request for closing the cloud server comprises that a user selects to close the cloud server;
a releasing unit, configured to release a computing resource used by the cloud server in a first host, and trigger the first host to delete a configuration file of the cloud server, so that the first host may allocate the computing resource used by the cloud server to another cloud server for use, where the computing resource includes a memory, and the configuration file includes a computing resource value corresponding to the cloud server;
the updating unit is used for updating the available computing resource value of the first host according to the computing resource value corresponding to the cloud server;
when the storage resource of the cloud server is a cloud hard disk, the device further comprises:
a release unit, configured to release an association relationship between the cloud hard disk and the first host;
and the storage unit is used for storing the network configuration information of the cloud server and triggering the first host to delete the network configuration information so as to reset the network configuration information when the cloud server is restarted.
5. An apparatus for implementing cloud server recovery, the apparatus comprising:
the cloud server starting method comprises a selecting unit, a starting unit and a judging unit, wherein the selecting unit is used for responding to a request for starting the cloud server sent by a first host machine, selecting a target host machine, the available computing resource value of the target host machine meets the computing resource value corresponding to the cloud server, the target host machine is the first host machine or a second host machine, and the request for starting the cloud server comprises the request for starting the cloud server selected by a user;
the allocation unit is used for allocating the computing resources of the target host to the cloud server, generating a configuration file, wherein the configuration file comprises a computing resource value corresponding to the cloud server, and updating an available computing resource value of the target host according to the computing resource value corresponding to the cloud server;
the association unit is used for associating the storage resources of the cloud server to the target host;
the starting unit is used for starting the process of the cloud server in the target host according to the configuration file;
wherein the association unit is specifically configured to:
when the storage resources of the cloud server are cloud hard disks, establishing an association relationship between the cloud hard disks corresponding to the cloud server and the target host;
and the acquisition unit is used for acquiring the network configuration information of the cloud server and sending the network configuration information of the cloud server to the target host.
6. The apparatus according to claim 5, wherein the associating unit is specifically configured to:
and when the storage resources of the cloud server are in the first host and the target host is the second host, transmitting the storage resources of the cloud server from the first host to the second host.
7. A computer device, comprising: a memory, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is configured to execute a program in the memory to implement the method of claim 1;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
CN201710071560.XA 2017-02-09 2017-02-09 Method and device for realizing resource release or recovery of cloud server Active CN106844035B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710071560.XA CN106844035B (en) 2017-02-09 2017-02-09 Method and device for realizing resource release or recovery of cloud server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710071560.XA CN106844035B (en) 2017-02-09 2017-02-09 Method and device for realizing resource release or recovery of cloud server

Publications (2)

Publication Number Publication Date
CN106844035A CN106844035A (en) 2017-06-13
CN106844035B true CN106844035B (en) 2023-03-24

Family

ID=59121731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710071560.XA Active CN106844035B (en) 2017-02-09 2017-02-09 Method and device for realizing resource release or recovery of cloud server

Country Status (1)

Country Link
CN (1) CN106844035B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984266B (en) * 2018-06-15 2021-09-03 华为技术有限公司 Virtual machine management method, device and system
CN109660393B (en) * 2018-12-18 2022-03-22 郑州云海信息技术有限公司 Method and device for updating specification of cloud host
CN110380894A (en) * 2019-06-27 2019-10-25 苏州浪潮智能科技有限公司 The management method and device of cloud platform medium cloud host

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868763A (en) * 2012-10-08 2013-01-09 山东省计算中心 Energy-saving dynamic adjustment method of virtual web application cluster in cloud computing environment
CN103902401A (en) * 2014-03-14 2014-07-02 汉柏科技有限公司 Virtual machine fault tolerance method and device based on monitoring
CN105278874A (en) * 2015-09-15 2016-01-27 中国联合网络通信集团有限公司 Big data platform system and running method therefor

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102307224A (en) * 2011-05-17 2012-01-04 华为软件技术有限公司 Method and device for realizing service isolation in cloud computing system, and cloud server
EP2608029A1 (en) * 2011-12-19 2013-06-26 Siemens Aktiengesellschaft Method and system for managing resources among different clients for an exclusive use
CN102946413B (en) * 2012-10-17 2015-07-08 北京搜狐新媒体信息技术有限公司 Method and system for resource preprocessing in dispatching and deployment performing process of virtual machine
CN102946433B (en) * 2012-11-22 2015-07-29 合肥华云通信技术有限公司 The monitoring of the large-scale computer resource under cloud public service platform and dispatching method
CN104683480A (en) * 2015-03-19 2015-06-03 成都艺辰德迅科技有限公司 Distribution type calculation method based on applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868763A (en) * 2012-10-08 2013-01-09 山东省计算中心 Energy-saving dynamic adjustment method of virtual web application cluster in cloud computing environment
CN103902401A (en) * 2014-03-14 2014-07-02 汉柏科技有限公司 Virtual machine fault tolerance method and device based on monitoring
CN105278874A (en) * 2015-09-15 2016-01-27 中国联合网络通信集团有限公司 Big data platform system and running method therefor

Also Published As

Publication number Publication date
CN106844035A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
JP6892729B2 (en) Code execution request routing
CN108376100B (en) Security-based container scheduling
JP6363796B2 (en) Dynamic code deployment and versioning
EP3073374B1 (en) Thread creation method, service request processing method and related device
EP3376378A1 (en) Container license management method, and apparatus
CN108064377B (en) Management method and device for multi-system shared memory
CN106844035B (en) Method and device for realizing resource release or recovery of cloud server
KR20110002810A (en) Securely using service providers in elastic computing systems and environments
EP3531280A1 (en) Accelerator loading method and system, and accelerator loading apparatus
WO2018107945A1 (en) Method and device for implementing allocation of hardware resources, and storage medium
US20210089345A1 (en) Method and Apparatus for Virtual Machine Emulator Upgrading Virtualization Emulator
US10579299B2 (en) Method, apparatus, server and storage medium of erasing cloud host in cloud-computing environment
TWI648637B (en) System and method for deploying and operating mobile operating system on platform
CN105808319B (en) Method, device and system for controlling memory balloon
CN112395084A (en) Bare metal server deployment method
EP3843361A1 (en) Resource configuration method and apparatus, and storage medium
CN106803786B (en) Network element updating method and system based on network function virtualization
KR101552580B1 (en) Method for system recovery including mobile device and backup supporting multi operation system
CN109739615B (en) Mapping method and device of virtual hard disk and cloud computing platform
KR102327065B1 (en) Apparatus for accelerating virtual machine provisioning by use of bws and apparatus for managing the virtual machine and method thereof
CN111435299A (en) Application processing method and device
CN114020342B (en) Starting method and device of embedded equipment, embedded equipment and storage medium
CN107256171B (en) Multi-system installation and switching method and system based on BIOS
KR101839503B1 (en) Apparatus and method for providing of address space maintaining
JP2018063611A (en) Boot loader program, information processing device, and booting method

Legal Events

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