CN111176790A - Active maintenance method and device of cloud platform physical host and readable storage medium - Google Patents

Active maintenance method and device of cloud platform physical host and readable storage medium Download PDF

Info

Publication number
CN111176790A
CN111176790A CN201911398261.2A CN201911398261A CN111176790A CN 111176790 A CN111176790 A CN 111176790A CN 201911398261 A CN201911398261 A CN 201911398261A CN 111176790 A CN111176790 A CN 111176790A
Authority
CN
China
Prior art keywords
physical host
host
migration
maintenance
virtual machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN201911398261.2A
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.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN201911398261.2A priority Critical patent/CN111176790A/en
Publication of CN111176790A publication Critical patent/CN111176790A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

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 application discloses an active maintenance method and device for a physical host of a cloud platform and a computer readable storage medium. When detecting that the physical host carries out maintenance operation, automatically placing the physical host in a maintenance state, and simultaneously migrating a virtual machine running on the physical host; and after the migration of the virtual machine is finished, the physical host is converted into a non-maintenance state from the maintenance state and the power supply state of the physical host is a power-on state, and the migrated virtual machine is automatically migrated back to the physical host. The method and the device can realize active maintenance of the physical host, automatically migrate the virtual machine running on the physical host, automatically execute the migration operation after the host completes maintenance, simplify user maintenance operation, and improve user experience.

Description

Active maintenance method and device of cloud platform physical host and readable storage medium
Technical Field
The present application relates to the field of cloud platform technologies, and in particular, to an active maintenance method and apparatus for a physical host of a cloud platform, and a computer-readable storage medium.
Background
With the rapid speed of big data and internet technologies, cloud computing platforms, also called cloud platforms, are widely used in various industries. The cloud computing platform refers to services based on hardware resources and software resources, and provides computing, network and storage capabilities for users. The user's business runs in a cloud host, which may also be referred to as a virtual machine, and the cloud host runs on top of a physical host.
It can be understood that, the physical host inevitably performs hardware upgrade and software upgrade during the use process, and the hardware upgrade includes installing more memories and disks, replacing devices such as a CPU/GPU/network card and the like; software upgrades such as upgrading operating systems, virtualizing software, and the like; when software and hardware of the physical host are upgraded, maintenance operation is required.
In the related art, when a physical host is maintained, such as a VMware cloud platform and an Openstack cloud platform, a user needs to manually move all virtual machines running on the physical host out, and then manually place the physical host in a maintenance state, which brings inconvenience to the user.
Disclosure of Invention
The application provides an active maintenance method and device for a physical host of a cloud platform and a computer-readable storage medium, which can realize active maintenance of the physical host, automatically migrate a virtual machine running on the physical host, and automatically execute a migration operation after the host completes maintenance, thereby simplifying user maintenance operation and improving user experience.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
an embodiment of the present invention provides an active maintenance method for a physical host of a cloud platform, including:
when detecting that a physical host carries out software and/or hardware upgrading, automatically placing the physical host in a maintenance state, and simultaneously migrating a virtual machine running on the physical host;
when the fact that the virtual machine is migrated, the physical host is converted from the maintenance state to the non-maintenance state, and the physical host is in the power-on state is detected, the migrated virtual machine is automatically migrated back to the physical host;
the migrating the virtual machine running on the physical host comprises:
when a target migration host appointed instruction input by a user is received, migrating all virtual machines running on the physical host to the target migration host;
when a target migration host appointed instruction input by a user is not received, judging whether an idle standby physical host exists or not;
if an idle standby physical host exists, migrating all virtual machines running on the physical host to the standby physical host; and if the idle standby physical host does not exist, carrying out virtual machine migration on the virtual machine running on the physical host according to a preset scheduling rule.
Optionally, the migrating the virtual machine running on the physical host according to a preset scheduling rule includes:
acquiring all current hosts of the cloud platform except the physical host, and generating a target host list;
removing hosts meeting filtering conditions from the target host list by using a pre-configured filter, and generating a candidate host list;
and calculating the weight value of each candidate host in the candidate host list, and migrating the virtual machine running on the physical host to the candidate host with the minimum weight value.
Optionally, after migrating the virtual machine running on the physical host at the same time, the method further includes:
generating a migration information recording file, wherein the migration information recording file comprises a migration type, a migration result, migration time, ID information and name of a source host, ID information and name of each virtual machine, and ID information and name of a destination host;
correspondingly, after the migrating the migrated virtual machine back to the physical host, the method further includes:
and generating a migration information record file, wherein the migration information record file comprises a migration result, migration time, the ID information and name of the source host, the ID information and name of each virtual machine and the ID information and name of the destination host.
Optionally, after the generating the migration information recording file, the method further includes:
and when the physical host migration information query instruction input by a user is received, feeding back the migration information recording file and the return information recording file of the physical host every time to the user through a preset interface according to the migration time sequence.
Optionally, before detecting that the virtual machine completes migration and the physical host is in a power-on state, the method further includes:
and determining whether to send an instruction for executing the power-on operation of the physical host according to the power state of the physical host and whether the physical host exits the maintenance state.
Optionally, the determining whether to send the instruction for executing the power-on operation of the physical host according to the power state of the physical host and whether the physical host exits from the maintenance state includes:
judging whether a host power-off request instruction input by a user is received;
if yes, executing power-off operation on the physical host;
and when the physical host is detected to be in a power-off state and the physical host exits from the maintenance state, actively sending an instruction for executing the power-on operation of the physical host.
Another aspect of the embodiments of the present invention provides an active maintenance device for a physical host of a cloud platform, including:
the host maintenance module is used for automatically placing the physical host in a maintenance state and simultaneously migrating the virtual machine running on the physical host when detecting that the physical host is subjected to software and/or hardware upgrading;
the maintenance exit module is used for automatically migrating the migrated virtual machine back to the physical host when detecting that the virtual machine is migrated, the physical host is converted from the maintenance state to the non-maintenance state and the physical host is in a power-on state;
wherein the host maintenance module may include:
the specified migration sub-module is used for migrating the virtual machines running on the physical host to the target migration host when receiving a target migration host specified instruction input by a user;
the host machine migration submodule is used for judging whether an idle standby physical host machine exists or not when a target migration host machine appointed instruction input by a user is not received;
the migration submodule is used for migrating the virtual machines running on the physical host to the standby physical host if the standby physical host is idle; and if the idle standby physical host does not exist, carrying out virtual machine migration on the virtual machine running on the physical host according to a preset scheduling rule.
Optionally, the system further includes an information generating module, where the information generating module is configured to generate a migration information record file after migrating the virtual machine running on the physical host, or generate a migration information record file after migrating the migrated virtual machine back to the physical host.
The embodiment of the invention also provides an active maintenance device of the cloud platform physical host, which comprises a processor, wherein the processor is used for realizing the steps of the active maintenance method of the cloud platform physical host when executing the computer program stored in the memory.
Finally, an embodiment of the present invention provides a computer-readable storage medium, where an active maintenance program of a cloud platform physical host is stored on the computer-readable storage medium, and when executed by a processor, the active maintenance program of the cloud platform physical host implements the steps of the active maintenance method of the cloud platform physical host according to any one of the foregoing embodiments.
The technical scheme provided by the application has the advantages that when the physical host needs to be maintained, the physical host is automatically placed in the maintenance state, and all the virtual machines on the maintenance nodes are migrated out. And determining whether to carry out power-on operation on the physical host according to the power state of the physical host, and when detecting that the physical host is powered on again and the physical host is converted into a non-maintenance state from a maintenance state, completely migrating the original virtual machines on the maintenance node back to the maintenance host. The method has the advantages that the active maintenance of the physical host is realized, the characteristics of the cloud management platform are enriched, the maintenance flow of the physical host is optimized, the maintenance operation of a cloud platform administrator on the physical host is greatly simplified, and the use experience of a user is improved.
In addition, the embodiment of the invention also provides a corresponding implementation device and a computer readable storage medium for the active maintenance method of the physical host of the cloud platform, so that the method has higher practicability, and the device and the computer readable storage medium have corresponding advantages.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the related art, the drawings required to be used in the description of the embodiments or the related art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an active maintenance method for a physical host of a cloud platform according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another active maintenance method for a physical host of a cloud platform according to an embodiment of the present invention;
fig. 3 is a structural diagram of an embodiment of an active maintenance apparatus for a physical host of a cloud platform according to an embodiment of the present invention;
fig. 4 is a structural diagram of another specific embodiment of an active maintenance device of a cloud platform physical host according to an embodiment of the present invention;
fig. 5 is a structural diagram of another specific embodiment of an active maintenance device of a XXX cloud platform physical host according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed.
Having described the technical solutions of the embodiments of the present invention, various non-limiting embodiments of the present application are described in detail below.
Referring to fig. 1, fig. 1 is a schematic flow chart of an active maintenance method for a cloud platform physical host according to an embodiment of the present invention, where the embodiment of the present invention may include the following:
s101: when detecting that the physical host computer carries out software and/or hardware upgrading, automatically placing the physical host computer in a maintenance state, and simultaneously migrating the virtual machine running on the physical host computer.
It can be understood that, when the physical host performs software and hardware upgrading, for example, more memories and disks are added, devices such as a CPU/GPU/network card are replaced, an operating system is upgraded, virtualization software is updated, and maintenance operation needs to be performed, that is, the physical host needs to enter a host maintenance state. When the system detects that the physical host needs to be maintained, the physical host is automatically placed in a maintenance state, for example, the physical host can be characterized to be in the maintenance state by setting the maintenance state identification information. In the application, as long as the physical host is detected to be in the maintenance state, all the virtual machines running on the physical host are actively migrated.
The process of selecting a destination host for migration from a cluster for a virtual machine running on a physical host may include:
when a target migration host appointed instruction input by a user is received, migrating all virtual machines running on a physical host to the target migration host; when a target migration host appointed instruction input by a user is not received, judging whether an idle standby physical host exists or not; if the spare physical host exists, migrating all the virtual machines running on the physical host to the spare physical host; and if the idle standby physical host does not exist, migrating the virtual machine running on the physical host according to a preset scheduling rule.
That is, if the user designates the target host, the virtual machine on the node to be maintained is preferentially migrated to the designated target host; if the user does not specify the target host, and there are idle hosts in the cluster, i.e., the hosts are standby physical hosts, in order to ensure high availability of the cloud platform in extreme cases, the cloud platform plans some standby physical host nodes in some areas, and the nodes are normally in an idle state and do not run any cloud host. If an extreme condition occurs, such as a certain physical node in the area suddenly fails, the cloud host on the failed node can be timely recovered on the standby physical host, the customer service is not affected, and the virtual machine on the node to be maintained is migrated to the idle host; if the user does not designate a target host and there is no idle host in the cluster, the virtual machine on the node to be maintained is migrated out of the maintenance node according to a scheduling rule preset by the user or a scheduling rule for virtual machine migration in the related art, which is not limited in this application.
S102: and when the virtual machine is detected to finish the migration, the physical host is converted from the maintenance state to the non-maintenance state and the physical host is in the power-on state, automatically migrating the migrated virtual machine back to the physical host.
In this application, after the virtual machine is migrated in S101, a power-down operation may be performed according to whether a user selects to perform the power-down operation, and if the user inputs the power-down operation, the physical host performs the power-down operation. The physical host leaving the maintenance mode or entering the maintenance state can be executed according to the instruction of a user or an administrator, when the maintenance mode entering instruction input by the user or the administrator is received, the physical host enters the maintenance mode, and when the maintenance mode exiting instruction input by the user or the administrator is received, the physical host exits the maintenance mode. When the current state of the physical host is detected to be converted from the maintenance state to the non-maintenance state, that is, the physical host is maintained, the software and the hardware are upgraded, and the migrated virtual machines can be migrated back to the physical host. After the physical host completes maintenance and the physical host is in a power-off state, the physical host needs to be powered on to execute the virtual machine migration operation of S102. Wherein, the physical host can be represented to exit the maintenance state by clearing the maintenance conversion identification information of the physical host.
In the technical scheme provided by the embodiment of the invention, when the physical host needs to be maintained, the physical host is automatically placed in the maintenance state, and all the virtual machines on the maintenance node are migrated out. And determining whether to carry out power-on operation on the physical host according to the power state of the physical host, and when detecting that the physical host is powered on again and the physical host is converted into a non-maintenance state from a maintenance state, completely migrating the original virtual machines on the maintenance node back to the maintenance host. The method has the advantages that the active maintenance of the physical host is realized, the characteristics of the cloud management platform are enriched, the maintenance flow of the physical host is optimized, the maintenance operation of a cloud platform administrator on the physical host is greatly simplified, and the use experience of a user is improved.
The foregoing embodiment does not limit an implementation manner of performing virtual machine migration on a virtual machine on a physical host according to a preset scheduling rule, and the present application further provides an implementation manner, which may include:
acquiring all current hosts of the cloud platform except the physical host, and generating a target host list; removing the hosts meeting the filtering condition from the target host list by using a pre-configured filter to generate a candidate host list; and calculating the weight value of each candidate host in the candidate host list, and migrating the virtual machine running on the physical host to the candidate host with the minimum weight value.
The configuration conditions of the filters can be based on image attributes, available space, computing capacity, kernel utilization rate, disk utilization rate, number of running nodes and the like, a user can set a plurality of filters according to actual requirements and can also set one filter, the implementation of the application is not influenced, the filters are used for filtering the target hosts meeting the filtering conditions in the target host list, and the rest target hosts are placed in the candidate host list. When calculating each candidate host in the candidate host list, the weight value of each candidate host can be calculated based on a certain attribute such as the total number of running calculation nodes and the utilization rate of a disk according to actual needs, then the candidate hosts with the minimum weight values are ranked from small to large, and the candidate host with the minimum weight value is used as the host for virtual machine migration on the physical host.
As another optional implementation manner, in order to implement the maintenance operation of the physical host more flexibly, before S102, it may further include determining whether to send an instruction for executing the power-on operation of the physical host according to the power state of the physical host and whether the physical host exits from the maintenance state, after all the virtual machines on the maintenance node are migrated, it may be selected according to a user requirement whether to perform the power-off operation on the physical host, and it may be determined whether to perform the power-on operation on the physical host according to the power state of the physical host and whether to receive the instruction for exiting from the maintenance mode, and when the physical host is not in the maintenance state and the power-on operation is completed, the original mount virtual machine of the physical host may be automatically migrated back.
In addition, the present application further provides another embodiment, please refer to fig. 2, and fig. 2 is a schematic flow chart of an active maintenance method for a physical host of a cloud platform according to an embodiment of the present invention, where the embodiment of the present invention may include the following:
s201: and when detecting that the physical host computer is subjected to software and/or hardware upgrading, automatically placing the physical host computer in a maintenance state.
S202: and migrating the virtual machine running on the physical host, and generating a migration information recording file.
In order to facilitate management and query of maintenance information of the physical host and facilitate tracing of subsequent failures, during execution of migration of the virtual machine on the physical host, an action _ play, for example, may also be used to record the migration process, for example, the type, parameters, and results of each action may be recorded. The action _ play can be queried by the user through a specific interface. The migration information record file may include a migration type, a migration result, a migration time, ID information and name of the source host, ID information and name of each virtual machine, and ID information and name of the destination host. The migration type can be hot migration of active virtual machines and cold migration of inactive virtual machines, for example; the migration result is migration success or migration failure; in the process of migrating the virtual machine from the physical host, the source host is the physical host, and the destination host is the physical host to which the virtual machine is migrated. It can be understood that the virtual machines migrated from the same physical host may migrate to the same destination host, or migrate to different destination hosts, which does not affect the implementation of the present application.
S203: and judging whether a host power-off request instruction input by a user is received, if so, executing S204.
S204: and executing power-off operation on the physical host.
It can be understood that when the hardware of the physical host needs maintenance, the node needs to be powered off; accordingly, when the hardware maintenance is exited, the node needs to be powered up again. When the software of the physical host is maintained, the node is not necessarily powered off, so whether the physical host is powered off or not is the choice of the current user.
S205: and when the physical host is detected to be in a power-off state, actively sending an instruction for executing the power-on operation of the physical host.
S206: and when receiving a command of exiting the maintenance mode input by the user, automatically exiting the physical host from the maintenance state.
S207: and when the current state of the physical host is a power-on state, migrating the migrated virtual machine back to the physical host again to generate a back migration information recording file.
In order to facilitate management and query of maintenance information of the physical host and facilitate tracing of subsequent failures, during execution of the virtual machine migration process on the physical host, an action _ play, for example, may also be used to record the migration process, for example, may record the type, parameters, results, and the like of each action. The action _ play can be queried by the user through a specific interface. The migration information recording file includes a migration result, migration time, ID information and name of the source host, ID information and name of each virtual machine, and ID information and name of the destination host. The migration result can be migration success or migration failure; in the process of migrating the virtual machine back to the physical host, the source host is the physical host from which the virtual machine has migrated, and the destination host is the physical host in S01.
S208: when a physical host migration information query instruction input by a user is received, feeding back the migration information recording file and the return information recording file of the physical host every time to the user through a preset interface according to the migration time sequence.
In the application, when a user inputs a query instruction, the name of a physical host can be directly input, and all migration information recording files and return information recording files of the physical host are output; if the user inputs the query instruction including the name of the physical host and the migration time, outputting all migration information recording files and return information recording files of the physical host in the period of time; and if the file type is migration information or return information, outputting an information recording file corresponding to the physical host.
The steps or methods of the embodiments of the present invention that are the same as those of the embodiments of the present invention can refer to the descriptions of the same parts of the embodiments of the method described above, and are not described herein again.
In addition, it should be noted that, in the process of performing the maintenance mode, if any one of the above steps fails, the remaining steps are not executed, and the physical host fails to enter the maintenance mode; otherwise, the physical host successfully enters the maintenance mode. In the process of exiting the maintenance mode, if any step fails, the rest steps are not executed any more, and the physical host fails to exit the maintenance mode; otherwise, the physical host successfully exits the maintenance mode.
Therefore, the embodiment of the invention can realize the active maintenance of the physical host, automatically migrate the virtual machine running on the physical host, and automatically execute the migration operation after the maintenance of the host is finished, thereby simplifying the maintenance operation of the user and improving the use experience of the user.
It should be noted that, in the present application, there is no strict sequential execution order among the steps, and as long as a logical order is met, the steps may be executed simultaneously or according to a certain preset order, and fig. 1 to fig. 2 are only schematic manners, and do not represent only such an execution order.
The embodiment of the invention also provides a corresponding device for the active maintenance method of the physical host of the cloud platform, so that the method has higher practicability. Wherein the means can be described separately from the functional module point of view and the hardware point of view. In the following, the active maintenance device of the cloud platform physical host according to the embodiments of the present invention is introduced, and the active maintenance device of the cloud platform physical host described below and the active maintenance method of the cloud platform physical host described above may be referred to correspondingly.
Based on the angle of the functional module, referring to fig. 3, fig. 3 is a structural diagram of an active maintenance device of a cloud platform physical host according to an embodiment of the present invention, in a specific implementation manner, the active maintenance device may include:
the host maintenance module 301 is configured to, when detecting that the physical host performs software and/or hardware upgrade, automatically place the physical host in a maintenance state, and migrate a virtual machine running on the physical host.
A maintenance exit module 302, configured to, when it is detected that the virtual machine completes migration, the state of the physical host is converted from the maintenance state to the non-maintenance state, and the physical host is in the power-on state, automatically migrate the migrated virtual machine back to the physical host;
wherein the host maintenance module 301 may include:
the specified migration sub-module is used for migrating the virtual machines running on the physical host to the target migration host when receiving a target migration host specified instruction input by a user;
the host machine migration sub-module is used for migrating all the virtual machines running on the physical host machine to the standby physical host machine when a target migration host machine appointed instruction input by a user is not received and the standby physical host machine is idle;
and the migration according to rules submodule is used for migrating the virtual machine running on the physical host according to preset scheduling rules when the target migration host appointed instruction input by the user is not received and no idle standby physical host exists.
Optionally, in some embodiments of this embodiment, referring to fig. 4, the apparatus may include a power state determining module 303, configured to determine whether to send an instruction to execute a power-on operation of the physical host according to a power state of the physical host and whether the physical host exits from the maintenance state. The apparatus may further include, for example, an information generating module 304, where the information generating module 304 is configured to generate a migration information record file after migrating a virtual machine running on the physical host or generate a migration information record file after migrating an migrated virtual machine back to the physical host.
Optionally, the power state determining module 302 may specifically include:
the judging submodule is used for judging whether a host power-off request instruction input by a user is received;
the power-off operation sub-module is used for executing power-off operation on the physical host when a host power-off request instruction input by a user is received;
and the power-on operation sub-module is used for actively sending an instruction for executing the power-on operation of the physical host when the physical host is detected to be in the power-off state and the physical host exits the maintenance state.
In other embodiments of this embodiment, the apparatus may further include an information query module 305, for example, where the information query module 305 is configured to, when receiving the physical host migration information query instruction input by the user, feed back the migration information record file and the migration information record file of the physical host to the user through a preset interface according to the migration time sequence.
In other embodiments of this embodiment, the migrating sub-module according to rules may include:
the target host list generating unit is used for acquiring all the current hosts of the cloud platform except the physical host and generating a target host list;
the candidate host list generating unit is used for removing the hosts meeting the filtering condition from the target host list by using a pre-configured filter to generate a candidate host list;
the weight calculation unit is used for calculating the weight value of each candidate host in the candidate host list; and the migration unit is used for migrating the virtual machine running on the physical host to the candidate host with the minimum weight value.
The functions of each functional module of the active maintenance device of the cloud platform physical host according to the embodiment of the present invention may be specifically implemented according to the method in the above method embodiment, and the specific implementation process may refer to the description related to the above method embodiment, which is not described herein again.
Therefore, the embodiment of the invention can realize the active maintenance of the physical host, automatically migrate the virtual machine running on the physical host, and automatically execute the migration operation after the maintenance of the host is finished, thereby simplifying the maintenance operation of the user and improving the use experience of the user.
The active maintenance device of the cloud platform physical host mentioned above is described from the perspective of the functional module, and further, the present application also provides an active maintenance device of the cloud platform physical host, which is described from the perspective of hardware. Fig. 5 is a structural diagram of an active maintenance apparatus of another cloud platform physical host according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus comprises a memory 50 for storing a computer program;
the processor 51 is configured to implement the steps of the active maintenance method for the physical host of the cloud platform according to the above embodiments when executing the computer program.
The processor 51 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 51 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). In some embodiments, the processor 51 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 51 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 50 may include one or more computer-readable storage media, which may be non-transitory. Memory 50 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 50 is at least used for storing the following computer program 501, wherein after being loaded and executed by the processor 51, the computer program can implement the relevant steps of the active maintenance method for a cloud platform physical host disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 50 may also include an operating system 502, data 503, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 502 may include Windows, Unix, Linux, etc. Data 503 may include, but is not limited to, data corresponding to test results, and the like.
In some embodiments, the data access device of the board chip may further include a display screen 52, an input/output interface 53, a communication interface 54, a power supply 55, and a communication bus 56.
Those skilled in the art will appreciate that the structure shown in fig. 5 does not constitute a limitation to the data access means of the board chip, and may include more or fewer components than those shown, for example, sensor 57.
The functions of each functional module of the active maintenance device of the cloud platform physical host according to the embodiment of the present invention may be specifically implemented according to the method in the above method embodiment, and the specific implementation process may refer to the description related to the above method embodiment, which is not described herein again.
Therefore, the embodiment of the invention can realize the active maintenance of the physical host, automatically migrate the virtual machine running on the physical host, and automatically execute the migration operation after the maintenance of the host is finished, thereby simplifying the maintenance operation of the user and improving the use experience of the user.
It is understood that, if the active maintenance method of the cloud platform physical host in the above embodiments is implemented in the form of a software functional unit and is sold or used as a stand-alone product, it may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be substantially or partially implemented in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods of the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), an electrically erasable programmable ROM, a register, a hard disk, a removable magnetic disk, a CD-ROM, a magnetic disk, or an optical disk.
Based on this, the embodiment of the present invention further provides a computer-readable storage medium, in which an active maintenance program of a cloud platform physical host is stored, and when the active maintenance program of the cloud platform physical host is executed by a processor, the steps of the active maintenance method of the cloud platform physical host according to any one of the above embodiments are performed.
The functions of the functional modules of the computer-readable storage medium according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Therefore, the embodiment of the invention can realize the active maintenance of the physical host, automatically migrate the virtual machine running on the physical host, and automatically execute the migration operation after the maintenance of the host is finished, thereby simplifying the maintenance operation of the user and improving the use experience of the user.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The active maintenance method and device for the cloud platform physical host and the computer readable storage medium provided by the present application are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. An active maintenance method for a physical host of a cloud platform is characterized by comprising the following steps:
when detecting that a physical host carries out software and/or hardware upgrading, automatically placing the physical host in a maintenance state, and simultaneously migrating a virtual machine running on the physical host;
when the fact that the virtual machine is migrated, the physical host is converted from the maintenance state to the non-maintenance state, and the physical host is in the power-on state is detected, the migrated virtual machine is automatically migrated back to the physical host;
wherein migrating the virtual machine running on the physical host comprises:
when a target migration host appointed instruction input by a user is received, migrating all virtual machines running on the physical host to the target migration host;
when a target migration host appointed instruction input by a user is not received, judging whether an idle standby physical host exists or not;
if an idle standby physical host exists, migrating all virtual machines running on the physical host to the standby physical host; and if the idle standby physical host does not exist, carrying out virtual machine migration on the virtual machine running on the physical host according to a preset scheduling rule.
2. The active maintenance method of the cloud platform physical host according to claim 1, wherein the migrating the virtual machine running on the physical host according to a preset scheduling rule includes:
acquiring all current hosts of the cloud platform except the physical host, and generating a target host list;
removing hosts meeting filtering conditions from the target host list by using a pre-configured filter, and generating a candidate host list;
and calculating the weight value of each candidate host in the candidate host list, and migrating the virtual machine running on the physical host to the candidate host with the minimum weight value.
3. The active maintenance method of the cloud platform physical host according to claim 1 or 2, wherein after the virtual machines running on the physical host are migrated at the same time, the method further comprises:
generating a migration information recording file, wherein the migration information recording file comprises a migration type, a migration result, migration time, ID information and name of a source host, ID information and name of each virtual machine, and ID information and name of a destination host;
correspondingly, after the migrating the migrated virtual machine back to the physical host, the method further includes:
and generating a migration information record file, wherein the migration information record file comprises a migration result, migration time, the ID information and name of the source host, the ID information and name of each virtual machine and the ID information and name of the destination host.
4. The active maintenance method of a cloud platform physical host according to claim 3, wherein after the generating the migration information record file, further comprising:
and when the physical host migration information query instruction input by a user is received, feeding back the migration information recording file and the return information recording file of the physical host every time to the user through a preset interface according to the migration time sequence.
5. The active maintenance method of the cloud platform physical host according to claim 1 or 2, wherein before the virtual machine is detected to complete migration, the physical host is converted from the maintenance state to the non-maintenance state, and the physical host is in the power-on state, the method further comprises:
and determining whether to send an instruction for executing the power-on operation of the physical host according to the power state of the physical host and whether the physical host exits the maintenance state.
6. The active maintenance method of the cloud platform physical host according to claim 5, wherein the determining whether to send the instruction to execute the power-on operation of the physical host according to the power state of the physical host and whether the physical host exits the maintenance state is:
judging whether a host power-off request instruction input by a user is received;
if yes, executing power-off operation on the physical host;
and when the physical host is detected to be in a power-off state and the physical host exits from the maintenance state, actively sending an instruction for executing the power-on operation of the physical host.
7. An active maintenance device of a physical host of a cloud platform, comprising:
the host maintenance module is used for automatically placing the physical host in a maintenance state and simultaneously migrating the virtual machine running on the physical host when detecting that the physical host is subjected to software and/or hardware upgrading;
the maintenance exit module is used for automatically migrating the migrated virtual machine back to the physical host when detecting that the virtual machine is migrated, the physical host is converted from the maintenance state to the non-maintenance state and the physical host is in a power-on state;
wherein the host maintenance module may include:
the specified migration sub-module is used for migrating the virtual machines running on the physical host to the target migration host when receiving a target migration host specified instruction input by a user;
the host machine migration submodule is used for judging whether an idle standby physical host machine exists or not when a target migration host machine appointed instruction input by a user is not received;
the migration submodule is used for migrating the virtual machines running on the physical host to the standby physical host if the standby physical host is idle; and if the idle standby physical host does not exist, carrying out virtual machine migration on the virtual machine running on the physical host according to a preset scheduling rule.
8. The active maintenance device of a cloud platform physical host of claim 7, further comprising:
and the information generation module is used for generating a migration information recording file after migrating the virtual machine running on the physical host or generating a migration information recording file after migrating the migrated virtual machine back to the physical host.
9. An active maintenance device of a cloud platform physical host, comprising a processor, wherein the processor is configured to implement the steps of the active maintenance method of the cloud platform physical host according to any one of claims 1 to 6 when executing a computer program stored in a memory.
10. A computer-readable storage medium, on which an active maintenance program of a cloud platform physical host is stored, which when executed by a processor implements the steps of the active maintenance method of the cloud platform physical host according to any one of claims 1 to 6.
CN201911398261.2A 2019-12-30 2019-12-30 Active maintenance method and device of cloud platform physical host and readable storage medium Withdrawn CN111176790A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911398261.2A CN111176790A (en) 2019-12-30 2019-12-30 Active maintenance method and device of cloud platform physical host and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911398261.2A CN111176790A (en) 2019-12-30 2019-12-30 Active maintenance method and device of cloud platform physical host and readable storage medium

Publications (1)

Publication Number Publication Date
CN111176790A true CN111176790A (en) 2020-05-19

Family

ID=70623314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911398261.2A Withdrawn CN111176790A (en) 2019-12-30 2019-12-30 Active maintenance method and device of cloud platform physical host and readable storage medium

Country Status (1)

Country Link
CN (1) CN111176790A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486628A (en) * 2020-11-20 2021-03-12 湖南麒麟信安科技股份有限公司 Virtual machine migration method between virtual private clouds
CN114443296A (en) * 2022-01-21 2022-05-06 苏州浪潮智能科技有限公司 Method, device, equipment and readable medium for migrating high-availability events
CN115328065A (en) * 2022-09-16 2022-11-11 中国核动力研究设计院 Method for automatically migrating control unit functions applied to industrial control system
CN115904621A (en) * 2022-10-12 2023-04-04 北京志凌海纳科技有限公司 Super-fusion system host maintenance method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457777A (en) * 2013-09-05 2013-12-18 华为技术有限公司 Power-supply distribution unit disaster tolerance method, managers and system
CN103473142A (en) * 2013-10-08 2013-12-25 浪潮(北京)电子信息产业有限公司 Virtual machine transferring method and device under cloud computing operating system
CN105426243A (en) * 2015-11-19 2016-03-23 国云科技股份有限公司 Openstack based physical machine remote maintenance method
CN109783199A (en) * 2019-03-28 2019-05-21 浪潮商用机器有限公司 A kind of virtual machine migration method and device
CN109800058A (en) * 2019-01-23 2019-05-24 山东超越数控电子股份有限公司 A kind of virtual machine Autonomic Migration Framework method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457777A (en) * 2013-09-05 2013-12-18 华为技术有限公司 Power-supply distribution unit disaster tolerance method, managers and system
CN103473142A (en) * 2013-10-08 2013-12-25 浪潮(北京)电子信息产业有限公司 Virtual machine transferring method and device under cloud computing operating system
CN105426243A (en) * 2015-11-19 2016-03-23 国云科技股份有限公司 Openstack based physical machine remote maintenance method
CN109800058A (en) * 2019-01-23 2019-05-24 山东超越数控电子股份有限公司 A kind of virtual machine Autonomic Migration Framework method
CN109783199A (en) * 2019-03-28 2019-05-21 浪潮商用机器有限公司 A kind of virtual machine migration method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486628A (en) * 2020-11-20 2021-03-12 湖南麒麟信安科技股份有限公司 Virtual machine migration method between virtual private clouds
CN114443296A (en) * 2022-01-21 2022-05-06 苏州浪潮智能科技有限公司 Method, device, equipment and readable medium for migrating high-availability events
CN114443296B (en) * 2022-01-21 2023-11-14 苏州浪潮智能科技有限公司 Method, device, equipment and readable medium for returning high-availability event
CN115328065A (en) * 2022-09-16 2022-11-11 中国核动力研究设计院 Method for automatically migrating control unit functions applied to industrial control system
CN115904621A (en) * 2022-10-12 2023-04-04 北京志凌海纳科技有限公司 Super-fusion system host maintenance method and device
CN115904621B (en) * 2022-10-12 2023-09-19 北京志凌海纳科技有限公司 Method and device for maintaining host of super fusion system

Similar Documents

Publication Publication Date Title
US11204793B2 (en) Determining an optimal computing environment for running an image
CN111176790A (en) Active maintenance method and device of cloud platform physical host and readable storage medium
US10474488B2 (en) Configuration of a cluster of hosts in virtualized computing environments
US8719480B2 (en) Automated network configuration in a dynamic virtual environment
US10853128B2 (en) Virtual machine management device and virtual machine management method
CN111143039A (en) Virtual machine scheduling method and device and computer storage medium
CN105871988A (en) Service deployment method and device
US9971589B2 (en) Upgrade management for a shared pool of configurable computing resources
CN111857966A (en) Virtual machine snapshot creating method and device and computer readable storage medium
CN111338756A (en) GPU pooling method, device, equipment and computer readable storage medium
CN113687779A (en) Data migration method and device, electronic equipment and readable storage medium
CN112433812A (en) Method, system, equipment and computer medium for virtual machine cross-cluster migration
CN113272785B (en) Method for mounting file system, terminal equipment and storage medium
US20150081968A1 (en) Decommissioning virtual appliances
CN108021408B (en) Upgrading method and device
CN108958889A (en) The management method and device of virtual machine in cloud data system
CN115237441A (en) Upgrade test method, device and medium based on cloud platform
CN115277398A (en) Cluster network configuration method and device
CN115145634A (en) System management software self-adaption method, device and medium
US10033803B1 (en) Data volume auto-repair based on volume degradation level
CN113849229A (en) Server starting method and device, electronic equipment and readable storage medium
CN109189556B (en) Affinity rule conflict monitoring method and device based on load balancing
US20160191320A1 (en) Relocating an embedded cloud for fast configuration of a cloud computing environment
CN111858234A (en) Task execution method, device, equipment and medium
CN112463228A (en) Storage pool hybrid deployment method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20200519

WW01 Invention patent application withdrawn after publication