Nothing Special   »   [go: up one dir, main page]

CN112306643B - Virtual machine configuration method, device and equipment, and cloud platform - Google Patents

Virtual machine configuration method, device and equipment, and cloud platform Download PDF

Info

Publication number
CN112306643B
CN112306643B CN202011373268.1A CN202011373268A CN112306643B CN 112306643 B CN112306643 B CN 112306643B CN 202011373268 A CN202011373268 A CN 202011373268A CN 112306643 B CN112306643 B CN 112306643B
Authority
CN
China
Prior art keywords
virtual machine
disk
configuration
loading
registry file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011373268.1A
Other languages
Chinese (zh)
Other versions
CN112306643A (en
Inventor
傅开庭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202011373268.1A priority Critical patent/CN112306643B/en
Publication of CN112306643A publication Critical patent/CN112306643A/en
Application granted granted Critical
Publication of CN112306643B publication Critical patent/CN112306643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 a virtual machine configuration method, device and equipment, and a cloud platform. The method disclosed by the application comprises the following steps: receiving a request for configuring a first virtual machine, wherein the request comprises a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode; if the first virtual machine is in a shutdown state, loading a disk of the first virtual machine by using the second virtual machine so as to read a registry file in the disk; the corresponding configuration of standby mode and/or sleep mode in the registry file is modified to a disabled state and a notification message of the completion of the modification is returned. According to the method and the device, the other virtual machine is utilized to directly modify the corresponding configuration to the forbidden state in the registry of the virtual machine to be configured, so that the virtual machine cannot enter a standby mode or a dormant mode in the operation process, and service operation interruption in the virtual machine can be avoided. The virtual machine configuration device, the virtual machine configuration equipment and the cloud platform have the technical effects.

Description

Virtual machine configuration method, device and equipment, and cloud platform
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for configuring a virtual machine, and a cloud platform.
Background
Cloud platforms typically include numerous virtual machines that can provide computing, storage, etc. services to numerous users. These virtual machines may accidentally enter a standby mode or a sleep mode during operation, and a virtual opportunity to enter a standby mode or a sleep mode causes an interruption in service operation in the virtual machines. To avoid this, a technician typically sets a wake-up condition for the virtual machine prior to deploying the virtual machine, which may cause the virtual machine to wake up immediately after entering a standby mode or a sleep mode, thereby avoiding a service interruption therein.
However, the wake-up condition needs to be set manually on the virtual machine power management page, and the related setting in the virtual machine power management page has a certain limitation. Taking VMware as an example, to prevent a virtual machine from accidentally entering a standby mode or a sleep mode, wake-up conditions may be set using a LAN network card and corresponding VMware Tools. This wake condition can only resume a virtual machine in the S1 sleep state (one sleep state) and cannot resume virtual machines in other states (e.g., suspended, dormant, etc.). In addition, the LAN card must be used in combination with VMware Tools, that is, VMware Tools must be installed in the virtual machine, otherwise, the virtual machine cannot be awakened using the LAN card. Therefore, the current mode of waking up the virtual machine needs to be set manually in advance, and has certain limitation.
Therefore, how to simplify the condition setting for waking up the virtual machine and avoid the service running interruption in the virtual machine is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus and a device for configuring a virtual machine, and a cloud platform, so as to simplify a condition setting for waking up the virtual machine and avoid a service operation interruption in the virtual machine. The specific scheme is as follows:
in a first aspect, the present application provides a virtual machine configuration method, including:
receiving a request for configuring a first virtual machine, wherein the request comprises a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode;
if the first virtual machine is in a shutdown state, loading a disk of the first virtual machine by using a second virtual machine so as to read a registry file in the disk;
and modifying the corresponding configuration of the standby mode and/or the dormant mode in the registry file to be in a forbidden state, and returning a notification message of modification completion.
Preferably, before the loading the disk of the first virtual machine with the second virtual machine, the method further includes:
creating the second virtual machine, and installing a WINPE operating system to the second virtual machine;
and extracting the identification information of the disk from the request, and inquiring the disk according to the identification information.
Preferably, the loading the disk of the first virtual machine with the second virtual machine to read the registry file in the disk includes:
and loading the disk by using the second virtual machine, acquiring guide information in the disk, and reading the registry file according to the guide information.
Preferably, before returning the notification message of modification completion, the method further includes:
and closing the second virtual machine.
Preferably, the method further comprises:
if the first virtual machine is in a starting state, loading the disk by using a vmtools in the first virtual machine so as to read the registry file;
and modifying the corresponding configuration of the standby mode and/or the dormant mode in the registry file to be in a forbidden state, and returning a notification message of modification completion.
In a second aspect, the present application provides a virtual machine configuration apparatus, including:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a request for configuring a first virtual machine, and the request comprises a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode;
the loading module is used for loading a disk of the first virtual machine by using a second virtual machine if the first virtual machine is in a shutdown state so as to read a registry file in the disk;
and the configuration module is used for modifying the corresponding configuration of the standby mode and/or the dormant mode in the registry file into a forbidden state and returning a notification message of completion of modification.
In a third aspect, the present application provides a virtual machine configuration apparatus, including:
a memory for storing a computer program;
a processor for executing the computer program to implement the virtual machine configuration method of any one of the above.
In a fourth aspect, the present application provides a cloud platform, including: the device, the first virtual machine and the second virtual machine as described above.
Preferably, the second virtual machine is installed with a WINPE operating system.
Preferably, the cloud platform is a super fusion infrastructure.
According to the scheme, the application provides a virtual machine configuration method, which comprises the following steps: receiving a request for configuring a first virtual machine, wherein the request comprises a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode; if the first virtual machine is in a shutdown state, loading a disk of the first virtual machine by using a second virtual machine so as to read a registry file in the disk; and modifying the corresponding configuration of the standby mode and/or the dormant mode in the registry file to be in a forbidden state, and returning a notification message of modification completion.
As can be seen, after receiving a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode, if the first virtual machine is in a shutdown state, the present application loads a disk of the first virtual machine by using the second virtual machine, so as to read a registry file in the disk, then modifies a corresponding configuration of the standby mode and/or the sleep mode in the registry file into the prohibition state, and returns a notification message for completing the modification. Therefore, the first virtual machine can not enter a standby mode or a dormant mode in the running process, and therefore service running interruption in the virtual machine can be avoided. Therefore, the virtual machine can not enter the standby mode or the sleep mode in the running process, so that the service running interruption in the virtual machine can be avoided. The method does not need to pay attention to the power management problem of the virtual machine or install a corresponding virtualization tool in the virtual machine, so that the method is good in universality, the workload of technicians is reduced, and the configuration of the virtual machine is more flexible and convenient.
Correspondingly, the virtual machine configuration device and the virtual machine configuration equipment, and the cloud platform have the same technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flowchart of a first virtual machine configuration method disclosed in the present application;
FIG. 2 is a flowchart of a second method for configuring a virtual machine disclosed in the present application;
FIG. 3 is a flowchart of a third method for configuring a virtual machine disclosed in the present application;
FIG. 4 is a schematic diagram of a virtual machine configuration apparatus disclosed in the present application;
FIG. 5 is a schematic diagram of a virtual machine configuration apparatus disclosed in the present application;
fig. 6 is a schematic diagram of another virtual machine configuration apparatus disclosed in the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
At present, in order to avoid service operation interruption in the virtual machine, a wake-up condition is set for the virtual machine before the virtual machine is deployed, but the wake-up condition needs to be set manually in advance and has a certain limitation. Therefore, the virtual machine configuration scheme can simplify the condition setting for waking up the virtual machine and avoid the service operation interruption in the virtual machine.
Referring to fig. 1, an embodiment of the present application discloses a first virtual machine configuration method, including:
s101, receiving a request for configuring the first virtual machine, wherein the request comprises a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode.
In this embodiment, the request for configuring the first virtual machine is triggered by the user based on the user client of the host, and after the user triggers the request, the request is received by the host, and then the host executes the steps of S101 to S103. Wherein the request includes: the method comprises the steps of identifying information of a first virtual machine, a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode, identifying information of a disk of the first virtual machine and the like.
S102, if the first virtual machine is in a shutdown state, loading a disk of the first virtual machine by using the second virtual machine so as to read a registry file in the disk.
In one embodiment, loading a disk of a first virtual machine with a second virtual machine to read a registry file in the disk includes: and loading the disk by using the second virtual machine, acquiring guide information in the disk, and reading the registry file according to the guide information.
Specifically, in the process of loading the disk of the first virtual machine by the second virtual machine, the guiding information under the system disk in the disk is read first, and then the registry file is queried and read according to the guiding information. The state of the corresponding configuration of the standby mode and/or the sleep mode is recorded at the fixed position of the registry file, and the state is directly modified into the forbidden state, so that the first virtual machine does not enter the standby mode or the sleep mode after being started and operated. The configuration state is generally an on state or an off state, and the two states can be represented by different characters, for example: 0 represents the prohibition state and 1 represents the on state.
S103, the corresponding configuration of the standby mode and/or the sleep mode in the registry file is modified to be in a forbidden state, and a notification message of completion of modification is returned.
It should be noted that the second virtual machine may be any virtual machine running a service in the cloud platform, or may be a newly created dedicated virtual machine dedicated to configuring the first virtual machine. If the second virtual machine is a virtual machine running a service in any one of the cloud platforms, the implementation effect of loading the disk of the first virtual machine by using the second virtual machine may be poor because the second virtual machine also needs to run other services. If the second virtual machine is a special virtual machine special for configuring the first virtual machine, the second virtual machine is lighter because other services do not need to be run in the second virtual machine, and therefore the implementation effect of loading the disk of the first virtual machine by using the second virtual machine is better.
In a specific implementation manner, in order to make the implementation effect of this embodiment better, before loading the disk of the first virtual machine with the second virtual machine, the method further includes: creating a second virtual machine, and installing a WINPE operating system to the second virtual machine; and extracting the identification information of the disk from the request, and inquiring the disk according to the identification information so as to inquire the disk of the first virtual machine for loading. The WINPE operating system is a cut and simplified operating system, and can be started quickly. Of course, the operating systems installed on the first virtual machine and the second virtual machine may be of other types.
It should be noted that, in the process of loading the disk of the first virtual machine by using the second virtual machine, the first virtual machine cannot be started normally (because the disk of the first virtual machine is being locked for use), so after the corresponding configuration of the standby mode and/or the sleep mode in the registry file of the first virtual machine is modified to be in the disabled state, in order to enable the first virtual machine to start normally, before returning the notification message of completion of modification, the method further includes: and closing the second virtual machine, so that the user controls the first virtual machine to start after seeing the notification message.
Therefore, the virtual machine can not enter the standby mode or the sleep mode in the running process, so that the service running interruption in the virtual machine can be avoided. The method does not need to pay attention to the power management problem of the virtual machine or install a corresponding virtualization tool in the virtual machine, so that the method is good in universality, the workload of technicians is reduced, and the configuration of the virtual machine is more flexible and convenient.
Referring to fig. 2, the embodiment of the application discloses a second virtual machine configuration method, which includes:
s201, receiving a request for configuring the first virtual machine, wherein the request comprises a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode;
s202, judging whether the first virtual machine is in a starting state or a closing state;
s203, if the first virtual machine is in a shutdown state, loading a disk of the first virtual machine by using the second virtual machine so as to read a registry file in the disk; modifying the corresponding configuration of the standby mode and/or the sleep mode in the registry file to a forbidden state, and returning a notification message of modification completion;
s204, if the first virtual machine is in a starting state, loading a disk by using a vmtools in the first virtual machine to read a registry file; the corresponding configuration of standby mode and/or sleep mode in the registry file is modified to a disabled state and a notification message of the completion of the modification is returned.
The embodiment is applied to a host machine, and when the host machine receives a request for configuring a first virtual machine, the host machine judges whether the first virtual machine is in a starting-up state or a shutdown state at present; if the first virtual machine is in a shutdown state, loading a disk of the first virtual machine by using the second virtual machine so as to read a registry file in the disk; modifying the corresponding configuration of the standby mode and/or the sleep mode in the registry file to a forbidden state, and returning a notification message of modification completion; if the first virtual machine is in a starting state, directly loading a disk by using a vmtools in the first virtual machine so as to read a registry file; the corresponding configuration of standby mode and/or sleep mode in the registry file is modified to a disabled state and a notification message of the completion of the modification is returned.
The vmtools are auxiliary Tools for providing virtualization implementation, and function similarly to VMware Tools, and a technician can implement specific functions and logic therein so as to adapt the vmtools to actual application processes.
As can be seen, in the embodiment of the present application, different modes may be selected to configure the first virtual machine according to the state of the first virtual machine, so that the corresponding configuration of the standby mode and/or the sleep mode of the first virtual machine may be modified to be a disabled state, so that the first virtual machine may not enter the standby mode or the sleep mode during the operation process, and thus, interruption of service operation in the first virtual machine may be avoided. The method does not need to pay attention to the power management problem of the first virtual machine, so that the method is good in universality, the workload of technicians is reduced, and the configuration of the virtual machine is more flexible and convenient.
Referring to fig. 3, the embodiment of the application discloses a third virtual machine configuration method, which includes:
A. the user triggers a configuration request for prohibiting the virtual machine VM1 from entering standby and dormancy;
B. host (host) judges the current state of the virtual machine VM1;
C. if the current state of the virtual machine VM1 is shutdown, host takes the VM1 disk as an auxiliary disk to pull up the temporary virtual machine VM2 (with the winpe system installed); the virtual machine VM2 loads a registry file in a VM1 disk and modifies corresponding configuration items which prohibit the system from entering standby and sleep modes; the virtual machine VM2 is powered off, and notifies the host that the registry is modified successfully and the host is powered off; host pulls up virtual machine VM1 and displays VM1 boot interface, and the user operates virtual machine VM1 to boot. In the process of starting the virtual machine VM1 to enter a system, the system is forbidden to enter a standby mode and a dormant mode according to the configuration of a registry, and then a user inputs a password to log in the system so as to normally use the virtual machine VM1;
D. if the current state of the virtual machine VM1 is on, the host injects a configuration command into the virtual machine VM1 through the virtual tunnel, so that the virtual machine VM1 modifies corresponding configuration items for prohibiting the system from entering the standby and sleep modes by using the vmtools, and notifies the host that the registry modification is successful. At this time, the virtual machine VM1 does not enter the standby or sleep mode during the subsequent operation.
Therefore, the embodiment is automatically realized by the program, the corresponding condition is not required to be set for the virtual machine in advance manually, the state of the virtual machine is not required to be considered, the management problem of the hardware power supply of the real physical machine is not required to be considered, and the situation that the service is interrupted by the virtual machine can be prevented.
The following describes a virtual machine configuration apparatus provided in the embodiments of the present application, and the following description of the virtual machine configuration apparatus and the above description of the virtual machine configuration method may refer to each other.
Referring to fig. 4, an embodiment of the present application discloses a virtual machine configuration apparatus, including:
a receiving module 401, configured to receive a request for configuring the first virtual machine, where the request includes a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode;
the loading module 402 is configured to load a disk of the first virtual machine with the second virtual machine if the first virtual machine is in a shutdown state, so as to read a registry file in the disk;
a configuration module 403, configured to modify the corresponding configuration of the standby mode and/or the sleep mode in the registry file to a disabled state, and return a notification message of completion of modification.
In one specific embodiment, the method further comprises:
the creating module is used for creating a second virtual machine and installing a WINPE operating system to the second virtual machine;
and the extraction module is used for extracting the identification information of the disk from the request and inquiring the disk according to the identification information.
In one embodiment, the loading module is specifically configured to:
and loading the disk by using the second virtual machine, acquiring guide information in the disk, and reading the registry file according to the guide information.
In one specific embodiment, the method further comprises:
and the shutdown module is used for closing the second virtual machine.
In one specific embodiment, the method further comprises:
the other loading module is used for loading a disk by using a vmtools in the first virtual machine to read the registry file if the first virtual machine is in a starting state;
and the other configuration module is used for modifying the corresponding configuration of the standby mode and/or the dormant mode in the registry file into a forbidden state and returning a notification message of completion of modification.
The more specific working process of each module and unit in this embodiment may refer to the corresponding content disclosed in the foregoing embodiment, and will not be described herein.
It can be seen that this embodiment provides a virtual machine configuration apparatus, which can avoid service operation interruption in a virtual machine. The method does not need to pay attention to the power management problem of the virtual machine or install a corresponding virtualization tool in the virtual machine, so that the method is good in universality, the workload of technicians is reduced, and the configuration of the virtual machine is more flexible and convenient.
The following describes a virtual machine configuration device (i.e., host) provided in the embodiments of the present application, and the virtual machine configuration device described below and the virtual machine configuration method and apparatus described above may refer to each other.
Referring to fig. 5, an embodiment of the present application discloses a virtual machine configuration apparatus, including:
a memory 501 for storing a computer program;
a processor 502 for executing the computer program to implement the method disclosed in any of the embodiments above.
Referring to fig. 6, fig. 6 is a schematic diagram of another virtual machine configuration apparatus provided in this embodiment, where the virtual machine configuration apparatus may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 322 (e.g., one or more processors) and a memory 332, one or more storage media 330 (e.g., one or more mass storage devices) storing application programs 342 or data 344. Wherein the memory 332 and the storage medium 330 may be transitory or persistent. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations in the data processing apparatus. Still further, the central processor 322 may be configured to communicate with the storage medium 330, executing a series of instruction operations in the storage medium 330 on the virtual machine configuration apparatus 301.
Virtual machine configuration apparatus 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input/output interfaces 358, and/or one or more operating systems 341. For example, windows ServerTM, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
In fig. 6, an application 342 may be a program that performs a virtual machine configuration method, and data 344 may be data required or generated to perform the virtual machine configuration method.
The steps in the virtual machine configuration method described above may be implemented by the structure of the virtual machine configuration apparatus.
The following describes a cloud platform provided by the embodiments of the present application, and the cloud platform described below and the virtual machine configuration method, apparatus and device described above may refer to each other.
The embodiment of the application discloses cloud platform, include: the virtual machine configuration apparatus (i.e., host machine), the first virtual machine, and the second virtual machine as disclosed in the above embodiments.
The second virtual machine is provided with a WINPE operating system.
The cloud platform is a super fusion infrastructure, and may be an aCloud platform. Wherein, super fusion infrastructure (Hyper-Converged Infrastructure, or simply "HCI"): the method is characterized in that resources and technologies such as calculation, network, storage, server virtualization and the like are not only provided in the same set of unit equipment, but also elements such as backup software, snapshot technology, repeated data deletion, online data compression and the like are also included, and a plurality of sets of unit equipment can be aggregated through the network to realize modularized seamless lateral expansion (scale-out) so as to form a uniform resource pool.
As can be seen, the cloud platform disclosed in the embodiments of the present application may select different modes to configure the first virtual machine according to the state of the first virtual machine, so that the standby mode and/or the corresponding configuration of the sleep mode of the first virtual machine may be modified to be a disabled state, so that the first virtual machine may not enter the standby mode or the sleep mode during operation, and thus, interruption of service operation in the first virtual machine may be avoided. The method does not need to pay attention to the power management problem of the first virtual machine, so that the method is good in universality, the workload of technicians is reduced, and the configuration of the virtual machine is more flexible and convenient.
Reference to "first," "second," "third," "fourth," etc. (if present) herein is used to distinguish similar objects from each other and does not necessarily describe a particular order or sequence. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, or apparatus.
It should be noted that the description herein of "first," "second," etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implying an indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be regarded as not exist and not within the protection scope of the present application.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of readable storage medium known in the art.
The principles and embodiments of the present application are described herein with specific examples, the above examples being provided only to assist in understanding the methods of the present application and their core ideas; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (9)

1. A virtual machine configuration method, comprising:
receiving a request for configuring a first virtual machine, wherein the request comprises a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode;
if the first virtual machine is in a shutdown state, loading a disk of the first virtual machine by using a second virtual machine so as to read a registry file in the disk;
modifying the corresponding configuration of the standby mode and/or the dormant mode in the registry file to be in a forbidden state, and returning a notification message of modification completion;
the loading the disk of the first virtual machine by using the second virtual machine to read the registry file in the disk includes:
and loading the disk by using the second virtual machine, acquiring guide information in the disk, and reading the registry file according to the guide information.
2. The method of claim 1, wherein prior to loading the disk of the first virtual machine with the second virtual machine, further comprising:
creating the second virtual machine, and installing a WINPE operating system to the second virtual machine;
and extracting the identification information of the disk from the request, and inquiring the disk according to the identification information.
3. The virtual machine configuration method of claim 1, wherein before returning the notification message of modification completion, further comprising:
and closing the second virtual machine.
4. A virtual machine configuration method according to any one of claims 1 to 3, further comprising:
if the first virtual machine is in a starting state, loading the disk by using a vmtools in the first virtual machine so as to read the registry file;
and modifying the corresponding configuration of the standby mode and/or the dormant mode in the registry file to be in a forbidden state, and returning a notification message of modification completion.
5. A virtual machine configuration apparatus, comprising:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a request for configuring a first virtual machine, and the request comprises a configuration command for prohibiting the first virtual machine from entering a standby mode and/or a sleep mode;
the loading module is used for loading a disk of the first virtual machine by using a second virtual machine if the first virtual machine is in a shutdown state so as to read a registry file in the disk;
the configuration module is used for modifying the corresponding configuration of the standby mode and/or the sleep mode in the registry file into a forbidden state and returning a notification message of completion of modification;
the loading module is specifically configured to:
and loading the disk by using the second virtual machine, acquiring guide information in the disk, and reading the registry file according to the guide information.
6. A virtual machine configuration apparatus, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the virtual machine configuration method of any one of claims 1 to 4.
7. A cloud platform, comprising: the device, first virtual machine, and second virtual machine of claim 6.
8. The cloud platform of claim 7, wherein said second virtual machine is installed with a wispe operating system.
9. The cloud platform of claim 7, wherein said cloud platform is a super-fusion infrastructure.
CN202011373268.1A 2020-11-30 2020-11-30 Virtual machine configuration method, device and equipment, and cloud platform Active CN112306643B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011373268.1A CN112306643B (en) 2020-11-30 2020-11-30 Virtual machine configuration method, device and equipment, and cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011373268.1A CN112306643B (en) 2020-11-30 2020-11-30 Virtual machine configuration method, device and equipment, and cloud platform

Publications (2)

Publication Number Publication Date
CN112306643A CN112306643A (en) 2021-02-02
CN112306643B true CN112306643B (en) 2023-12-29

Family

ID=74487376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011373268.1A Active CN112306643B (en) 2020-11-30 2020-11-30 Virtual machine configuration method, device and equipment, and cloud platform

Country Status (1)

Country Link
CN (1) CN112306643B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810020A (en) * 2014-02-14 2014-05-21 华为技术有限公司 Virtual machine elastic scaling method and device
WO2017114017A1 (en) * 2015-12-30 2017-07-06 华为技术有限公司 Computer device, system and method for implementing load balancing
CN107810488A (en) * 2017-08-11 2018-03-16 深圳前海达闼云端智能科技有限公司 A kind of method of state management of virtual machine, device and intelligent terminal
US9940159B1 (en) * 2016-06-09 2018-04-10 Parallels IP Holdings GmbH Facilitating hibernation mode transitions for virtual machines

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8862917B2 (en) * 2011-09-19 2014-10-14 Qualcomm Incorporated Dynamic sleep for multicore computing devices
US9417886B2 (en) * 2013-01-21 2016-08-16 Dell Products, Lp System and method for dynamically changing system behavior by modifying boot configuration data and registry entries

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810020A (en) * 2014-02-14 2014-05-21 华为技术有限公司 Virtual machine elastic scaling method and device
WO2017114017A1 (en) * 2015-12-30 2017-07-06 华为技术有限公司 Computer device, system and method for implementing load balancing
US9940159B1 (en) * 2016-06-09 2018-04-10 Parallels IP Holdings GmbH Facilitating hibernation mode transitions for virtual machines
CN107810488A (en) * 2017-08-11 2018-03-16 深圳前海达闼云端智能科技有限公司 A kind of method of state management of virtual machine, device and intelligent terminal

Also Published As

Publication number Publication date
CN112306643A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
US8589733B2 (en) Saving operational state of open applications when unexpected shutdown events occur
KR101861724B1 (en) Selective power management for pre-boot firmware updates
US9541980B2 (en) Operation management device, operation management method, and recording medium
KR101673299B1 (en) Operating system recovery method and apparatus, and terminal device
US7240189B2 (en) Fast resume to normal operation of a computer in a power saving mode
CN111367722B (en) Virtual machine backup method, device and equipment and readable storage medium
CN108268302A (en) Realize the method and apparatus that equipment starts
CN112306643B (en) Virtual machine configuration method, device and equipment, and cloud platform
CN113515291A (en) Equipment online upgrading method and device
CN106339064A (en) Method and device for rebooting
CN112685063B (en) Feature library updating method, device, network equipment and readable storage medium
WO2016018349A1 (en) Computing device with first and second operating systems
EP4086756A1 (en) Method and apparatus for processing virtual machine component
WO2008048581A1 (en) A processing device operation initialization system
CN111090851B (en) Method and device for resetting virtual machine authentication information, host machine and storage medium
CN110865873A (en) Dynamic shutdown and recovery method for virtual machine resources
CN110868764A (en) Wireless connection self-recovery method, device, equipment and storage medium
US20080189566A1 (en) Computer system and control method thereof
JP2010079572A (en) Information processor, external memory and control method
KR102292211B1 (en) Electronic device
US20160350147A1 (en) Control method and control device
CN108170247A (en) BMC power loss recovery method and apparatus
CN117311822A (en) Dual-operating-system hot switching method, device, equipment and storage medium
CN118035026A (en) Process management method, device, computer equipment, storage medium and product
CN114995951A (en) Bare computer resource management method, device, equipment and readable storage medium

Legal Events

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