CN107357638A - The control method and control device of a kind of power supply status - Google Patents

The control method and control device of a kind of power supply status Download PDF

Info

Publication number
CN107357638A
CN107357638A CN201710783873.8A CN201710783873A CN107357638A CN 107357638 A CN107357638 A CN 107357638A CN 201710783873 A CN201710783873 A CN 201710783873A CN 107357638 A CN107357638 A CN 107357638A
Authority
CN
China
Prior art keywords
controlled
virtual machine
power supply
supply status
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710783873.8A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710783873.8A priority Critical patent/CN107357638A/en
Publication of CN107357638A publication Critical patent/CN107357638A/en
Pending legal-status Critical Current

Links

Classifications

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

Abstract

The embodiment of the invention discloses a kind of control method of power supply status and control device, including:The information of virtual machine to be controlled is obtained from the first information record sheet pre-established;Wherein, the information of the first information record sheet record virtual machine in need for carrying out power supply status control;Obtain the target control instruction for the power supply status for controlling virtual machine to be controlled;The power supply status of virtual machine to be controlled is controlled according to the information of virtual machine to be controlled and target control instruction.From the embodiment of the present invention, by have recorded in first information record sheet it is in need carry out power supply status control virtual machine information, therefore can obtains the information of all virtual machines to be controlled and carries out the control of power supply status from first information record sheet, the situation that control by mistake is carried out to the power supply status of virtual machine to be controlled is controlled and occurred to the power supply status of virtual machine to be controlled so as to avoid the occurrence of to miss, and ensure that the control reliability of virtual machine power supply status to be controlled.

Description

The control method and control device of a kind of power supply status
Technical field
The present invention relates to the control method and control device in virtual technology field, more particularly to a kind of power supply status.
Background technology
Virtual machine refer to by software simulate have complete hardware system function, operate in a completely isolated environment In complete computer.
The control of virtual machine power supply status is an important part in Virtual Machine Manager, extensive with virtual machine Using the problem of occurring needing controlling the power supply status of more virtual machines.
In correlation technique, when carrying out power supply status control, it is necessary to which the power supply status to virtual machine one by one is carried out Control, and when needing the virtual machine number for carrying out power supply status control excessive, often just occur and miss to be controlled virtual The situation that the power supply status of machine is controlled, and there is the situation that control by mistake is carried out to the power supply status of virtual machine to be controlled.
The content of the invention
In order to solve the above-mentioned technical problem, the present invention provides a kind of control method and control device of power supply status, can Avoid the occurrence of the power supply status for missing and being controlled and occur to the power supply status of virtual machine to be controlled to virtual machine to be controlled The situation of control by mistake is carried out, ensure that the control reliability of virtual machine power supply status to be controlled.
In order to reach the object of the invention, the invention provides a kind of control method of power supply status, including:
The information of virtual machine to be controlled is obtained from the first information record sheet pre-established;Wherein, the first information The information of the record sheet record virtual machine in need for carrying out power supply status control;
Obtain the target control instruction for the power supply status for controlling the virtual machine to be controlled;Wherein, the target control refers to Order includes the target power state of the virtual machine to be controlled;
The power supply to the virtual machine to be controlled is instructed according to the information of the virtual machine to be controlled and the target control State is controlled.
Before the information that virtual machine to be controlled is obtained from the first information record sheet pre-established, in addition to:
Obtain institute it is in need progress power supply status control virtual machine information;Wherein, it is described to need to carry out power supply status The information of the virtual machine of control comprises at least the mark of virtual machine;
According to acquisition the information of the virtual machine in need for carrying out power supply status control establish first information record Table.
It is described that the power supply status of virtual machine to be controlled is carried out according to the information of virtual machine to be controlled and target control instruction Control, including:
Judge that the virtual machine to be controlled identifies whether to be present in the second information record table;Wherein, second letter Breath record sheet record has the information for the virtual machine for carrying out power supply status control, the void for carrying out power supply status control The information of plan machine comprises at least the mark and power supply status for the virtual machine for carrying out power supply status control;
, will be described to be controlled virtual if the mark of the virtual machine to be controlled is not present in the second information record table The mark and target power state of machine are added in the second information record table, and according to the target power state to described The power supply status of virtual machine to be controlled is controlled;
If the mark of the virtual machine to be controlled is present in the second information record table, according to the target power shape The power supply status that state and the virtual machine to be controlled are being controlled is controlled to the power supply status of the virtual machine to be controlled System.
It is described according to the power supply status that target power state and virtual machine to be controlled are being controlled to be controlled virtual The power supply status of machine is controlled, including:
The virtual machine to be controlled is obtained in the second information record table according to the mark of the virtual machine to be controlled The power supply status being controlled;
Judge the power supply status being controlled whether with target power state generation mutual exclusion;
If the power supply status being controlled does not produce mutual exclusion with the target power state, in the described second letter The power supply status that the virtual machine to be controlled is being controlled is revised as the target power state, and root in breath record sheet The power supply status of the virtual machine to be controlled is controlled according to the target power state;
If the ongoing power supply status produces mutual exclusion with the target power state, generation error information is added to In erropr message list, and continue the power supply status for controlling the virtual machine to be controlled being controlled;Wherein, the mistake letter Breath token record has the information that the power supply status that virtual machine is being controlled produces mutual exclusion with the target power state.
It is described the power supply status of virtual machine to be controlled is controlled according to target power state after, in addition to:
The information of the virtual machine to be controlled is deleted in the second information record table, and in the 3rd information record table Add the information of the virtual machine to be controlled;Wherein, the 3rd information record token record, which has, has completed power supply status control Virtual machine information, it is described completed power supply status control virtual machine information comprise at least has completed power supply status The mark and current power state of the virtual machine of control;
After the power supply status for continuing to control virtual machine to be controlled being controlled, in addition to:
The information of the virtual machine to be controlled is deleted in the second information record table, and in the 3rd information record table Add the information of the virtual machine to be controlled.
The invention provides a kind of control device of power supply status, including:
First acquisition module, for obtaining the information of virtual machine to be controlled from the first information record sheet pre-established; Wherein, the information of the first information record sheet record virtual machine in need for carrying out power supply status control;
Second acquisition module, for obtaining the target control instruction for the power supply status for controlling the virtual machine to be controlled;Its In, the target control instruction includes the target power state of the virtual machine to be controlled;
Processing module, for the information according to the virtual machine to be controlled and target control instruction to described to be controlled The power supply status of virtual machine is controlled.
Also include:
3rd acquisition module, for obtain institute it is in need progress power supply status control virtual machine information;Wherein, it is described The information for carrying out the virtual machine of power supply status control is needed to comprise at least the mark of virtual machine;
Establish module, for according to acquisition it is in need carry out power supply status control virtual machine information establish described in First information record sheet.
The processing module includes:
Judging unit, for judging that the virtual machine to be controlled identifies whether to be present in the second information record table;Its In, the second information record token record has the information for the virtual machine for carrying out power supply status control, described to carry out electricity The information of the virtual machine of source state control comprises at least the mark and power supply status for the virtual machine for carrying out power supply status control;
First processing units, if the mark for the virtual machine to be controlled is not present in the second information record table In, the mark of the virtual machine to be controlled and target power state are added in the second information record table, and according to institute Target power state is stated to be controlled the power supply status of the virtual machine to be controlled;
Second processing unit, if the mark for the virtual machine to be controlled is present in the second information record table, According to the power supply status that the target power state and the virtual machine to be controlled are being controlled to described to be controlled virtual The power supply status of machine is controlled.
The second processing unit is specifically used for:
The virtual machine to be controlled is obtained in the second information record table according to the mark of the virtual machine to be controlled The power supply status being controlled;
Judge the power supply status being controlled whether with target power state generation mutual exclusion;
If the power supply status being controlled does not produce mutual exclusion with the target power state, in the described second letter The power supply status that the virtual machine to be controlled is being controlled is revised as the target power state, and root in breath record sheet The power supply status of the virtual machine to be controlled is controlled according to the target power state;
If the ongoing power supply status produces mutual exclusion with the target power state, generation error information is added to In erropr message list, and continue the power supply status for controlling the virtual machine to be controlled being controlled;Wherein, the mistake letter Breath token record has the information that the power supply status that virtual machine is being controlled produces mutual exclusion with the target power state.
The second processing unit is specifically additionally operable to:
The information of the virtual machine to be controlled is deleted in the second information record table, and in the 3rd information record table Add the information of the virtual machine to be controlled;Wherein, the 3rd information record token record, which has, has completed power supply status control Virtual machine information, it is described completed power supply status control virtual machine information comprise at least has completed power supply status The mark and current power state of the virtual machine of control.
Compared with prior art, the present invention comprises at least and obtains void to be controlled from the first information record sheet pre-established The information of plan machine;Wherein, the information of the first information record sheet record virtual machine in need for carrying out power supply status control;Obtain The target control for the power supply status for controlling virtual machine to be controlled is taken to instruct;Wherein, target control instruction includes virtual machine to be controlled Target power state;The power supply status of virtual machine to be controlled is entered according to the information of virtual machine to be controlled and target control instruction Row control.From technical scheme provided by the invention, the carry out power supply in need by have recorded in first information record sheet The information of the virtual machine of state control, therefore can obtains the information of all virtual machines to be controlled from first information record sheet And the control of power supply status is carried out, the power supply status of virtual machine to be controlled is controlled and occurred so as to avoid the occurrence of to miss The situation of control by mistake is carried out to the power supply status of virtual machine to be controlled, ensure that the control of virtual machine power supply status to be controlled is reliable Property.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights Specifically noted structure is realized and obtained in claim and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used for providing further understanding technical solution of the present invention, and a part for constitution instruction, with this The embodiment of application is used to explain technical scheme together, does not form the limitation to technical solution of the present invention.
Fig. 1 is a kind of schematic flow sheet of the control method of power supply status provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the control method of another power supply status provided in an embodiment of the present invention;
Fig. 3 is the schematic flow sheet of the control method of another power supply status provided in an embodiment of the present invention;
Fig. 4 is a kind of structural representation of the control device of power supply status provided in an embodiment of the present invention;
Fig. 5 is the structural representation of the control device of another power supply status provided in an embodiment of the present invention;
Fig. 6 is the structural representation of the control device of another power supply status provided in an embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with accompanying drawing to the present invention Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application Feature can mutually be combined.
The embodiment of the present invention provides a kind of control method of power supply status, as shown in figure 1, this method includes:
Step 101, the information for obtaining from the first information record sheet pre-established virtual machine to be controlled.
Wherein, the information of the first information record sheet record virtual machine in need for carrying out power supply status control.
Specifically, it can be obtained successively from the first information record sheet pre-established by way of single thread recursive call The information of virtual machine to be controlled is taken, so as to farthest reduce the thread consumption of virtual management platform.If using The mode of single thread recursive call obtains the information of virtual machine to be controlled successively from the first information record sheet pre-established, often The information of secondary acquired virtual machine to be controlled can be the virtual machine that any one in first information record sheet is not acquired Information, it is preferred that by the information of the virtual machine in need for carrying out power supply status control be all to be recorded in the one by one In one information record table, thus by the way of the single thread recursive call can according to table in record order from front to back according to The secondary information for obtaining virtual machine.
Step 102, the target control instruction for obtaining the power supply status for controlling virtual machine to be controlled.
Wherein, target control instruction includes the target power state of virtual machine to be controlled.
It should be noted that target power state opening, closed mode and suspended state etc..
Specifically, target control instruction can be that user is inputted by interactive interface.
Step 103, according to the information of virtual machine to be controlled and target control instruction to the power supply status of virtual machine to be controlled It is controlled.
The control method for the power supply status that the embodiment of the present invention is provided, obtained from the first information record sheet pre-established Take the information of virtual machine to be controlled;Wherein, first information record sheet record is in need carries out the virtual of power supply status control The information of machine;Obtain the target control instruction for the power supply status for controlling virtual machine to be controlled;Wherein, target control instruction, which includes, treats Control the target power state of virtual machine;According to the information of virtual machine to be controlled and target control instruction to virtual machine to be controlled Power supply status is controlled.From technical scheme provided by the invention, due to have recorded all need in first information record sheet The information of the virtual machine of power supply status control is carried out, therefore can obtains all void to be controlled from first information record sheet The information of plan machine and the control for carrying out power supply status, the power supply status of virtual machine to be controlled is controlled so as to avoid the occurrence of to miss System and appearance carry out the situation of control by mistake to the power supply status of virtual machine to be controlled, ensure that virtual machine power supply status to be controlled Control reliability.
The embodiment of the present invention provides the control method of another power supply status, as shown in Fig. 2 this method includes:
Step 201, obtain institute it is in need progress power supply status control virtual machine information.
, wherein it is desired to the information for carrying out the virtual machine of power supply status control comprises at least the mark of virtual machine.
Specifically, the mark of virtual machine can be with unique mark virtual machine, it is necessary to carry out power supply in addition to the mark of virtual machine The information of the virtual machine of state control can also include the title of virtual machine and the power supply status of virtual machine, it is necessary to illustrate, Now the power supply status of virtual machine is state of the virtual machine before power supply status control is not carried out.
Step 202, according to acquisition the information of virtual machine in need for carrying out power supply status control establish the first information Record sheet.
Specifically, first information record sheet can be designated as vmList, the virtual machine of power supply status control is if desired carried out The power supply status of mark of the information including virtual machine, the title of virtual machine and virtual machine, the mark of virtual machine can be expressed as VmID, the title of virtual machine can be expressed as vmName, and the power supply status of virtual machine can be expressed as vmPowerState, then VmID, vmName and vmPowerState are just have recorded in vmList.
Step 203, the information for obtaining from the first information record sheet pre-established virtual machine to be controlled.
It should be noted that virtual machine to be controlled can be designated as vmInfoObj.
Step 204, the target control instruction for obtaining the power supply status for controlling virtual machine to be controlled.
Wherein, target control instruction includes the target power state of virtual machine to be controlled.
Step 205, judge that virtual machine to be controlled identifies whether to be present in the second information record table.
Wherein, the record of the second information record token has the information for the virtual machine for carrying out power supply status control, carries out The information of the virtual machine of power supply status control comprises at least the mark and power supply shape for the virtual machine for carrying out power supply status control State.
It should be noted that the second information record table is initially empty, ongoing power supply status control only be present Virtual machine when just in the second information record table add virtual machine information.
Specifically, the information for carrying out the virtual machine of power supply status control can also include the title and power supply of virtual machine The business progress of state control.
Specifically, power supply status control refers to the control of the ongoing power supply status of virtual machine.
If step 206, the mark of virtual machine to be controlled are not present in the second information record table, by virtual machine to be controlled Mark and target power state are added in the second information record table, and the electricity according to target power state to virtual machine to be controlled Source state is controlled.
Specifically, the second information record table can be designated as doTaskTable, if carrying out the virtual of power supply status control The mark of the information of machine including virtual machine, the power supply status control of virtual machine, virtual machine virtual machine title and virtual machine The business progress of power supply status control, the mark of virtual machine can be expressed as vmID, and the power supply status control of virtual machine can be with table VmTask is shown as, the title of virtual machine can be expressed as vmName, and the business progress of the power supply status control of virtual machine can be with table It is shown as vm taskProgress, then vmID, vmTask, vmName and vm are just have recorded in doTaskTable taskProgress。
Specifically, if the mark of virtual machine to be controlled is not present in the second information record table, illustrate virtual machine to be controlled Second is added in the absence of the power supply status being controlled, therefore by the mark of virtual machine to be controlled and target power state To represent that the power supply status of virtual machine to be controlled is carrying out in information record table, and according to target power state to void to be controlled The power supply status of plan machine is controlled.
Specifically, tune can be passed through by being controlled according to the power supply status of target power state control pair virtual machine to be controlled Application programming interface (the Application controlled with the virtual machine power supply status of virtualization underlying services Programming Interface, API), give power supply status control to underlying virtual and performed.
If step 207, the mark of virtual machine to be controlled are present in the second information record table, according to target power state and The power supply status that virtual machine to be controlled is being controlled is controlled to the power supply status of virtual machine to be controlled.
It should be noted that step 206 and 207 is the relation for selecting to perform, if the mark of virtual machine to be controlled is not present In the second information record table, step 206 is performed, if the mark of virtual machine to be controlled is present in the second information record table, is held Row step 207.
The control method for the power supply status that the embodiment of the present invention is provided, obtained from the first information record sheet pre-established Take the information of virtual machine to be controlled;Wherein, first information record sheet record is in need carries out the virtual of power supply status control The information of machine;Obtain the target control instruction for the power supply status for controlling virtual machine to be controlled;Wherein, target control instruction, which includes, treats Control the target power state of virtual machine;According to the information of virtual machine to be controlled and target control instruction to virtual machine to be controlled Power supply status is controlled.From technical scheme provided by the invention, due to have recorded all need in first information record sheet The information of the virtual machine of power supply status control is carried out, therefore can obtains all void to be controlled from first information record sheet The information of plan machine and the control for carrying out power supply status, the power supply status of virtual machine to be controlled is controlled so as to avoid the occurrence of to miss System and appearance carry out the situation of control by mistake to the power supply status of virtual machine to be controlled, ensure that virtual machine power supply status to be controlled Control reliability.
The embodiment of the present invention provides the control of another power supply status, as shown in figure 3, this method includes:
Step 301, obtain institute it is in need progress power supply status control virtual machine information.
, wherein it is desired to the information for carrying out the virtual machine of power supply status control comprises at least the mark of virtual machine.
Step 302, according to acquisition the information of virtual machine in need for carrying out power supply status control establish the first information Record sheet.
Step 303, the information for obtaining from the first information record sheet pre-established virtual machine to be controlled.
Step 304, the target control instruction for obtaining the power supply status for controlling virtual machine to be controlled.
Wherein, target control instruction includes the target power state of virtual machine to be controlled.
Step 305, judge that virtual machine to be controlled identifies whether to be present in the second information record table.
Wherein, the record of the second information record token has the information for the virtual machine for carrying out power supply status control, carries out The information of the virtual machine of power supply status control comprises at least the mark and power supply shape for the virtual machine for carrying out power supply status control State controls.
If step 306, the mark of virtual machine to be controlled are not present in the second information record table, by virtual machine to be controlled Mark and target power state are added in the second information record table, and the electricity according to target power state to virtual machine to be controlled Source state is controlled.
If step 307, the mark of virtual machine to be controlled are present in the second information record table, according to virtual machine to be controlled Mark obtains the ongoing power supply status of virtual machine to be controlled in the second information record table.
Whether step 308, the power supply status that is being controlled of judgement with target power state produce mutual exclusion.
Specifically, mutual exclusion is produced between both states refers to that both states are mutually exclusive, without compatibility, citing comes To say, if ongoing power supply status is start, and the control of target power state is shutdown, then both is mutually exclusive, It is thus determined that ongoing power supply status produces mutual exclusion with target power state;If ongoing power supply status is soft pass Machine, and target power state is forced shutdown, then both does not repel mutually, it is thus determined that ongoing power supply status is not Mutual exclusion is produced with target power state.
If step 309, the power supply status being controlled do not produce mutual exclusion with target power state, remember in the second information The power supply status control that virtual machine to be controlled is being controlled is revised as target power state in record table, and according to target electricity Source state is controlled to the power supply status of virtual machine to be controlled.
Specifically, if ongoing power supply status does not produce mutual exclusion with target power state, in the second information record The ongoing power supply status of virtual machine to be controlled is changed in table, the power supply status that virtual machine to be controlled is being controlled is repaiied Target power state is changed to, and the power supply status of virtual machine to be controlled is controlled according to target power state.
Step 310, the information for deleting in the second information record table virtual machine to be controlled, and in the 3rd information record table Add the information of virtual machine to be controlled.
Wherein, the record of the 3rd information record token has the information for the virtual machine for having completed power supply status control, has completed The information of the virtual machine of power supply status control comprises at least the mark for the virtual machine for having completed power supply status control and current electricity Source state.
It should be noted that the 3rd information record table can be designated as finishedTaskTable, the 3rd information record table is most It is just empty, ability adds virtual machine in the 3rd information record table when the virtual machine of completed power supply status control only be present Information.
It should also be noted that, current power state here refers to the shape of power supply after the completion of power supply status control progress State.
If step 311, ongoing power supply status and target power state produce mutual exclusion, generation error information is added to In erropr message list, and continue the power supply status for controlling virtual machine to be controlled being controlled.
Wherein, erropr message list record has the power supply status that virtual machine is being controlled to be produced with target power state mutual The information of reprimand.
It should be noted that erropr message list record is initially empty, ongoing power supply status and mesh are only occurred When marking power supply status generation mutual exclusion, information is just added in erropr message list, the error message added can be expressed as:It is " empty It is so-and-so that plan machine, which is expressed as the power supply status that so-and-so virtual machine is being controlled, but target power state is for so-and-so, two Person's mutual exclusion ".
Specifically, the power supply status for assuming be controlled is start, and target power state is shutdown, and both is mutual Reprimand, therefore generation error information record (is opened in erropr message list, and still according to the power supply status being controlled Machine) continue to control the power supply status of virtual machine.
Step 312, the information for deleting in the second information record table virtual machine to be controlled, and in the 3rd information record table Add the information of virtual machine to be controlled.
It should be noted that step 306 and step 307~312 are the relations that selection performs, if the mark of virtual machine to be controlled Knowledge is not present in the second information record table, step 306 is performed, if the mark of virtual machine to be controlled is present in the second information record In table, step 307~312 are performed;Step 309,310 and step 311,312 also select the relation performed, if to be controlled The mark of virtual machine is not present in the second information record table and ongoing power supply status does not produce with target power state Mutual exclusion, step 309,310 are performed, if the mark of virtual machine to be controlled is present in the second information record table and ongoing electricity Source state produces mutual exclusion with target power state, performs step 311,312.
The control method for the power supply status that the embodiment of the present invention is provided, obtained from the first information record sheet pre-established Take the information of virtual machine to be controlled;Wherein, first information record sheet record is in need carries out the virtual of power supply status control The information of machine;Obtain the target control instruction for the power supply status for controlling virtual machine to be controlled;Wherein, target control instruction, which includes, treats Control the target power state of virtual machine;According to the information of virtual machine to be controlled and target control instruction to virtual machine to be controlled Power supply status is controlled.From technical scheme provided by the invention, due to have recorded all need in first information record sheet The information of the virtual machine of power supply status control is carried out, therefore can obtains all void to be controlled from first information record sheet The information of plan machine and the control for carrying out power supply status, the power supply status of virtual machine to be controlled is controlled so as to avoid the occurrence of to miss System and appearance carry out the situation of control by mistake to the power supply status of virtual machine to be controlled, ensure that virtual machine power supply status to be controlled Control reliability.
The embodiment of the present invention provides a kind of control device of power supply status, as shown in figure 4, the control device 4 includes:
First acquisition module 41, for obtaining the letter of virtual machine to be controlled from the first information record sheet pre-established Breath;Wherein, the information of the first information record sheet record virtual machine in need for carrying out power supply status control.
Second acquisition module 42, for obtaining the target control instruction for the power supply status for controlling virtual machine to be controlled;Wherein, Target control instructs the target power state for including virtual machine to be controlled.
Processing module 43, the electricity to virtual machine to be controlled is instructed for the information according to virtual machine to be controlled and target control Source state is controlled.
Further, on the basis of embodiment corresponding to Fig. 4, the embodiment of the present invention provides the control of another power supply status Device, as shown in figure 5, the control device 4 also includes:
3rd acquisition module 44, for obtain institute it is in need progress power supply status control virtual machine information;Wherein, need The information for carrying out the virtual machine of power supply status control comprises at least the mark of virtual machine.
Establish module 45, for according to acquisition the information of the virtual machine in need for carrying out power supply status control establish the One information record table.
Further, on the basis of embodiment corresponding to Fig. 5, the embodiment of the present invention provides the control of another power supply status Device, as shown in fig. 6, processing module 43 includes:
Judging unit 431, for judging that virtual machine to be controlled identifies whether to be present in the second information record table;Its In, the token record of the second information record has the information for the virtual machine for carrying out power supply status control, carries out power supply status control The information of the virtual machine of system comprises at least the mark and power supply status for the virtual machine for carrying out power supply status control.
First processing units 432, if the mark for virtual machine to be controlled is not present in the second information record table, it will treat The mark and target power state for controlling virtual machine are added in the second information record table, and according to target power state to be controlled The power supply status of virtual machine processed is controlled.
Second processing unit 433, if the mark for virtual machine to be controlled is present in the second information record table, according to mesh Mark power supply status and the ongoing power supply status of virtual machine to be controlled are controlled to the power supply status of virtual machine to be controlled.
Further, second processing unit 433 is specifically used for:
Virtual machine to be controlled is obtained according to the mark of virtual machine to be controlled in the second information record table be controlled Power supply status control.
Judge whether the power supply status that is being controlled with target power state produces mutual exclusion.
, will in the second information record table if the power supply status being controlled does not produce mutual exclusion with target power state The power supply status that virtual machine to be controlled is being controlled is revised as target power state, and according to target power state to be controlled The power supply status of virtual machine processed is controlled.
If ongoing power supply status produces mutual exclusion with target power state, generation error information is added to error message In table, and continue the power supply status for controlling virtual machine to be controlled being controlled;Wherein, erropr message list record has virtual machine The power supply status being controlled produces the information of mutual exclusion with target power state.
Further, second processing unit 433 is specifically additionally operable to:
The information of virtual machine to be controlled is deleted in the second information record table, and is added in the 3rd information record table to be controlled The information of virtual machine processed;Wherein, the record of the 3rd information record token has the information for the virtual machine for having completed power supply status control, Through complete power supply status control virtual machine information comprise at least completed power supply status control virtual machine mark and Current power state.
The control device for the power supply status that the embodiment of the present invention is provided, obtained from the first information record sheet pre-established Take the information of virtual machine to be controlled;Wherein, first information record sheet record is in need carries out the virtual of power supply status control The information of machine;Obtain the target control instruction for the power supply status for controlling virtual machine to be controlled;Wherein, target control instruction, which includes, treats Control the target power state of virtual machine;According to the information of virtual machine to be controlled and target control instruction to virtual machine to be controlled Power supply status is controlled.From technical scheme provided by the invention, due to have recorded all need in first information record sheet The information of the virtual machine of power supply status control is carried out, therefore can obtains all void to be controlled from first information record sheet The information of plan machine and the control for carrying out power supply status, the power supply status of virtual machine to be controlled is controlled so as to avoid the occurrence of to miss System and appearance carry out the situation of control by mistake to the power supply status of virtual machine to be controlled, ensure that virtual machine power supply status to be controlled Control reliability.
In actual applications, first acquisition module 41, the second acquisition module 42, processing module 43, judging unit 431st, first processing units 432, second processing unit 433, the 3rd acquisition module 44, establish module 45 can be by positioned at power supply shape Central processing unit (Central Processing Unit, CPU), microprocessor (Micro in the control device of state Processor Unit, MPU), digital signal processor (Digital Signal Processor, DSP) or field-programmable Gate array (Field Programmable Gate Array, FPGA) etc. is realized.
Although disclosed herein embodiment as above, described content be only readily appreciate the present invention and use Embodiment, it is not limited to the present invention.Technical staff in any art of the present invention, taken off not departing from the present invention On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.

Claims (10)

  1. A kind of 1. control method of power supply status, it is characterised in that including:
    The information of virtual machine to be controlled is obtained from the first information record sheet pre-established;Wherein, the first information record The information of the token record virtual machine in need for carrying out power supply status control;
    Obtain the target control instruction for the power supply status for controlling the virtual machine to be controlled;Wherein, the target control instruction bag Target power state containing the virtual machine to be controlled;
    The power supply status to the virtual machine to be controlled is instructed according to the information of the virtual machine to be controlled and the target control It is controlled.
  2. 2. control method according to claim 1, it is characterised in that described from the first information record sheet pre-established Before the information for obtaining virtual machine to be controlled, in addition to:
    Obtain institute it is in need progress power supply status control virtual machine information;Wherein, it is described to need to carry out power supply status control Virtual machine information comprise at least virtual machine mark;
    According to acquisition the information of virtual machine in need for carrying out power supply status control establish the first information record sheet.
  3. 3. control method according to claim 2, it is characterised in that the information and target according to virtual machine to be controlled Control instruction is controlled to the power supply status of virtual machine to be controlled, including:
    Judge that the virtual machine to be controlled identifies whether to be present in the second information record table;Wherein, the second information note Record token record has the information for the virtual machine for carrying out power supply status control, the virtual machine for carrying out power supply status control Information comprise at least carry out power supply status control virtual machine mark and power supply status;
    If the mark of the virtual machine to be controlled is not present in the second information record table, by the virtual machine to be controlled Mark and target power state are added in the second information record table, and according to the target power state to described to be controlled The power supply status of virtual machine processed is controlled;
    If the mark of the virtual machine to be controlled is present in the second information record table, according to the target power state and The power supply status that the virtual machine to be controlled is being controlled is controlled to the power supply status of the virtual machine to be controlled.
  4. 4. control method according to claim 3, it is characterised in that described according to target power state and to be controlled virtual The power supply status that machine is being controlled is controlled to the power supply status of virtual machine to be controlled, including:
    The virtual machine to be controlled is being obtained in the second information record table according to the mark of the virtual machine to be controlled The power supply status being controlled;
    Judge the power supply status being controlled whether with target power state generation mutual exclusion;
    If the power supply status being controlled does not produce mutual exclusion with the target power state, remember in second information The power supply status that the virtual machine to be controlled is being controlled is revised as the target power state in record table, and according to institute Target power state is stated to be controlled the power supply status of the virtual machine to be controlled;
    If the ongoing power supply status produces mutual exclusion with the target power state, generation error information is added to mistake In information table, and continue the power supply status for controlling the virtual machine to be controlled being controlled;Wherein, the erropr message list Record has the information that the power supply status that virtual machine is being controlled produces mutual exclusion with the target power state.
  5. 5. control method according to claim 4, the power supply shape according to target power state to virtual machine to be controlled After state is controlled, in addition to:
    The information of the virtual machine to be controlled is deleted in the second information record table, and is added in the 3rd information record table The information of the virtual machine to be controlled;Wherein, the 3rd information record token record has the void for having completed power supply status control The information of plan machine, the information of the virtual machine for having completed power supply status control, which comprises at least, has completed power supply status control Virtual machine mark and current power state;
    After the power supply status for continuing to control virtual machine to be controlled being controlled, in addition to:
    The information of the virtual machine to be controlled is deleted in the second information record table, and is added in the 3rd information record table The information of the virtual machine to be controlled.
  6. A kind of 6. control device of power supply status, it is characterised in that including:
    First acquisition module, for obtaining the information of virtual machine to be controlled from the first information record sheet pre-established;Wherein, The information of the first information record sheet record virtual machine in need for carrying out power supply status control;
    Second acquisition module, for obtaining the target control instruction for the power supply status for controlling the virtual machine to be controlled;Wherein, institute State the target power state that target control instruction includes the virtual machine to be controlled;
    Processing module, for the information according to the virtual machine to be controlled and target control instruction to described to be controlled virtual The power supply status of machine is controlled.
  7. 7. control device according to claim 6, it is characterised in that also include:
    3rd acquisition module, for obtain institute it is in need progress power supply status control virtual machine information;Wherein, the needs The information for carrying out the virtual machine of power supply status control comprises at least the mark of virtual machine;
    Establish module, for according to acquisition the information of virtual machine in need for carrying out power supply status control establish described first Information record table.
  8. 8. control device according to claim 7, it is characterised in that the processing module includes:
    Judging unit, for judging that the virtual machine to be controlled identifies whether to be present in the second information record table;Wherein, institute Stating the token record of the second information record has the information for the virtual machine for carrying out power supply status control, described to carry out power supply status The information of the virtual machine of control comprises at least the mark and power supply status for the virtual machine for carrying out power supply status control;
    First processing units, will if the mark for the virtual machine to be controlled is not present in the second information record table The mark and target power state of the virtual machine to be controlled are added in the second information record table, and according to the target Power supply status is controlled to the power supply status of the virtual machine to be controlled;
    Second processing unit, if the mark for the virtual machine to be controlled is present in the second information record table, according to The power supply status that the target power state and the virtual machine to be controlled are being controlled is to the virtual machine to be controlled Power supply status is controlled.
  9. 9. control device according to claim 8, it is characterised in that the second processing unit is specifically used for:
    The virtual machine to be controlled is being obtained in the second information record table according to the mark of the virtual machine to be controlled The power supply status being controlled;
    Judge the power supply status being controlled whether with target power state generation mutual exclusion;
    If the power supply status being controlled does not produce mutual exclusion with the target power state, remember in second information The power supply status that the virtual machine to be controlled is being controlled is revised as the target power state in record table, and according to institute Target power state is stated to be controlled the power supply status of the virtual machine to be controlled;
    If the ongoing power supply status produces mutual exclusion with the target power state, generation error information is added to mistake In information table, and continue the power supply status for controlling the virtual machine to be controlled being controlled;Wherein, the erropr message list Record has the information that the power supply status that virtual machine is being controlled produces mutual exclusion with the target power state.
  10. 10. control device according to claim 9, it is characterised in that the second processing unit is specifically additionally operable to:
    The information of the virtual machine to be controlled is deleted in the second information record table, and is added in the 3rd information record table The information of the virtual machine to be controlled;Wherein, the 3rd information record token record has the void for having completed power supply status control The information of plan machine, the information of the virtual machine for having completed power supply status control, which comprises at least, has completed power supply status control Virtual machine mark and current power state.
CN201710783873.8A 2017-09-01 2017-09-01 The control method and control device of a kind of power supply status Pending CN107357638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710783873.8A CN107357638A (en) 2017-09-01 2017-09-01 The control method and control device of a kind of power supply status

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710783873.8A CN107357638A (en) 2017-09-01 2017-09-01 The control method and control device of a kind of power supply status

Publications (1)

Publication Number Publication Date
CN107357638A true CN107357638A (en) 2017-11-17

Family

ID=60290634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710783873.8A Pending CN107357638A (en) 2017-09-01 2017-09-01 The control method and control device of a kind of power supply status

Country Status (1)

Country Link
CN (1) CN107357638A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650666A (en) * 2009-08-31 2010-02-17 曙光信息产业(北京)有限公司 Computer management system and method
CN104519104A (en) * 2013-09-30 2015-04-15 华为数字技术(苏州)有限公司 Power source control method and equipment
CN105760209A (en) * 2014-12-16 2016-07-13 华为技术有限公司 Method and device for removing virtual machines and automatic elastic cluster
CN106155762A (en) * 2015-04-14 2016-11-23 中兴通讯股份有限公司 A kind of method, device and virtual management center managing virtual machine state
US20170102959A1 (en) * 2014-06-30 2017-04-13 Hewlett-Packard Development Company, Lp. Virtual machine device access

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650666A (en) * 2009-08-31 2010-02-17 曙光信息产业(北京)有限公司 Computer management system and method
CN104519104A (en) * 2013-09-30 2015-04-15 华为数字技术(苏州)有限公司 Power source control method and equipment
US20170102959A1 (en) * 2014-06-30 2017-04-13 Hewlett-Packard Development Company, Lp. Virtual machine device access
CN105760209A (en) * 2014-12-16 2016-07-13 华为技术有限公司 Method and device for removing virtual machines and automatic elastic cluster
CN106155762A (en) * 2015-04-14 2016-11-23 中兴通讯股份有限公司 A kind of method, device and virtual management center managing virtual machine state

Similar Documents

Publication Publication Date Title
CN104424338B (en) The automatically generating device and automatic generation method of web system
CN103744671B (en) The method and electronic equipment of a kind of information processing
CN105580024B (en) A kind of screenshotss method and device
KR20150052189A (en) Dialysis apparatus with versatile user interface and method and computer program therefor
CN107360536A (en) Control method, terminal device and the computer-readable recording medium of terminal device
CN109639465A (en) Warning information storage method and device based on cloud platform
US20190018444A1 (en) Wearable apparatus and method for controlling vr apparatus
CN108351764A (en) The graphical representation of data in program code editing machine
CN105094506B (en) Method, intelligent terminal and the operating platform of the solution lock screen of intelligent terminal
CN108646958A (en) A kind of application program launching method and terminal
CN107485462A (en) A kind of tooth detection and methods of exhibiting for the treatment of results, equipment and storage medium
CN109308241A (en) Monitor application program launching flow and method, device, terminal device and storage medium
CN106843779A (en) A kind of screen control method and terminal
CN103389870B (en) A kind of unlocking method and device of touch screen
CN102637127A (en) Method for controlling mouse modules and electronic device
CN107920162A (en) Control method, mobile terminal and the computer-readable recording medium of alarm clock
CN109725958A (en) The method and device that the file of resource manager management is handled
CN105094331B (en) A kind of information processing method and electronic equipment
CN107066860B (en) A kind of fingerprint identification method and mobile terminal
CN110480633A (en) A kind of method, apparatus and storage medium controlling equipment
CN104978118B (en) A kind of graphical interface of user display methods, device and terminal device
CN107357638A (en) The control method and control device of a kind of power supply status
CN109407929A (en) A kind of method for sorting and terminal of desktop icons
CN103927078B (en) A kind of information processing method and electronic equipment
CN104424173B (en) Typesetting quick interface arrangement 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171117