[go: up one dir, main page]

WO2019205272A1 - Virtual machine service providing method, device and equipment and computer readable storage medium - Google Patents

Virtual machine service providing method, device and equipment and computer readable storage medium Download PDF

Info

Publication number
WO2019205272A1
WO2019205272A1 PCT/CN2018/093149 CN2018093149W WO2019205272A1 WO 2019205272 A1 WO2019205272 A1 WO 2019205272A1 CN 2018093149 W CN2018093149 W CN 2018093149W WO 2019205272 A1 WO2019205272 A1 WO 2019205272A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
primary
block
information
target
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.)
Ceased
Application number
PCT/CN2018/093149
Other languages
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2019205272A1 publication Critical patent/WO2019205272A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Definitions

  • the present application relates to the field of virtual machine technologies, and in particular, to a virtual machine service providing method, apparatus, device, and computer readable storage medium.
  • a primary virtual machine and a standby virtual machine are usually set up. Two virtual machines are mounted on the same virtual block, and the virtual blocks are mounted on the primary virtual machine.
  • the NAS service is provided in the file system, and once the primary virtual machine fails, the standby virtual machine takes over the virtual block to provide the NAS service; while the standby virtual machine is in the process of taking over, the primary virtual machine may still write to the virtual block, two virtual The machine writes to the same virtual block.
  • file system data may overlap each other, resulting in the file system being damaged and the user data being lost in the virtual block.
  • the main purpose of the present application is to provide a virtual machine service providing method, apparatus, device, and computer readable storage medium, which are intended to solve the problem of the prior art in the virtual machine providing service, the primary virtual machine and the standby virtual machine pair virtual block double Write, causing problems with file system corruption and loss of user data.
  • the present application provides a virtual machine service providing method, where the virtual machine service providing method includes the following steps:
  • the present application further provides a virtual machine service providing apparatus, where the virtual machine service providing apparatus includes:
  • An allocating module configured to receive a lock request sent by the primary virtual machine, read the lock information in the lock request, and allocate a pair to the primary virtual machine according to the virtual block information in the lock information An exclusive right of the target virtual block corresponding to the virtual block information, for the primary virtual device to provide a service;
  • a determining module configured to determine, according to the primary virtual machine information in the takeover request, the primary virtual machine to be taken over when receiving the takeover request sent by the standby virtual machine;
  • a transfer module configured to transfer exclusive rights of the host virtual machine to be taken over the target virtual block to the standby virtual machine, to provide services for the standby virtual machine.
  • the present application further provides a virtual machine service providing device, where the virtual machine service providing device includes: a memory, a processor, a communication bus, and a virtual machine service provider stored on the memory;
  • the communication bus is used to implement connection communication between a processor and a memory
  • the processor is configured to execute the virtual machine service provider to implement the following steps:
  • the present application also provides a computer readable storage medium storing one or more programs, the one or more programs being configurable by one or more processors Execute for:
  • the virtual machine service providing method of the embodiment when receiving the locking request sent by the primary virtual machine, reads the locking information in the locking request, and according to the virtual block information in the locking information, to the primary virtual machine. Allocating exclusive rights to the target virtual block corresponding to the virtual block information to be served by the primary virtual machine; and when receiving the takeover request sent by the standby virtual machine, determining, according to the primary virtual machine information in the takeover request, The takeover of the primary virtual machine; and transferring the exclusive authority of the primary virtual machine to be taken to the target virtual block to the standby virtual machine for the standby virtual machine to provide services.
  • the scheme allocates exclusive rights to the target virtual block to the primary virtual machine before the service is provided by the primary virtual machine, and only the primary virtual machine can write to the target virtual block; when the service provision is converted from the primary virtual machine to the standby virtual machine Correspondingly, the exclusive permission of the target virtual block is transferred to the standby virtual machine, and only the standby virtual machine can write to the target virtual block; by setting an exclusive permission mechanism for the target virtual block, it is ensured that only the primary virtual machine providing the service at the same time Or backup to write to the target virtual block to avoid file system corruption.
  • FIG. 1 is a schematic flowchart of a first embodiment of a virtual machine service providing method according to the present application
  • FIG. 2 is a schematic flowchart of a second embodiment of a virtual machine service providing method according to the present application
  • FIG. 3 is a schematic flowchart of a third embodiment of a virtual machine service providing method according to the present application.
  • FIG. 4 is a schematic flowchart of a fourth embodiment of a virtual machine service providing method according to the present application.
  • FIG. 5 is a schematic diagram of functional modules of a first embodiment of a virtual machine service providing apparatus according to the present application.
  • FIG. 6 is a schematic structural diagram of a device in a hardware operating environment involved in a method according to an embodiment of the present application.
  • the application provides a virtual machine service providing method.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a virtual machine service providing method according to the present application.
  • the virtual machine service providing method includes:
  • Step S10 Receive a lock request sent by the primary virtual machine, read the lock information in the lock request, and allocate the pair to the primary virtual machine according to the virtual block information in the lock information.
  • the virtual machine service providing method of the present application is applied to a virtual machine cluster, and the virtual machine cluster allocates exclusive rights of the virtual block to the currently provided virtual machine; the exclusive right exists in the form of an exclusive lock, and the currently provided virtual machine (VM, VMWare is the primary virtual machine, and the virtual block with exclusive permission of the primary virtual machine is the target virtual block.
  • the primary virtual machine and the target virtual block are locked by an exclusive lock, indicating that the primary virtual block has exclusive rights to the target virtual block, and only the primary virtual machine can write to the target virtual block.
  • the lock request for adding the exclusive lock is sent to the virtual machine cluster, and the lock request is passed through the supervision center corresponding to the primary virtual machine (VMM, Virtual). Machine Monitor) delivery.
  • the supervisory center is used to implement the normal operation of the virtual machine, including planning, deployment, and optimization.
  • a preset layer is set between the main virtual machine and the supervision center, and the preset layer is specifically virtio.
  • Ring the primary virtual machine writes a lock request to virtio as a preset layer
  • the ring the supervisory center corresponding to the primary virtual machine reads the lock request from the preset layer and transmits it to the virtual machine cluster.
  • the locking request includes locking information indicating the virtual blocks and virtual machines that need to be locked.
  • the virtual machine cluster receives the lock request sent by the primary virtual machine, the lock information is read, and the virtual block information in the lock information represents the information that the virtual block needs to lock.
  • This virtual block information may include a virtual block identifier indicating a specific virtual block that is locked, and a virtual block space size indicating a storage space that the locked virtual block has.
  • the virtual block that needs to be locked can be determined, the virtual block that needs to be locked is determined as the target virtual block, and the exclusive right of the target virtual block corresponding to the virtual block information is allocated to The primary virtual machine, which locks the primary virtual machine and the target virtual block. After that, the primary virtual machine mounts the target virtual block to the file system, and the host virtual machine provides NAS (network). Attached storage, network attached storage) service.
  • Step S20 when receiving the takeover request sent by the standby virtual machine, determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request;
  • the external virtual service may be interrupted due to the failure of the primary virtual machine itself, and at least one of the primary virtual machines is provided to avoid interruption of the externally provided service.
  • a standby virtual machine If the primary virtual machine that provides the service fails, any standby virtual machine is started, and the standby virtual machine takes over the current service.
  • a network connection is established between the primary virtual machine and each of the standby virtual machines. When the primary virtual machine fails, each standby virtual machine can be monitored. When each standby virtual machine detects that the primary virtual machine is faulty, it sends a takeover request to the virtual machine cluster, and the takeover request is delivered through the supervisory center corresponding to the standby virtual machine.
  • multiple standby virtual machines may send takeover requests to the virtual machine cluster.
  • the time priority mechanism is set, that is, the standby virtual machine that first sends the takeover request to the virtual machine cluster is valid. Alternate virtual machine. Or being monitored by the virtual machine cluster.
  • the virtual machine cluster detects that the primary virtual machine fails, the message that the primary virtual machine fails is broadcasted to each standby virtual machine in the virtual machine cluster; each standby virtual machine The machine sends a takeover request to the virtual machine cluster.
  • the time priority mechanism is also adopted.
  • the standby virtual machine that first sends the takeover request to the virtual machine cluster is a valid standby virtual machine.
  • the faulty primary virtual machine information is read as long as the primary virtual machine fails.
  • the primary virtual machine information is added to the takeover request to determine the faulty primary virtual machine according to the virtual machine information carried in the takeover request, and the failed primary virtual machine is the standby host that needs to be taken over by the standby virtual machine. virtual machine.
  • the primary virtual machine a establishes a network connection with the standby virtual machines a1, a2. When a1, a2 detects that a fails, reads a information a3, and adds a3 to the takeover request.
  • the main virtual machine when the primary virtual machine a is detected to be faulty, the information a3 of a is read, and a3 is transmitted as a broadcast message to each of the standby virtual machines; each of the standby virtual machines is After receiving the broadcast message, add a3 to the takeover request and send it to the virtual machine cluster; the virtual machine cluster determines the primary virtual machine a to be taken over according to a3 in the received takeover request.
  • Step S30 Transfer the exclusive right of the primary virtual machine to be taken over the target virtual block to the standby virtual machine, so that the standby virtual machine provides a service.
  • the service currently provided by the primary virtual machine to be taken over needs to be switched to the standby virtual machine, and the standby virtual machine provides the service. Because the primary virtual machine to be taken over and the target virtual block are locked, the primary virtual machine to be taken over can only be served by the primary virtual machine to be taken over.
  • the exclusive virtual machine to be taken over by the primary virtual machine must be transferred to the standby virtual virtual machine. machine.
  • the standby virtual machine is locked to the target virtual block, giving the standby virtual machine exclusive rights to the target virtual block.
  • the virtual machine cluster first unlocks the lock between the primary virtual machine and the target virtual block to be taken over, and then locks the standby virtual machine and the target virtual block to provide services by the standby virtual machine.
  • the virtual machine service providing method of the embodiment when receiving the locking request sent by the primary virtual machine, reads the locking information in the locking request, and according to the virtual block information in the locking information, to the primary virtual machine. Allocating exclusive rights to the target virtual block corresponding to the virtual block information to be served by the primary virtual machine; and when receiving the takeover request sent by the standby virtual machine, determining, according to the primary virtual machine information in the takeover request, The takeover of the primary virtual machine; and transferring the exclusive authority of the primary virtual machine to be taken to the target virtual block to the standby virtual machine for the standby virtual machine to provide services.
  • the scheme allocates exclusive rights to the target virtual block to the primary virtual machine before the service is provided by the primary virtual machine, and only the primary virtual machine can write to the target virtual block; when the service provision is converted from the primary virtual machine to the standby virtual machine Correspondingly, the exclusive permission of the target virtual block is transferred to the standby virtual machine, and only the standby virtual machine can write to the target virtual block; by setting an exclusive permission mechanism for the target virtual block, it is ensured that only the primary virtual machine providing the service at the same time Or backup to write to the target virtual block to avoid file system corruption.
  • the step of assigning the primary virtual machine exclusive rights to the target virtual block corresponding to the virtual block information includes:
  • step S11 it is determined whether there is another virtual machine exclusive tag in the target virtual block corresponding to the virtual block information, and if the other virtual machine exclusive tag exists in the target virtual block, it is determined that the primary virtual machine is allocated to the primary virtual machine.
  • the target virtual block exclusive authority fails;
  • the exclusive permission of the virtual machine to the virtual block is implemented by an exclusive label
  • the exclusive label is a label related to the virtual machine and representing the uniqueness of the virtual machine.
  • the virtual machine's exclusive label is added to the virtual block to characterize the virtual machine's exclusive use of the virtual block. Considering that when a virtual machine is requesting exclusive use of a virtual block, it is possible that the virtual block has been locked with other virtual machines, that is, its exclusive rights are already owned by other virtual machines.
  • the present embodiment determines whether there is another virtual machine exclusive tag in the target virtual block corresponding to the virtual block information, that is, determining the target virtual block. Whether exclusive privileges are occupied by other virtual machines. When it is determined that there is another virtual machine exclusive label in the target virtual block, it indicates that the exclusive right of the target virtual block is occupied by other virtual machines, and the target virtual block exclusive right cannot be allocated to the primary virtual machine, and the target is allocated to the primary virtual machine. Virtual block exclusive permissions failed.
  • Step S12 If the other virtual machine exclusive label does not exist in the target virtual block, add an exclusive label of the primary virtual machine to the target virtual block, to allocate the target virtual to the primary virtual machine. Exclusive rights to the block.
  • the exclusive right of the target virtual block when it is determined that there is no other virtual machine exclusive label in the target virtual block, it indicates that the exclusive right of the target virtual block is not occupied by other virtual machines, and the exclusive right of the target virtual block may be allocated to the primary virtual machine. . Thereby, the exclusive tag of the primary virtual machine is added to the target virtual block, the primary virtual machine and the target virtual block are locked, and the primary virtual machine is assigned exclusive rights to the target virtual block.
  • the step of transferring the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine includes:
  • Step S31 erasing the exclusive label of the primary virtual machine to be taken over in the target virtual block, to release the exclusive authority of the primary virtual machine to be taken over to the target virtual block;
  • the exclusive right of the virtual machine to the virtual block is implemented by an exclusive label, so that the exclusive right transfer can be performed by the exclusive label operation.
  • the transfer operation is performed by first releasing the lock between the primary virtual machine to be taken over and the target virtual block, and then locking the standby virtual machine and the target virtual block.
  • the exclusive label of the primary virtual machine to be taken over in the target virtual block is first erased to release the exclusive authority of the target virtual virtual machine to the exclusive virtual block.
  • Step S32 adds an exclusive label of the standby virtual machine to the target virtual block to transfer the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine.
  • the target virtual block does not have an exclusive tag of any virtual machine, and its exclusive permission is not occupied. Therefore, the exclusive virtual machine's exclusive label can be added to the target virtual block, the standby virtual machine and the target virtual block are locked, and the standby virtual machine is assigned exclusive rights to the target virtual block, thereby realizing the virtual virtual machine to be taken over to the target virtual virtual machine. The exclusive right of the block is transferred to the standby virtual machine.
  • the receiving Before the steps to the takeover request sent by the standby virtual machine include:
  • Step S40 when receiving the abnormality log uploaded by the primary virtual machine, determining, according to the service information in the abnormality log, a service type label currently provided by the primary virtual machine;
  • a log uploading mechanism is set between the primary virtual machine and the virtual machine cluster, and the primary virtual machine uploads a log file of its own running state to the virtual machine cluster.
  • the log file includes an exception log that identifies the failure of the primary virtual machine, and the exception log is distinguished by the generated exception tag.
  • the VM cluster receives the log file and reads the log file that contains the abnormal tag, it indicates that the abnormal log uploaded by the primary VM is received. If the primary VM fails, you need to use the standby VM to service the VM. take over. Considering that the services currently provided by the primary virtual machine have their own requirements, such as requiring better display functions and faster read and write speeds.
  • the primary virtual machine fails, the virtual machine with the closest matching performance is taken over as the standby virtual machine according to the service demand it currently provides.
  • the service information of the service currently provided by the primary virtual machine is generated to generate an abnormality log, so as to determine the requirement of the service currently provided by the primary virtual machine according to the service information in the abnormality log.
  • the service information includes information about the type of the service currently provided, the amount of users accessing the service, and the virtual machine cluster reads the service requirements represented by the service information in the abnormal log, according to the service requirements and service types preset therein.
  • the correspondence between the tags determines the service type tag currently provided by the primary virtual machine.
  • the service requirements represented by the service information are: download speed and large amount of users; and the service type labels corresponding to the service requirements are a1 and a2, and the service types currently provided by the primary virtual machine are labeled as a1 and a2.
  • Step S50 Match the service type label and the attribute label of each virtual machine to generate each matching rate, and determine a target matching rate with the largest value among the respective matching rates;
  • different performances of different virtual machines in the virtual machine cluster are determined by attribute tags; if a virtual machine has faster upload performance and display performance, its attribute labels are b1 and c1; and another virtual The performance of the machine is faster download speed and display performance, then its attribute labels are a1 and c1.
  • the service type label and the attribute label of each virtual machine are matched to determine the virtual machine that most closely matches the current service requirement. Because there are multiple virtual machines in the virtual machine cluster, you need to match the service type label and the attribute labels of each virtual machine one by one to generate each matching rate. After each matching rate is generated, the values of the matching rates are compared to determine the maximum value in the matching rate values. The match rate for this maximum indicates that the virtual machine performance best matches the current service demand and is determined as the target match rate.
  • Step S60 determining an attribute tag corresponding to the target matching rate, and determining a virtual machine having the attribute tag as a standby virtual machine, and sending prompt information to the standby virtual machine, where the standby virtual machine is prompted according to the prompt
  • the message is sent to take over the request.
  • the matching rate is generated by matching the service type tag with the attribute tag of each virtual machine
  • the attribute tag of the virtual machine that generates the target matching rate can be determined, and the virtual tag with the attribute tag is The machine is determined to be a standby virtual machine.
  • the performance of the standby virtual machine is the best match with the current service requirement, and the prompt information is sent to the prompt, and the prompt information includes the faulty primary virtual machine information.
  • the standby virtual machine sends a takeover request to the virtual machine cluster according to the prompt information, and adds the primary virtual machine information in the prompt information to the takeover request to represent the primary virtual machine that it needs to take over.
  • the method includes:
  • Step S70 Receive a log file uploaded by the primary virtual machine, and determine, according to the log file, whether abnormal information in the abnormal log returns to normal.
  • the failure point of the primary virtual machine needs to be optimized.
  • the primary virtual machine still uploads its own running state generation log file to the virtual machine cluster.
  • the virtual machine cluster receives the log file uploaded by the primary virtual machine, and detects whether the abnormality log is included in the uploaded log file, that is, whether the abnormality label is carried in the log file, and whether the abnormal information in the abnormal log is restored according to the detection result. Normal, that is, whether the fault of the primary virtual machine is restored.
  • Step S80 If the abnormality information in the abnormality log returns to normal, the primary virtual machine is regarded as a new standby virtual machine.
  • the abnormality log is not included in the log file.
  • the abnormal information in the abnormal log is restored. That is, the fault of the primary VM is restored.
  • the primary virtual machine is used as the new standby virtual machine. machine. This new standby virtual machine can be used for service takeover when the standby virtual machine currently providing the service fails.
  • the abnormality label is still included in the log file, the abnormality log is included in the log file.
  • the abnormal information in the abnormal log is not restored. That is, the fault of the primary virtual machine is not restored.
  • the primary virtual machine cannot be used as the new one.
  • the standby virtual machine until the exception information in the exception log returns to normal.
  • the step of assigning the primary virtual machine exclusive rights to the target virtual block corresponding to the virtual block information includes:
  • Step S90 reading the primary virtual machine identifier in the locking request, and adding the primary virtual machine identifier to the preset identifier library;
  • the virtual machine cluster includes a large number of primary virtual machines to provide different services through different primary virtual machines.
  • a preset identification library is preset, and each primary virtual machine is assigned a primary virtual machine identifier that is unique.
  • the lock request sent by the primary virtual machine carries a primary virtual machine identifier that identifies the source of the lock request, and after the exclusive virtual machine is assigned exclusive rights to the target virtual block corresponding to the virtual block information, the lock request is read.
  • the primary virtual machine ID in the middle, and the read primary virtual machine ID is added to the preset identity database to indicate that the primary virtual machine corresponding to the primary virtual machine identifier is providing services.
  • the corresponding primary virtual machine identifier needs to be deleted from the preset identifier library; and the identifier of the standby virtual machine that takes over the primary virtual machine is added to the preset identifier library, Set the identity library to update.
  • the takeover request when receiving the takeover request sent by the standby virtual machine, the takeover request carries the primary virtual machine information that represents the primary virtual machine that needs to be taken over, that is, according to the primary virtual machine information in the takeover request, the pending takeover can be determined.
  • the main virtual machine its specific steps include:
  • Step S20-1 comparing the primary virtual machine information in the takeover request with the preset identifier database, determining a primary virtual machine identifier in the preset identifier database that is consistent with the primary virtual machine information, and using the primary virtual machine identifier The primary virtual machine corresponding to the identifier is determined as the primary virtual machine to be taken over.
  • the takeover request is sent to the virtual machine cluster, and the takeover request carries the information of the primary virtual machine that needs to be taken over.
  • the information of the primary virtual machine is read, and the information of the primary virtual machine that is read is compared with the preset identification database. Because all the primary virtual machine identifiers of the currently provided service exist in the preset identifier database, the preset identifier library is inevitable. There is a primary virtual machine ID that is consistent with the information of the primary virtual machine.
  • the primary virtual machine corresponding to the primary virtual machine identifier is the primary virtual machine that has the takeover requirement.
  • the primary virtual machine is determined to be the primary virtual machine to be taken over, so that the subsequent virtual machine cluster can remove the exclusive right of the target virtual block and add it to the standby virtual machine, that is, the virtual virtual machine to be taken over is targeted to the target virtual machine.
  • the exclusive right of the block is transferred to the standby virtual machine.
  • the present application provides a virtual machine service providing apparatus.
  • the virtual machine service providing apparatus includes:
  • the allocating module 10 is configured to receive a lock request sent by the primary virtual machine, read the lock information in the lock request, and allocate the virtual lock information to the primary virtual machine according to the virtual block information in the lock information. Exclusive rights to the target virtual block corresponding to the virtual block information, for the primary virtual device to provide a service;
  • the determining module 20 is configured to determine, according to the primary virtual machine information in the takeover request, the primary virtual machine to be taken over when receiving the takeover request sent by the standby virtual machine;
  • the transfer module 30 is configured to transfer the exclusive authority of the primary virtual machine to be taken over the target virtual block to the standby virtual machine, so that the standby virtual machine provides a service.
  • the virtual machine service providing apparatus of the embodiment when receiving the lock request sent by the primary virtual machine, the allocation module 10 reads the lock information in the lock request, and according to the virtual block information in the lock information, The primary virtual machine allocates exclusive rights to the target virtual block corresponding to the virtual block information to be served by the primary virtual machine; and when receiving the takeover request sent by the standby virtual machine, the determining module 20 is based on the primary in the takeover request The virtual machine information determines the primary virtual machine to be taken over; the transfer module 30 transfers the exclusive authority of the primary virtual machine to be taken over the target virtual block to the standby virtual machine for the standby virtual machine to provide the service.
  • the scheme allocates exclusive rights to the target virtual block to the primary virtual machine before the service is provided by the primary virtual machine, and only the primary virtual machine can write to the target virtual block; when the service provision is converted from the primary virtual machine to the standby virtual machine Correspondingly, the exclusive permission of the target virtual block is transferred to the standby virtual machine, and only the standby virtual machine can write to the target virtual block; by setting an exclusive permission mechanism for the target virtual block, it is ensured that only the primary virtual machine providing the service at the same time Or backup to write to the target virtual block to avoid file system corruption.
  • the allocating module includes:
  • a determining unit configured to determine whether there is another virtual machine exclusive label in the target virtual block corresponding to the virtual block information, and if the other virtual machine exclusive label exists in the target virtual block, determining to the primary virtual machine Assigning the target virtual block exclusive permission fails;
  • the transfer module includes:
  • a releasing unit configured to erase an exclusive label of the primary virtual machine to be taken over in the target virtual block, to release the exclusive authority of the primary virtual machine to be taken over to the target virtual block;
  • a transfer unit configured to add an exclusive label of the standby virtual machine to the target virtual block, to transfer the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine.
  • the virtual machine service providing apparatus further includes:
  • a receiving module configured to determine, according to service information in the abnormality log, a service type label currently provided by the primary virtual machine, when receiving an abnormality log uploaded by the primary virtual machine;
  • a matching module configured to match the service type label and the attribute label of each virtual machine, generate each matching rate, and determine a target matching rate with the largest value among the matching rates
  • a sending module configured to determine an attribute label corresponding to the target matching rate, and determine a virtual machine having the attribute label as a standby virtual machine, and send prompt information to the standby virtual machine for the standby virtual machine Send a takeover request based on the prompt information.
  • the virtual machine service providing apparatus further includes:
  • a determining module configured to receive a log file uploaded by the primary virtual machine, and determine, according to the log file, whether abnormal information in the abnormal log returns to normal;
  • a setting module configured to: if the abnormal information in the abnormality log returns to normal, use the primary virtual machine as a new standby virtual machine.
  • the virtual machine service providing apparatus further includes:
  • a reading module configured to read the primary virtual machine identifier in the locking request, and add the primary virtual machine identifier to the preset identifier library;
  • the determining module includes:
  • a determining unit configured to compare the primary virtual machine information in the takeover request with a preset identifier database, determine a primary virtual machine identifier in the preset identifier database that is consistent with the primary virtual machine information, and use the primary virtual machine identifier The primary virtual machine corresponding to the identifier is determined as the primary virtual machine to be taken over.
  • the allocating module includes:
  • a receiving unit configured to receive a lock request sent by the primary virtual machine, where the lock request is written by the primary virtual machine to a preset layer, and then the preset corresponding to the primary virtual machine from the preset The layer is read and passed through the regulatory center.
  • the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • FIG. 6 is a schematic structural diagram of a device in a hardware operating environment involved in a method according to an embodiment of the present application.
  • the virtual machine service providing device in the embodiment of the present application may be a PC, or may be a terminal device such as a smart phone, a tablet computer, an e-book reader, or a portable computer.
  • the virtual machine service providing device may include a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection communication between the processor 1001 and the memory 1005.
  • the memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
  • the memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
  • the virtual machine service providing device may further include a user interface, a network interface, a camera, and an RF (Radio). Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
  • the user interface may include a display, an input unit such as a keyboard, and the optional user interface may also include a standard wired interface, a wireless interface.
  • the network interface can optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
  • the virtual machine service providing device structure shown in FIG. 6 does not constitute a limitation of the virtual machine service providing device, and may include more or less components than those illustrated, or combine some components. Or different parts arrangement.
  • an operating system may be included in the memory 1005 as a computer-readable storage medium.
  • An operating system is a program that manages and controls virtual machine services to provide device hardware and software resources, and supports the operation of virtual machine service providers and other software and/or programs.
  • the network communication module is used to implement communication between components within the memory 1005 and with other hardware and software in the virtual machine service providing device.
  • the processor 1001 is configured to execute the virtual machine service provider stored in the memory 1005, and implement the steps in the foregoing embodiments of the virtual machine service providing method.
  • the application provides a computer readable storage medium storing one or more programs, the one or more programs being further executable by one or more processors for implementing the above
  • the virtual machine service provides the steps in the various embodiments of the method.
  • portions of the technical solution of the present application that contribute substantially or to the prior art may be embodied in the form of a software product stored in a computer readable storage medium as described above (eg, The ROM/RAM, the magnetic disk, and the optical disk include a plurality of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in the various embodiments of the present application.
  • a terminal device which may be a mobile phone, a computer, a server, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Hardware Redundancy (AREA)

Abstract

Disclosed by the present application are a virtual machine service providing method, device and equipment and a computer readable storage medium. The method comprises: receiving a locking request sent by a main virtual machine, reading the locking information in the locking request and, on the basis of said information, allocating to the main virtual machine the exclusive rights to a target virtual block corresponding to the virtual block information so as to enable the main virtual machine to provide service; when receiving a takeover request sent by a standby virtual machine, determining a main virtual machine to be taken over according to the main virtual machine information in the takeover request; transferring from the main virtual machine to the standby virtual machine the exclusive rights to the target virtual block so as to enable the standby virtual machine to provide service. In said technical solution, an exclusive right mechanism is set to the target virtual block to ensure that only the main virtual machine or the standby virtual machine providing service can conduct a write operation to the target virtual block at the same time, which can prevent damage to the file system.

Description

虚拟机服务提供方法、装置、设备及计算机可读存储介质  Virtual machine service providing method, device, device and computer readable storage medium

本申请要求于2018年04月27日提交中国专利局、申请号为201810397142.4、发明名称为“虚拟机服务提供方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims priority to Chinese Patent Application No. 201101397142.4, entitled "Virtual Machine Service Providing Method, Apparatus, Apparatus, and Computer Readable Storage Medium", filed on April 27, 2018, the entire disclosure of which is incorporated herein by reference. The content is incorporated into the application by reference.

技术领域Technical field

本申请主要涉及虚拟机技术领域,具体地说,涉及一种虚拟机服务提供方法、装置、设备及计算机可读存储介质。The present application relates to the field of virtual machine technologies, and in particular, to a virtual machine service providing method, apparatus, device, and computer readable storage medium.

背景技术Background technique

目前虚拟机基于ServerSAN架构对外提供NAS服务时,通常会设置一台主虚拟机和一台备用虚拟机,两台虚拟机挂载在同一虚拟块上,且通过主虚拟机将虚拟块挂载在文件系统中提供NAS服务,而一旦主虚拟机出现故障,备用虚拟机接管虚拟块提供NAS服务;备用虚拟机在接管的过程中,可能主虚拟机仍然在对虚拟块进行写操作,两个虚拟机对同一虚拟块进行写操作,在双写过程中可能会出现文件系统数据相互覆盖的情况,从而导致虚拟块中文件系统被损坏,用户数据丢失。Currently, when a virtual machine provides NAS services based on the ServerSAN architecture, a primary virtual machine and a standby virtual machine are usually set up. Two virtual machines are mounted on the same virtual block, and the virtual blocks are mounted on the primary virtual machine. The NAS service is provided in the file system, and once the primary virtual machine fails, the standby virtual machine takes over the virtual block to provide the NAS service; while the standby virtual machine is in the process of taking over, the primary virtual machine may still write to the virtual block, two virtual The machine writes to the same virtual block. In the double write process, file system data may overlap each other, resulting in the file system being damaged and the user data being lost in the virtual block.

发明内容Summary of the invention

本申请的主要目的是提供一种虚拟机服务提供方法、装置、设备及计算机可读存储介质,旨在解决现有技术在虚拟机提供服务过程中,主虚拟机和备用虚拟机对虚拟块双写,导致文件系统损坏、用户数据丢失的问题。The main purpose of the present application is to provide a virtual machine service providing method, apparatus, device, and computer readable storage medium, which are intended to solve the problem of the prior art in the virtual machine providing service, the primary virtual machine and the standby virtual machine pair virtual block double Write, causing problems with file system corruption and loss of user data.

为实现上述目的,本申请提供一种虚拟机服务提供方法,所述虚拟机服务提供方法包括以下步骤:To achieve the above objective, the present application provides a virtual machine service providing method, where the virtual machine service providing method includes the following steps:

接收主虚拟机所发送的加锁请求,读取所述加锁请求中的加锁信息,并根据所述加锁信息中的虚拟块信息,向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限,以供所述主虚拟器提供服务;Receiving a lock request sent by the primary virtual machine, reading the lock information in the lock request, and assigning the virtual block information to the primary virtual machine according to the virtual block information in the lock information Exclusive rights of the corresponding target virtual block for the primary virtual device to provide services;

当接收到备用虚拟机所发送的接管请求时,根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机;When receiving the takeover request sent by the standby virtual machine, determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request;

将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机,以供所述备用虚拟机提供服务。Transferring exclusive rights of the to-be-managed primary virtual machine to the target virtual block to the standby virtual machine for the backup virtual machine to provide services.

此外,为实现上述目的,本申请还提出一种虚拟机服务提供装置,所述虚拟机服务提供装置包括:In addition, in order to achieve the above object, the present application further provides a virtual machine service providing apparatus, where the virtual machine service providing apparatus includes:

分配模块,用于接收主虚拟机所发送的加锁请求,读取所述加锁请求中的加锁信息,并根据所述加锁信息中的虚拟块信息,向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限,以供所述主虚拟器提供服务;An allocating module, configured to receive a lock request sent by the primary virtual machine, read the lock information in the lock request, and allocate a pair to the primary virtual machine according to the virtual block information in the lock information An exclusive right of the target virtual block corresponding to the virtual block information, for the primary virtual device to provide a service;

确定模块,用于当接收到备用虚拟机所发送的接管请求时,根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机;a determining module, configured to determine, according to the primary virtual machine information in the takeover request, the primary virtual machine to be taken over when receiving the takeover request sent by the standby virtual machine;

转移模块,用于将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机,以供所述备用虚拟机提供服务。And a transfer module, configured to transfer exclusive rights of the host virtual machine to be taken over the target virtual block to the standby virtual machine, to provide services for the standby virtual machine.

此外,为实现上述目的,本申请还提出一种虚拟机服务提供设备,所述虚拟机服务提供设备包括:存储器、处理器、通信总线以及存储在所述存储器上的虚拟机服务提供程序;In addition, to achieve the above object, the present application further provides a virtual machine service providing device, where the virtual machine service providing device includes: a memory, a processor, a communication bus, and a virtual machine service provider stored on the memory;

所述通信总线用于实现处理器和存储器之间的连接通信;The communication bus is used to implement connection communication between a processor and a memory;

所述处理器用于执行所述虚拟机服务提供程序,以实现以下步骤:The processor is configured to execute the virtual machine service provider to implement the following steps:

接收主虚拟机所发送的加锁请求,读取所述加锁请求中的加锁信息,并根据所述加锁信息中的虚拟块信息,向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限,以供所述主虚拟器提供服务;Receiving a lock request sent by the primary virtual machine, reading the lock information in the lock request, and assigning the virtual block information to the primary virtual machine according to the virtual block information in the lock information Exclusive rights of the corresponding target virtual block for the primary virtual device to provide services;

当接收到备用虚拟机所发送的接管请求时,根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机;When receiving the takeover request sent by the standby virtual machine, determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request;

将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机,以供所述备用虚拟机提供服务。Transferring exclusive rights of the to-be-managed primary virtual machine to the target virtual block to the standby virtual machine for the backup virtual machine to provide services.

此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序可被一个或者一个以上的处理器执行以用于:Moreover, to achieve the above object, the present application also provides a computer readable storage medium storing one or more programs, the one or more programs being configurable by one or more processors Execute for:

接收主虚拟机所发送的加锁请求,读取所述加锁请求中的加锁信息,并根据所述加锁信息中的虚拟块信息,向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限,以供所述主虚拟器提供服务;Receiving a lock request sent by the primary virtual machine, reading the lock information in the lock request, and assigning the virtual block information to the primary virtual machine according to the virtual block information in the lock information Exclusive rights of the corresponding target virtual block for the primary virtual device to provide services;

当接收到备用虚拟机所发送的接管请求时,根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机;When receiving the takeover request sent by the standby virtual machine, determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request;

将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机,以供所述备用虚拟机提供服务。Transferring exclusive rights of the to-be-managed primary virtual machine to the target virtual block to the standby virtual machine for the backup virtual machine to provide services.

本实施例的虚拟机服务提供方法,当接收到主虚拟机所发送的加锁请求时,读取加锁请求中的加锁信息,并根据加锁信息中的虚拟块信息,向主虚拟机分配对虚拟块信息所对应的目标虚拟块的独占权限,以由主虚拟器提供服务;而当接收到备用虚拟机所发送的接管请求时,则根据接管请求中的主虚拟机信息,确定待接管的主虚拟机;并将所述待接管的主虚拟机对目标虚拟块的独占权限转移至备用虚拟机,以供备用虚拟机提供服务。本方案在由主虚拟机提供服务前,向主虚拟机分配对目标虚拟块的独占权限,只有主虚拟机可对目标虚拟块进行写操作;当服务提供由主虚拟机变换为备用虚拟机时,相应的将对目标虚拟块的独占权限转移至备用虚拟机,只有备用虚拟机可对目标虚拟块进行写操作;通过对目标虚拟块设置独占权限机制,确保同一时间只有提供服务的主虚拟机或者备用才能对目标虚拟块进行写操作,避免文件系统损坏。The virtual machine service providing method of the embodiment, when receiving the locking request sent by the primary virtual machine, reads the locking information in the locking request, and according to the virtual block information in the locking information, to the primary virtual machine. Allocating exclusive rights to the target virtual block corresponding to the virtual block information to be served by the primary virtual machine; and when receiving the takeover request sent by the standby virtual machine, determining, according to the primary virtual machine information in the takeover request, The takeover of the primary virtual machine; and transferring the exclusive authority of the primary virtual machine to be taken to the target virtual block to the standby virtual machine for the standby virtual machine to provide services. The scheme allocates exclusive rights to the target virtual block to the primary virtual machine before the service is provided by the primary virtual machine, and only the primary virtual machine can write to the target virtual block; when the service provision is converted from the primary virtual machine to the standby virtual machine Correspondingly, the exclusive permission of the target virtual block is transferred to the standby virtual machine, and only the standby virtual machine can write to the target virtual block; by setting an exclusive permission mechanism for the target virtual block, it is ensured that only the primary virtual machine providing the service at the same time Or backup to write to the target virtual block to avoid file system corruption.

附图说明DRAWINGS

图1是本申请的虚拟机服务提供方法第一实施例的流程示意图;1 is a schematic flowchart of a first embodiment of a virtual machine service providing method according to the present application;

图2是本申请的虚拟机服务提供方法第二实施例的流程示意图;2 is a schematic flowchart of a second embodiment of a virtual machine service providing method according to the present application;

图3是本申请的虚拟机服务提供方法第三实施例的流程示意图;3 is a schematic flowchart of a third embodiment of a virtual machine service providing method according to the present application;

图4是本申请的虚拟机服务提供方法第四实施例的流程示意图;4 is a schematic flowchart of a fourth embodiment of a virtual machine service providing method according to the present application;

图5是本申请的虚拟机服务提供装置第一实施例的功能模块示意图;FIG. 5 is a schematic diagram of functional modules of a first embodiment of a virtual machine service providing apparatus according to the present application; FIG.

图6是本申请实施例方法涉及的硬件运行环境的设备结构示意图。FIG. 6 is a schematic structural diagram of a device in a hardware operating environment involved in a method according to an embodiment of the present application.

本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.

具体实施方式detailed description

应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.

本申请提供一种虚拟机服务提供方法。The application provides a virtual machine service providing method.

请参照图1,图1为本申请虚拟机服务提供方法第一实施例的流程示意图。在本实施例中,所述虚拟机服务提供方法包括:Please refer to FIG. 1. FIG. 1 is a schematic flowchart diagram of a first embodiment of a virtual machine service providing method according to the present application. In this embodiment, the virtual machine service providing method includes:

步骤S10,接收主虚拟机所发送的加锁请求,读取所述加锁请求中的加锁信息,并根据所述加锁信息中的虚拟块信息,向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限,以供所述主虚拟器提供服务;Step S10: Receive a lock request sent by the primary virtual machine, read the lock information in the lock request, and allocate the pair to the primary virtual machine according to the virtual block information in the lock information. The exclusive right of the target virtual block corresponding to the virtual block information, for the primary virtual device to provide a service;

本申请的虚拟机服务提供方法应用于虚拟机集群,通过虚拟机集群对当前提供服务的虚拟机分配虚拟块的独占权限;独占权限以独占锁的形式存在,当前提供服务的虚拟机(VM、VMWare)为主虚拟机,主虚拟机所具有独占权限的虚拟块为目标虚拟块。通过独占锁将主虚拟机和目标虚拟块锁定,表明主虚拟块对目标虚拟块的独占权限,仅有主虚拟机可对目标虚拟块进行写操作。具体地,在主虚拟机提供服务之前,向虚拟机集群发送添加独占锁的加锁请求,且加锁请求通过与主虚拟机对应的监管中心(VMM,Virtual Machine Monitor)传递。其中监管中心用于实现虚拟机正常运行,包括规划、部署和优化等功能。主虚拟机与监管中心之间设置有预设层,此预设层具体为virtio ring,主虚拟机将加锁请求写入到作为预设层的virtio ring,与主虚拟机对应的监管中心从此预设层中读取加锁请求,并传输到虚拟机集群。加锁请求除触发虚拟机集群加锁机制的同时,其中还包括表征所需要锁定的虚拟块和虚拟机的加锁信息。当虚拟机集群接收到此主虚拟机所发送的加锁请求时,读取其中的加锁信息,加锁信息中的虚拟块信息即表征所需要锁定虚拟块所具有的信息。此虚拟块信息可以包括虚拟块标识符和虚拟块空间大小,虚拟块标识符表明锁定的具体虚拟块;虚拟块空间大小表明此锁定的虚拟块所具有的存储空间。根据此加锁信息中的虚拟块信息即可确定所需要锁定的虚拟块,将此需要锁定的虚拟块确定为目标虚拟块,并将此与虚拟块信息所对应目标虚拟块的独占权限分配到主虚拟机,实现主虚拟机与目标虚拟块的锁定。此后主虚拟机将目标虚拟块挂载到文件系统中,实现主虚拟机对外提供NAS(network attached storage,网络附加存储)服务。The virtual machine service providing method of the present application is applied to a virtual machine cluster, and the virtual machine cluster allocates exclusive rights of the virtual block to the currently provided virtual machine; the exclusive right exists in the form of an exclusive lock, and the currently provided virtual machine (VM, VMWare is the primary virtual machine, and the virtual block with exclusive permission of the primary virtual machine is the target virtual block. The primary virtual machine and the target virtual block are locked by an exclusive lock, indicating that the primary virtual block has exclusive rights to the target virtual block, and only the primary virtual machine can write to the target virtual block. Specifically, before the primary virtual machine provides the service, the lock request for adding the exclusive lock is sent to the virtual machine cluster, and the lock request is passed through the supervision center corresponding to the primary virtual machine (VMM, Virtual). Machine Monitor) delivery. The supervisory center is used to implement the normal operation of the virtual machine, including planning, deployment, and optimization. A preset layer is set between the main virtual machine and the supervision center, and the preset layer is specifically virtio. Ring, the primary virtual machine writes a lock request to virtio as a preset layer The ring, the supervisory center corresponding to the primary virtual machine reads the lock request from the preset layer and transmits it to the virtual machine cluster. In addition to triggering the virtual machine cluster locking mechanism, the locking request includes locking information indicating the virtual blocks and virtual machines that need to be locked. When the virtual machine cluster receives the lock request sent by the primary virtual machine, the lock information is read, and the virtual block information in the lock information represents the information that the virtual block needs to lock. This virtual block information may include a virtual block identifier indicating a specific virtual block that is locked, and a virtual block space size indicating a storage space that the locked virtual block has. According to the virtual block information in the lock information, the virtual block that needs to be locked can be determined, the virtual block that needs to be locked is determined as the target virtual block, and the exclusive right of the target virtual block corresponding to the virtual block information is allocated to The primary virtual machine, which locks the primary virtual machine and the target virtual block. After that, the primary virtual machine mounts the target virtual block to the file system, and the host virtual machine provides NAS (network). Attached storage, network attached storage) service.

步骤S20,当接收到备用虚拟机所发送的接管请求时,根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机;Step S20, when receiving the takeover request sent by the standby virtual machine, determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request;

可理解地,在主虚拟机对外提供服务的过程中,可能因主虚拟机自身原因出现故障而导致所提供的对外服务中断,而为了避免对外所提供服务的中断,对主虚拟机至少设置有一台备用虚拟机。若当前提供服务的主虚拟机出现故障,则启动任意一台备用虚拟机,由备用虚拟机接管当前服务。主虚拟机和各备用虚拟机之间建立有网络连接,当主虚拟机出现故障时,各备用虚拟机能够监测得到。当各备用虚拟机检测到主虚拟机出现故障时,向虚拟机集群发送接管请求,接管请求通过与备用虚拟机对应的监管中心传递。因备用虚拟机可能有多台,多台备用虚拟机可能均会向虚拟机集群发送接管请求,此时设置时间优先机制,即最先将接管请求发送到虚拟机集群的备用虚拟机为有效的备用虚拟机。或者由虚拟机集群进行监测,当虚拟机集群监测到其中的主虚拟机出现故障时,将主虚拟机出现故障的消息以广播的方式传输到虚拟机集群中的各个备用虚拟机;各个备用虚拟机向虚拟机集群发送接管请求,同样采用时间优先机制,最先将接管请求发送到虚拟机集群的备用虚拟机为有效的备用虚拟机。It can be understood that, in the process of providing services to the main virtual machine, the external virtual service may be interrupted due to the failure of the primary virtual machine itself, and at least one of the primary virtual machines is provided to avoid interruption of the externally provided service. A standby virtual machine. If the primary virtual machine that provides the service fails, any standby virtual machine is started, and the standby virtual machine takes over the current service. A network connection is established between the primary virtual machine and each of the standby virtual machines. When the primary virtual machine fails, each standby virtual machine can be monitored. When each standby virtual machine detects that the primary virtual machine is faulty, it sends a takeover request to the virtual machine cluster, and the takeover request is delivered through the supervisory center corresponding to the standby virtual machine. Because there may be multiple standby virtual machines, multiple standby virtual machines may send takeover requests to the virtual machine cluster. At this time, the time priority mechanism is set, that is, the standby virtual machine that first sends the takeover request to the virtual machine cluster is valid. Alternate virtual machine. Or being monitored by the virtual machine cluster. When the virtual machine cluster detects that the primary virtual machine fails, the message that the primary virtual machine fails is broadcasted to each standby virtual machine in the virtual machine cluster; each standby virtual machine The machine sends a takeover request to the virtual machine cluster. The time priority mechanism is also adopted. The standby virtual machine that first sends the takeover request to the virtual machine cluster is a valid standby virtual machine.

对于所出现故障的主虚拟机,无论采用备用虚拟机直接监测,还是虚拟机集群间接监测的方式,只要监测到主虚拟机出现故障,则读取此出现故障的主虚拟机信息。将此主虚拟机信息添加到接管请求中,以根据接管请求所携带的虚拟机信息确定出现故障的主虚拟机,此出现故障的主虚拟机即为需要备用虚拟机进行接管的待接管的主虚拟机。如对于备用虚拟机直接监测机制,主虚拟机a与备用虚拟机a1、a2建立网络连接,当a1、a2监测到a出现故障时,读取a的信息a3,并将a3添加到接管请求中发送到虚拟机集群;若虚拟机集群的主虚拟机有a和b两个,且先接收到a1所发送的接管请求,读取接管请求所携带的信息a3,根据a3将a确定为待接管的主虚拟机。相应地对于虚拟机集群监测的方式,当监测到其中的主虚拟机a出现故障时,读取a的信息a3,并将a3作为广播消息传输到其中的各个备用虚拟机;各备用虚拟机在接收到广播消息后,将其中的a3添加到接管请求中发送到虚拟机集群;虚拟机集群根据所接收接管请求中的a3,确定待接管的主虚拟机a。For the faulty primary virtual machine, whether it is directly monitored by the standby virtual machine or indirectly monitored by the virtual machine cluster, the faulty primary virtual machine information is read as long as the primary virtual machine fails. The primary virtual machine information is added to the takeover request to determine the faulty primary virtual machine according to the virtual machine information carried in the takeover request, and the failed primary virtual machine is the standby host that needs to be taken over by the standby virtual machine. virtual machine. For the standby virtual machine direct monitoring mechanism, the primary virtual machine a establishes a network connection with the standby virtual machines a1, a2. When a1, a2 detects that a fails, reads a information a3, and adds a3 to the takeover request. Send to the virtual machine cluster; if the primary virtual machine of the virtual machine cluster has two a and b, and receives the takeover request sent by a1, read the information a3 carried in the takeover request, and determine a to be taken over according to a3. The main virtual machine. Correspondingly, for the manner of monitoring the virtual machine cluster, when the primary virtual machine a is detected to be faulty, the information a3 of a is read, and a3 is transmitted as a broadcast message to each of the standby virtual machines; each of the standby virtual machines is After receiving the broadcast message, add a3 to the takeover request and send it to the virtual machine cluster; the virtual machine cluster determines the primary virtual machine a to be taken over according to a3 in the received takeover request.

步骤S30,将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机,以供所述备用虚拟机提供服务。Step S30: Transfer the exclusive right of the primary virtual machine to be taken over the target virtual block to the standby virtual machine, so that the standby virtual machine provides a service.

进一步地,在确定有接管需求的待接管的主虚拟机后,需要将此待接管的主虚拟机当前所提供的服务切换至备用虚拟机,由备用虚拟机提供服务。因待接管的主虚拟机与目标虚拟块锁定,只能由待接管的主虚拟机提供服务,为了实现服务的切换,需要将待接管的主虚拟机对目标虚拟块的独占权限转移到备用虚拟机。即将备用虚拟机与目标虚拟块锁定,使备用虚拟机对目标虚拟块具有独占权限。转移时虚拟机集群先将待接管的主虚拟机与目标虚拟块之间的锁定解除,再对备用虚拟机与目标虚拟块进行锁定,实现由备用虚拟机提供服务。Further, after determining the primary virtual machine to be taken over, the service currently provided by the primary virtual machine to be taken over needs to be switched to the standby virtual machine, and the standby virtual machine provides the service. Because the primary virtual machine to be taken over and the target virtual block are locked, the primary virtual machine to be taken over can only be served by the primary virtual machine to be taken over. In order to implement service switching, the exclusive virtual machine to be taken over by the primary virtual machine must be transferred to the standby virtual virtual machine. machine. The standby virtual machine is locked to the target virtual block, giving the standby virtual machine exclusive rights to the target virtual block. During the transfer, the virtual machine cluster first unlocks the lock between the primary virtual machine and the target virtual block to be taken over, and then locks the standby virtual machine and the target virtual block to provide services by the standby virtual machine.

本实施例的虚拟机服务提供方法,当接收到主虚拟机所发送的加锁请求时,读取加锁请求中的加锁信息,并根据加锁信息中的虚拟块信息,向主虚拟机分配对虚拟块信息所对应的目标虚拟块的独占权限,以由主虚拟器提供服务;而当接收到备用虚拟机所发送的接管请求时,则根据接管请求中的主虚拟机信息,确定待接管的主虚拟机;并将所述待接管的主虚拟机对目标虚拟块的独占权限转移至备用虚拟机,以供备用虚拟机提供服务。本方案在由主虚拟机提供服务前,向主虚拟机分配对目标虚拟块的独占权限,只有主虚拟机可对目标虚拟块进行写操作;当服务提供由主虚拟机变换为备用虚拟机时,相应的将对目标虚拟块的独占权限转移至备用虚拟机,只有备用虚拟机可对目标虚拟块进行写操作;通过对目标虚拟块设置独占权限机制,确保同一时间只有提供服务的主虚拟机或者备用才能对目标虚拟块进行写操作,避免文件系统损坏。The virtual machine service providing method of the embodiment, when receiving the locking request sent by the primary virtual machine, reads the locking information in the locking request, and according to the virtual block information in the locking information, to the primary virtual machine. Allocating exclusive rights to the target virtual block corresponding to the virtual block information to be served by the primary virtual machine; and when receiving the takeover request sent by the standby virtual machine, determining, according to the primary virtual machine information in the takeover request, The takeover of the primary virtual machine; and transferring the exclusive authority of the primary virtual machine to be taken to the target virtual block to the standby virtual machine for the standby virtual machine to provide services. The scheme allocates exclusive rights to the target virtual block to the primary virtual machine before the service is provided by the primary virtual machine, and only the primary virtual machine can write to the target virtual block; when the service provision is converted from the primary virtual machine to the standby virtual machine Correspondingly, the exclusive permission of the target virtual block is transferred to the standby virtual machine, and only the standby virtual machine can write to the target virtual block; by setting an exclusive permission mechanism for the target virtual block, it is ensured that only the primary virtual machine providing the service at the same time Or backup to write to the target virtual block to avoid file system corruption.

进一步地,在本申请虚拟机服务提供方法另一实施例中,所述向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限的步骤包括:Further, in another embodiment of the virtual machine service providing method of the present application, the step of assigning the primary virtual machine exclusive rights to the target virtual block corresponding to the virtual block information includes:

步骤S11,判断所述虚拟块信息所对应的目标虚拟块中是否存在其他虚拟机独占标签,若所述目标虚拟块中存在所述其他虚拟机独占标签,则判定向所述主虚拟机分配所述目标虚拟块独占权限失败;In step S11, it is determined whether there is another virtual machine exclusive tag in the target virtual block corresponding to the virtual block information, and if the other virtual machine exclusive tag exists in the target virtual block, it is determined that the primary virtual machine is allocated to the primary virtual machine. The target virtual block exclusive authority fails;

进一步地,虚拟机对虚拟块的独占权限通过独占标签实现,独占标签为与虚拟机相关且表征虚拟机唯一性的标签。当虚拟机对虚拟块具有独占权限时,将虚拟机的独占标签添加到虚拟块中,以表征虚拟机对此虚拟块的独占。考虑到在虚拟机在请求对虚拟块独占时,可能虚拟块已经和其他虚拟机进行锁定,即其独占权项已被其他虚拟机所具有。从而本实施例在向主虚拟机分配对虚拟机块信息对应目标虚拟块的独占权限前,判断此虚拟块信息对应的目标虚拟块中是否存在其他虚拟机独占标签,即判断此目标虚拟块的独占权限是否被其他虚拟机所占用。当判断出目标虚拟块中存在其他虚拟机独占标签时,则说明目标虚拟块的独占权限被其他虚拟机所占用,不能向主虚拟机分配此目标虚拟块独占权限,判定向主虚拟机分配目标虚拟块独占权限失败。Further, the exclusive permission of the virtual machine to the virtual block is implemented by an exclusive label, and the exclusive label is a label related to the virtual machine and representing the uniqueness of the virtual machine. When a virtual machine has exclusive rights to a virtual block, the virtual machine's exclusive label is added to the virtual block to characterize the virtual machine's exclusive use of the virtual block. Considering that when a virtual machine is requesting exclusive use of a virtual block, it is possible that the virtual block has been locked with other virtual machines, that is, its exclusive rights are already owned by other virtual machines. Therefore, before the exclusive virtual machine allocates exclusive rights to the target virtual block corresponding to the virtual machine block information, the present embodiment determines whether there is another virtual machine exclusive tag in the target virtual block corresponding to the virtual block information, that is, determining the target virtual block. Whether exclusive privileges are occupied by other virtual machines. When it is determined that there is another virtual machine exclusive label in the target virtual block, it indicates that the exclusive right of the target virtual block is occupied by other virtual machines, and the target virtual block exclusive right cannot be allocated to the primary virtual machine, and the target is allocated to the primary virtual machine. Virtual block exclusive permissions failed.

步骤S12,若所述目标虚拟块中不存在所述其他虚拟机独占标签,则将所述主虚拟机的独占标签添加到所述目标虚拟块中,以向所述主虚拟机分配对目标虚拟块的独占权限。Step S12: If the other virtual machine exclusive label does not exist in the target virtual block, add an exclusive label of the primary virtual machine to the target virtual block, to allocate the target virtual to the primary virtual machine. Exclusive rights to the block.

可理解地,当判断出目标虚拟块中不存在其他虚拟机独占标签时,则说明目标虚拟块的独占权限没有被其他虚拟机所占用,可以将此目标虚拟块的独占权限分配给主虚拟机。从而将主虚拟机的独占标签添加到目标虚拟块中,将主虚拟机和目标虚拟块锁定,向主虚拟机分配对目标虚拟块的独占权限。Obviously, when it is determined that there is no other virtual machine exclusive label in the target virtual block, it indicates that the exclusive right of the target virtual block is not occupied by other virtual machines, and the exclusive right of the target virtual block may be allocated to the primary virtual machine. . Thereby, the exclusive tag of the primary virtual machine is added to the target virtual block, the primary virtual machine and the target virtual block are locked, and the primary virtual machine is assigned exclusive rights to the target virtual block.

进一步地,在本申请虚拟机服务提供方法另一实施例中,所述将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机的步骤包括:Further, in another embodiment of the virtual machine service providing method of the present application, the step of transferring the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine includes:

步骤S31,将所述目标虚拟块中待接管的主虚拟机的独占标签擦除,以解除所述待接管的主虚拟机对所述目标虚拟块的独占权限;Step S31, erasing the exclusive label of the primary virtual machine to be taken over in the target virtual block, to release the exclusive authority of the primary virtual machine to be taken over to the target virtual block;

可理解地,虚拟机对虚拟块的独占权限通过独占标签实现,从而在将独占权限转移可通过对独占标签操作进行。因转移操作为先将待接管的主虚拟机与目标虚拟块之间的锁定解除,再对备用虚拟机与目标虚拟块进行锁定的过程。在转移时先将目标虚拟块中待接管的主虚拟机的独占标签擦除,以将待接管的主虚拟机对目标虚拟块所具有的独占权限进行解除操作。Understandably, the exclusive right of the virtual machine to the virtual block is implemented by an exclusive label, so that the exclusive right transfer can be performed by the exclusive label operation. The transfer operation is performed by first releasing the lock between the primary virtual machine to be taken over and the target virtual block, and then locking the standby virtual machine and the target virtual block. During the transfer, the exclusive label of the primary virtual machine to be taken over in the target virtual block is first erased to release the exclusive authority of the target virtual virtual machine to the exclusive virtual block.

步骤S32将所述备用虚拟机的独占标签添加到所述目标虚拟块中,以将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机。Step S32 adds an exclusive label of the standby virtual machine to the target virtual block to transfer the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine.

进一步地,因目标虚拟块中待接管的主虚拟机的独占标签被擦除,目标虚拟块中不具有任何虚拟机的独占标签,其独占权限没有被占用。从而可将备用虚拟机的独占标签添加到目标虚拟块中,将备用虚拟机和目标虚拟块锁定,向备用虚拟机分配对目标虚拟块的独占权限,实现将待接管的主虚拟机对目标虚拟块的独占权限转移至备用虚拟机。Further, because the exclusive tag of the primary virtual machine to be taken over in the target virtual block is erased, the target virtual block does not have an exclusive tag of any virtual machine, and its exclusive permission is not occupied. Therefore, the exclusive virtual machine's exclusive label can be added to the target virtual block, the standby virtual machine and the target virtual block are locked, and the standby virtual machine is assigned exclusive rights to the target virtual block, thereby realizing the virtual virtual machine to be taken over to the target virtual virtual machine. The exclusive right of the block is transferred to the standby virtual machine.

进一步地,请参照图2,在本申请虚拟机服务提供方法第一实施例的基础上,提出本申请虚拟机服务提供方法第二实施例,在第二实施例中,所述所述当接收到备用虚拟机所发送的接管请求时的步骤之前包括:Further, referring to FIG. 2, on the basis of the first embodiment of the virtual machine service providing method of the present application, a second embodiment of the virtual machine service providing method of the present application is proposed. In the second embodiment, the receiving Before the steps to the takeover request sent by the standby virtual machine include:

步骤S40,当接收到所述主虚拟机上传的异常日志时,根据所述异常日志中的服务信息确定所述主虚拟机当前所提供的服务类型标签;Step S40, when receiving the abnormality log uploaded by the primary virtual machine, determining, according to the service information in the abnormality log, a service type label currently provided by the primary virtual machine;

本实施例在主虚拟机与虚拟机集群之间设置日志上传机制,主虚拟机将其自身运行状态生成日志文件上传到虚拟机集群。其中日志文件包括表征主虚拟机故障的异常日志,且异常日志由生成的异常标签区分。当虚拟机集群接收到日志文件,并读取到日志文件携带有异常标签时,说明接收到主虚拟机上传的异常日志,主虚拟机出现故障,需要用备用虚拟机对主虚拟机的服务进行接管。考虑到主虚拟机当前所提供的服务有其自身的需求,如要求较好的显示功能、较快的读写速度等。为了使接管的备用虚拟机更好的满足服务需求,虚拟机集群中的不同虚拟机设置不同的性能,一些虚拟机设置较好的读写性能,而另一些虚拟机设置较好的显示性能。当主虚拟机出现故障时,根据其当前所提供的服务需求,为其匹配性能最为接近的虚拟机作为备用虚拟机进行接管。具体地,在主虚拟机出现故障时,抓取其当前所提供服务的服务信息生成异常日志,以根据异常日志中的服务信息确定主虚拟机当前所提供服务的需求。其中服务信息包括当前所提供服务的类型、接入此服务的用户量等信息;虚拟机集群读取此异常日志中的服务信息所表征的服务需求,根据其中所预设的服务需求与服务类型标签之间的对应关系,确定主虚拟机当前所提供的服务类型标签。如服务信息所表征的服务需求为:下载速度且用户量大;与此服务需求对应的服务类型标签为a1和a2,则将主虚拟机当前所提供的服务类型标签为a1和a2。In this embodiment, a log uploading mechanism is set between the primary virtual machine and the virtual machine cluster, and the primary virtual machine uploads a log file of its own running state to the virtual machine cluster. The log file includes an exception log that identifies the failure of the primary virtual machine, and the exception log is distinguished by the generated exception tag. When the VM cluster receives the log file and reads the log file that contains the abnormal tag, it indicates that the abnormal log uploaded by the primary VM is received. If the primary VM fails, you need to use the standby VM to service the VM. take over. Considering that the services currently provided by the primary virtual machine have their own requirements, such as requiring better display functions and faster read and write speeds. In order to make the standby virtual machine to better meet the service requirements, different virtual machines in the virtual machine cluster set different performances, some virtual machines set better read and write performance, and other virtual machines set better display performance. When the primary virtual machine fails, the virtual machine with the closest matching performance is taken over as the standby virtual machine according to the service demand it currently provides. Specifically, when the primary virtual machine fails, the service information of the service currently provided by the primary virtual machine is generated to generate an abnormality log, so as to determine the requirement of the service currently provided by the primary virtual machine according to the service information in the abnormality log. The service information includes information about the type of the service currently provided, the amount of users accessing the service, and the virtual machine cluster reads the service requirements represented by the service information in the abnormal log, according to the service requirements and service types preset therein. The correspondence between the tags determines the service type tag currently provided by the primary virtual machine. For example, the service requirements represented by the service information are: download speed and large amount of users; and the service type labels corresponding to the service requirements are a1 and a2, and the service types currently provided by the primary virtual machine are labeled as a1 and a2.

步骤S50,将所述服务类型标签和各虚拟机的属性标签匹配,生成各个匹配率,并确定所述各个匹配率中数值最大的目标匹配率;Step S50: Match the service type label and the attribute label of each virtual machine to generate each matching rate, and determine a target matching rate with the largest value among the respective matching rates;

进一步地,虚拟机集群中不同虚拟机的不同性能通过属性标签确定;如某一虚拟机所具有的性能为较快的上传性能和显示性能,则其属性标签为b1和c1;而另一虚拟机所具有的性能为较快的下载速度和显示性能,则其属性标签为a1和c1。在确定主虚拟机当前所提供的服务类型标签,即当前服务的服务需求后,将服务类型标签和各虚拟机的属性标签匹配,以确定与当前服务需求最为匹配的虚拟机。因虚拟机集群中具有多个虚拟机,需要将服务类型标签和各虚拟机的属性标签逐一匹配,生成各个匹配率。在生成各匹配率之后,将各匹配率的数值进行对比,确定匹配率数值中的最大值。此最大值的匹配率表示虚拟机性能与当前服务需求最为匹配,将其确定为目标匹配率。Further, different performances of different virtual machines in the virtual machine cluster are determined by attribute tags; if a virtual machine has faster upload performance and display performance, its attribute labels are b1 and c1; and another virtual The performance of the machine is faster download speed and display performance, then its attribute labels are a1 and c1. After determining the service type label currently provided by the primary virtual machine, that is, the service requirement of the current service, the service type label and the attribute label of each virtual machine are matched to determine the virtual machine that most closely matches the current service requirement. Because there are multiple virtual machines in the virtual machine cluster, you need to match the service type label and the attribute labels of each virtual machine one by one to generate each matching rate. After each matching rate is generated, the values of the matching rates are compared to determine the maximum value in the matching rate values. The match rate for this maximum indicates that the virtual machine performance best matches the current service demand and is determined as the target match rate.

步骤S60,确定与所述目标匹配率所对应属性标签,并将具有所述属性标签的虚拟机确定为备用虚拟机,向所述备用虚拟机发送提示信息,以供所述备用虚拟机基于提示信息发送接管请求。Step S60, determining an attribute tag corresponding to the target matching rate, and determining a virtual machine having the attribute tag as a standby virtual machine, and sending prompt information to the standby virtual machine, where the standby virtual machine is prompted according to the prompt The message is sent to take over the request.

更进一步地,因匹配率由服务类型标签与各虚拟机的属性标签匹配生成,在确定目标匹配率之后,即可确定生成此目标匹配率的虚拟机的属性标签,将具有此属性标签的虚拟机确定为备用虚拟机。此备用虚拟机所具有的性能与当前服务需求最为匹配,向其下发提示信息,提示信息中包括出现故障的主虚拟机信息。备用虚拟机根据提示信息向虚拟机集群发送接管请求,并将提示信息中的主虚拟机信息添加到接管请求中,以表征其所需要接管的主虚拟机。Further, since the matching rate is generated by matching the service type tag with the attribute tag of each virtual machine, after determining the target matching rate, the attribute tag of the virtual machine that generates the target matching rate can be determined, and the virtual tag with the attribute tag is The machine is determined to be a standby virtual machine. The performance of the standby virtual machine is the best match with the current service requirement, and the prompt information is sent to the prompt, and the prompt information includes the faulty primary virtual machine information. The standby virtual machine sends a takeover request to the virtual machine cluster according to the prompt information, and adds the primary virtual machine information in the prompt information to the takeover request to represent the primary virtual machine that it needs to take over.

进一步地,请参照图3,在本申请虚拟机服务提供方法第二实施例的基础上,提出本申请虚拟机服务提供方法第三实施例,在第三实施例中,所述将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机的步骤之后包括:Further, referring to FIG. 3, based on the second embodiment of the virtual machine service providing method of the present application, a third embodiment of the virtual machine service providing method of the present application is proposed. In the third embodiment, the After the step of transferring the exclusive right of the hosted virtual machine to the target virtual block to the standby virtual machine, the method includes:

步骤S70,接收所述主虚拟机上传的日志文件,并根据所述日志文件判断所述异常日志中的异常信息是否恢复正常;Step S70: Receive a log file uploaded by the primary virtual machine, and determine, according to the log file, whether abnormal information in the abnormal log returns to normal.

可理解地,在主虚拟机出现故障,将其当前所提供的服务切换到备用虚拟机之后,对此主虚拟机的故障点需要进行优化。在优化的过程中,主虚拟机仍然将其自身运行状态生成日志文件上传到虚拟机集群。虚拟机集群接收此主虚拟机上传的日志文件,并检测所上传的日志文件中是否包括异常日志,即检测日志文件中是否携带有异常标签,根据检测结果来判断异常日志中的异常信息是否恢复正常,即判断主虚拟机的故障是否恢复正常。Understandably, after the primary virtual machine fails and the services it currently provides are switched to the standby virtual machine, the failure point of the primary virtual machine needs to be optimized. During the optimization process, the primary virtual machine still uploads its own running state generation log file to the virtual machine cluster. The virtual machine cluster receives the log file uploaded by the primary virtual machine, and detects whether the abnormality log is included in the uploaded log file, that is, whether the abnormality label is carried in the log file, and whether the abnormal information in the abnormal log is restored according to the detection result. Normal, that is, whether the fault of the primary virtual machine is restored.

步骤S80,若所述异常日志中的异常信息恢复正常,将所述主虚拟机作为新的备用虚拟机。Step S80: If the abnormality information in the abnormality log returns to normal, the primary virtual machine is regarded as a new standby virtual machine.

当检测到日志文件中不携带有异常标签,则说明日志文件中不包括异常日志,异常日志中的异常信息恢复正常;即主虚拟机的故障恢复正常,将此主虚拟机作为新的备用虚拟机。在当前提供服务的备用虚拟机出现故障时,可用此新的备用虚拟机进行服务接管。而当检测到日志文件中仍然携带有异常标签,则说明日志文件中包括异常日志,异常日志中的异常信息没有恢复正常;即主虚拟机的故障没有恢复正常,不能将此主虚拟机作为新的备用虚拟机,直到异常日志中的异常信息恢复正常。If the abnormality label is not included in the log file, the abnormality log is not included in the log file. The abnormal information in the abnormal log is restored. That is, the fault of the primary VM is restored. The primary virtual machine is used as the new standby virtual machine. machine. This new standby virtual machine can be used for service takeover when the standby virtual machine currently providing the service fails. If the abnormality label is still included in the log file, the abnormality log is included in the log file. The abnormal information in the abnormal log is not restored. That is, the fault of the primary virtual machine is not restored. The primary virtual machine cannot be used as the new one. The standby virtual machine until the exception information in the exception log returns to normal.

进一步地,请参照图4,在本申请虚拟机服务提供方法第一、第二或第三实施例的基础上,提出本申请虚拟机服务提供方法第四实施例,在第四实施例中,所述向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限的步骤之后包括:Further, referring to FIG. 4, on the basis of the first, second or third embodiment of the virtual machine service providing method of the present application, a fourth embodiment of the virtual machine service providing method of the present application is proposed. In the fourth embodiment, The step of assigning the primary virtual machine exclusive rights to the target virtual block corresponding to the virtual block information includes:

步骤S90,读取所述加锁请求中的主虚拟机标识,并将所述主虚拟机标识添加到预设标识库;Step S90, reading the primary virtual machine identifier in the locking request, and adding the primary virtual machine identifier to the preset identifier library;

可理解地,虚拟机集群中所包括的主虚拟机众多,以通过不同的主虚拟机提供不同的服务。为了对主虚拟机和备用虚拟机进行区分,预先设置有预设标识库,且对各个主虚拟机分配有表征其唯一性的主虚拟机标识。主虚拟机所发送的加锁请求中携带有表征该加锁请求来源的主虚拟机标识,在向主虚拟机分配对虚拟块信息所对应的目标虚拟块的独占权限之后,读取加锁请求中的主虚拟机标识,并将此读取的主虚拟机标识添加到预设标识库,以表征此主虚拟机标识对应的主虚拟机正在提供服务。相应的当主虚拟机出现故障时,则需要将其对应的主虚拟机标识从预设标识库中删除;而将接管主虚拟机的备用虚拟机所具有的标识添加到预设标识库,对预设标识库进行更新。Understandably, the virtual machine cluster includes a large number of primary virtual machines to provide different services through different primary virtual machines. In order to distinguish between the primary virtual machine and the standby virtual machine, a preset identification library is preset, and each primary virtual machine is assigned a primary virtual machine identifier that is unique. The lock request sent by the primary virtual machine carries a primary virtual machine identifier that identifies the source of the lock request, and after the exclusive virtual machine is assigned exclusive rights to the target virtual block corresponding to the virtual block information, the lock request is read. The primary virtual machine ID in the middle, and the read primary virtual machine ID is added to the preset identity database to indicate that the primary virtual machine corresponding to the primary virtual machine identifier is providing services. Correspondingly, when the primary virtual machine fails, the corresponding primary virtual machine identifier needs to be deleted from the preset identifier library; and the identifier of the standby virtual machine that takes over the primary virtual machine is added to the preset identifier library, Set the identity library to update.

进一步地,在接收到备用虚拟机所发送的接管请求时,接管请求中携带有表征所需要接管的主虚拟机的主虚拟机信息,即根据接管请求中的主虚拟机信息,可确定待接管的主虚拟机,其具体的步骤包括:Further, when receiving the takeover request sent by the standby virtual machine, the takeover request carries the primary virtual machine information that represents the primary virtual machine that needs to be taken over, that is, according to the primary virtual machine information in the takeover request, the pending takeover can be determined. The main virtual machine, its specific steps include:

步骤S20-1,将所述接管请求中的主虚拟机信息和预设标识库对比,确定预设标识库中与所述主虚拟机信息一致的主虚拟机标识,并将所述主虚拟机标识对应的主虚拟机确定为所述待接管的主虚拟机。Step S20-1, comparing the primary virtual machine information in the takeover request with the preset identifier database, determining a primary virtual machine identifier in the preset identifier database that is consistent with the primary virtual machine information, and using the primary virtual machine identifier The primary virtual machine corresponding to the identifier is determined as the primary virtual machine to be taken over.

当主虚拟机出现故障,需要备用虚拟机接管时,向虚拟机集群发送接管请求,接管请求中携带有需要接管的主虚拟机信息。读取此主虚拟机信息,并将读取的主虚拟机信息和预设标识库对比,因当前提供服务的所有主虚拟机标识均存在与预设标识库中,从而预设标识库中必然存在与主虚拟机信息一致的主虚拟机标识,此主虚拟机标识所对应的主虚拟机即为有接管需求的主虚拟机。将此主虚拟机确定为待接管的主虚拟机,以便后续虚拟机集群将其对目标虚拟块的独占权限解除,并添加到备用虚拟机上,即实现将待接管的主虚拟机对目标虚拟块的独占权限转移至备用虚拟机。When the primary virtual machine fails and needs to be taken over by the standby virtual machine, the takeover request is sent to the virtual machine cluster, and the takeover request carries the information of the primary virtual machine that needs to be taken over. The information of the primary virtual machine is read, and the information of the primary virtual machine that is read is compared with the preset identification database. Because all the primary virtual machine identifiers of the currently provided service exist in the preset identifier database, the preset identifier library is inevitable. There is a primary virtual machine ID that is consistent with the information of the primary virtual machine. The primary virtual machine corresponding to the primary virtual machine identifier is the primary virtual machine that has the takeover requirement. The primary virtual machine is determined to be the primary virtual machine to be taken over, so that the subsequent virtual machine cluster can remove the exclusive right of the target virtual block and add it to the standby virtual machine, that is, the virtual virtual machine to be taken over is targeted to the target virtual machine. The exclusive right of the block is transferred to the standby virtual machine.

此外,请参照图5,本申请提供一种虚拟机服务提供装置,在本申请虚拟机服务提供装置第一实施例中,所述虚拟机服务提供装置包括:In addition, referring to FIG. 5, the present application provides a virtual machine service providing apparatus. In the first embodiment of the virtual machine service providing apparatus of the present application, the virtual machine service providing apparatus includes:

分配模块10,用于接收主虚拟机所发送的加锁请求,读取所述加锁请求中的加锁信息,并根据所述加锁信息中的虚拟块信息,向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限,以供所述主虚拟器提供服务;The allocating module 10 is configured to receive a lock request sent by the primary virtual machine, read the lock information in the lock request, and allocate the virtual lock information to the primary virtual machine according to the virtual block information in the lock information. Exclusive rights to the target virtual block corresponding to the virtual block information, for the primary virtual device to provide a service;

确定模块20,用于当接收到备用虚拟机所发送的接管请求时,根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机;The determining module 20 is configured to determine, according to the primary virtual machine information in the takeover request, the primary virtual machine to be taken over when receiving the takeover request sent by the standby virtual machine;

转移模块30,用于将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机,以供所述备用虚拟机提供服务。The transfer module 30 is configured to transfer the exclusive authority of the primary virtual machine to be taken over the target virtual block to the standby virtual machine, so that the standby virtual machine provides a service.

本实施例的虚拟机服务提供装置,当接收到主虚拟机所发送的加锁请求时,分配模块10读取加锁请求中的加锁信息,并根据加锁信息中的虚拟块信息,向主虚拟机分配对虚拟块信息所对应的目标虚拟块的独占权限,以由主虚拟器提供服务;而当接收到备用虚拟机所发送的接管请求时,确定模块20则根据接管请求中的主虚拟机信息,确定待接管的主虚拟机;转移模块30将所述待接管的主虚拟机对目标虚拟块的独占权限转移至备用虚拟机,以供备用虚拟机提供服务。本方案在由主虚拟机提供服务前,向主虚拟机分配对目标虚拟块的独占权限,只有主虚拟机可对目标虚拟块进行写操作;当服务提供由主虚拟机变换为备用虚拟机时,相应的将对目标虚拟块的独占权限转移至备用虚拟机,只有备用虚拟机可对目标虚拟块进行写操作;通过对目标虚拟块设置独占权限机制,确保同一时间只有提供服务的主虚拟机或者备用才能对目标虚拟块进行写操作,避免文件系统损坏。The virtual machine service providing apparatus of the embodiment, when receiving the lock request sent by the primary virtual machine, the allocation module 10 reads the lock information in the lock request, and according to the virtual block information in the lock information, The primary virtual machine allocates exclusive rights to the target virtual block corresponding to the virtual block information to be served by the primary virtual machine; and when receiving the takeover request sent by the standby virtual machine, the determining module 20 is based on the primary in the takeover request The virtual machine information determines the primary virtual machine to be taken over; the transfer module 30 transfers the exclusive authority of the primary virtual machine to be taken over the target virtual block to the standby virtual machine for the standby virtual machine to provide the service. The scheme allocates exclusive rights to the target virtual block to the primary virtual machine before the service is provided by the primary virtual machine, and only the primary virtual machine can write to the target virtual block; when the service provision is converted from the primary virtual machine to the standby virtual machine Correspondingly, the exclusive permission of the target virtual block is transferred to the standby virtual machine, and only the standby virtual machine can write to the target virtual block; by setting an exclusive permission mechanism for the target virtual block, it is ensured that only the primary virtual machine providing the service at the same time Or backup to write to the target virtual block to avoid file system corruption.

进一步地,在本申请虚拟机服务提供装置另一实施例中,所述分配模块包括:Further, in another embodiment of the virtual machine service providing apparatus of the present application, the allocating module includes:

判断单元,用于判断所述虚拟块信息所对应的目标虚拟块中是否存在其他虚拟机独占标签,若所述目标虚拟块中存在所述其他虚拟机独占标签,则判定向所述主虚拟机分配所述目标虚拟块独占权限失败;a determining unit, configured to determine whether there is another virtual machine exclusive label in the target virtual block corresponding to the virtual block information, and if the other virtual machine exclusive label exists in the target virtual block, determining to the primary virtual machine Assigning the target virtual block exclusive permission fails;

添加单元,用于若所述目标虚拟块中不存在所述其他虚拟机独占标签,则将所述主虚拟机的独占标签添加到所述目标虚拟块中,以向所述主虚拟机分配对目标虚拟块的独占权限。Adding a unit, if the other virtual machine exclusive label does not exist in the target virtual block, adding an exclusive label of the primary virtual machine to the target virtual block, to allocate a pair to the primary virtual machine Exclusive rights to the target virtual block.

进一步地,在本申请虚拟机服务提供装置另一实施例中,所述转移模块包括:Further, in another embodiment of the virtual machine service providing apparatus of the present application, the transfer module includes:

解除单元,用于将所述目标虚拟块中待接管的主虚拟机的独占标签擦除,以解除所述待接管的主虚拟机对所述目标虚拟块的独占权限;a releasing unit, configured to erase an exclusive label of the primary virtual machine to be taken over in the target virtual block, to release the exclusive authority of the primary virtual machine to be taken over to the target virtual block;

转移单元,用于将所述备用虚拟机的独占标签添加到所述目标虚拟块中,以将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机。And a transfer unit, configured to add an exclusive label of the standby virtual machine to the target virtual block, to transfer the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine.

进一步地,在本申请虚拟机服务提供装置另一实施例中,所述虚拟机服务提供装置还包括:Further, in another embodiment of the virtual machine service providing apparatus of the present application, the virtual machine service providing apparatus further includes:

接收模块,用于当接收到所述主虚拟机上传的异常日志时,根据所述异常日志中的服务信息确定所述主虚拟机当前所提供的服务类型标签;a receiving module, configured to determine, according to service information in the abnormality log, a service type label currently provided by the primary virtual machine, when receiving an abnormality log uploaded by the primary virtual machine;

匹配模块,用于将所述服务类型标签和各虚拟机的属性标签匹配,生成各个匹配率,并确定所述各个匹配率中数值最大的目标匹配率;a matching module, configured to match the service type label and the attribute label of each virtual machine, generate each matching rate, and determine a target matching rate with the largest value among the matching rates;

发送模块,用于确定与所述目标匹配率所对应属性标签,并将具有所述属性标签的虚拟机确定为备用虚拟机,向所述备用虚拟机发送提示信息,以供所述备用虚拟机基于提示信息发送接管请求。a sending module, configured to determine an attribute label corresponding to the target matching rate, and determine a virtual machine having the attribute label as a standby virtual machine, and send prompt information to the standby virtual machine for the standby virtual machine Send a takeover request based on the prompt information.

进一步地,在本申请虚拟机服务提供装置另一实施例中,所述虚拟机服务提供装置还包括:Further, in another embodiment of the virtual machine service providing apparatus of the present application, the virtual machine service providing apparatus further includes:

判断模块,用于接收所述主虚拟机上传的日志文件,并根据所述日志文件判断所述异常日志中的异常信息是否恢复正常;a determining module, configured to receive a log file uploaded by the primary virtual machine, and determine, according to the log file, whether abnormal information in the abnormal log returns to normal;

设定模块,用于若所述异常日志中的异常信息恢复正常,将所述主虚拟机作为新的备用虚拟机。And a setting module, configured to: if the abnormal information in the abnormality log returns to normal, use the primary virtual machine as a new standby virtual machine.

进一步地,在本申请虚拟机服务提供装置另一实施例中,所述虚拟机服务提供装置还包括:Further, in another embodiment of the virtual machine service providing apparatus of the present application, the virtual machine service providing apparatus further includes:

读取模块,用于读取加锁请求中的主虚拟机标识,并将所述主虚拟机标识添加到预设标识库;a reading module, configured to read the primary virtual machine identifier in the locking request, and add the primary virtual machine identifier to the preset identifier library;

所述确定模块包括:The determining module includes:

确定单元,用于将所述接管请求中的主虚拟机信息和预设标识库对比,确定预设标识库中与所述主虚拟机信息一致的主虚拟机标识,并将所述主虚拟机标识对应的主虚拟机确定为所述待接管的主虚拟机。a determining unit, configured to compare the primary virtual machine information in the takeover request with a preset identifier database, determine a primary virtual machine identifier in the preset identifier database that is consistent with the primary virtual machine information, and use the primary virtual machine identifier The primary virtual machine corresponding to the identifier is determined as the primary virtual machine to be taken over.

进一步地,在本申请虚拟机服务提供装置另一实施例中,所述分配模块包括:Further, in another embodiment of the virtual machine service providing apparatus of the present application, the allocating module includes:

接收单元,用于接收主虚拟机所发送的加锁请求,其中所述加锁请求由所述主虚拟机写入到预设层,再由所述主虚拟机对应监管中心从所述预设层中读取,经所述监管中心传递。a receiving unit, configured to receive a lock request sent by the primary virtual machine, where the lock request is written by the primary virtual machine to a preset layer, and then the preset corresponding to the primary virtual machine from the preset The layer is read and passed through the regulatory center.

需要说明的是,本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。It should be noted that those skilled in the art can understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable state. In the storage medium, the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

参照图6,图6是本申请实施例方法涉及的硬件运行环境的设备结构示意图。Referring to FIG. 6, FIG. 6 is a schematic structural diagram of a device in a hardware operating environment involved in a method according to an embodiment of the present application.

本申请实施例虚拟机服务提供设备可以是PC,也可以是智能手机、平板电脑、电子书阅读器、便携计算机等终端设备。The virtual machine service providing device in the embodiment of the present application may be a PC, or may be a terminal device such as a smart phone, a tablet computer, an e-book reader, or a portable computer.

如图6所示,该虚拟机服务提供设备可以包括:处理器1001,例如CPU,存储器1005,通信总线1002。其中,通信总线1002用于实现处理器1001和存储器1005之间的连接通信。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 6, the virtual machine service providing device may include a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to implement connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage. The memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.

可选地,该虚拟机服务提供设备还可以包括用户接口、网络接口、摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口还可以包括标准的有线接口、无线接口。网络接口可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。Optionally, the virtual machine service providing device may further include a user interface, a network interface, a camera, and an RF (Radio). Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more. The user interface may include a display, an input unit such as a keyboard, and the optional user interface may also include a standard wired interface, a wireless interface. The network interface can optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

本领域技术人员可以理解,图6中示出的虚拟机服务提供设备结构并不构成对虚拟机服务提供设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It will be understood by those skilled in the art that the virtual machine service providing device structure shown in FIG. 6 does not constitute a limitation of the virtual machine service providing device, and may include more or less components than those illustrated, or combine some components. Or different parts arrangement.

如图6所示,作为一种计算机计算机可读存储介质的存储器1005中可以包括操作系统、网络通信模块以及虚拟机服务提供程序。操作系统是管理和控制虚拟机服务提供设备硬件和软件资源的程序,支持虚拟机服务提供程序以及其它软件和/或程序的运行。网络通信模块用于实现存储器1005内部各组件之间的通信,以及与虚拟机服务提供设备中其它硬件和软件之间通信。As shown in FIG. 6, an operating system, a network communication module, and a virtual machine service provider may be included in the memory 1005 as a computer-readable storage medium. An operating system is a program that manages and controls virtual machine services to provide device hardware and software resources, and supports the operation of virtual machine service providers and other software and/or programs. The network communication module is used to implement communication between components within the memory 1005 and with other hardware and software in the virtual machine service providing device.

在图6所示的虚拟机服务提供设备中,处理器1001用于执行存储器1005中存储的虚拟机服务提供程序,实现上述虚拟机服务提供方法各实施例中的步骤。In the virtual machine service providing device shown in FIG. 6, the processor 1001 is configured to execute the virtual machine service provider stored in the memory 1005, and implement the steps in the foregoing embodiments of the virtual machine service providing method.

本申请提供了一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上程序,所述一个或者一个以上程序还可被一个或者一个以上的处理器执行以用于实现上述虚拟机服务提供方法各实施例中的步骤。The application provides a computer readable storage medium storing one or more programs, the one or more programs being further executable by one or more processors for implementing the above The virtual machine service provides the steps in the various embodiments of the method.

还需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is also to be understood that the term "comprises", "comprising", or any other variants thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a And includes other elements not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个计算机可读存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, portions of the technical solution of the present application that contribute substantially or to the prior art may be embodied in the form of a software product stored in a computer readable storage medium as described above (eg, The ROM/RAM, the magnetic disk, and the optical disk include a plurality of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in the various embodiments of the present application.

以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是在本申请的构思下,利用本申请说明书及附图内容所作的等效结构变换,或直接/间接运用在其他相关的技术领域均包括在本申请的专利保护范围内。The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the patents of the present application, and the equivalent structural transformations made by the contents of the specification and the drawings of the present application, or directly/indirectly Other related technical fields are included in the patent protection scope of the present application.

Claims (20)

一种虚拟机服务提供方法,其特征在于,所述虚拟机服务提供方法包括以下步骤: A virtual machine service providing method, characterized in that the virtual machine service providing method comprises the following steps: 接收主虚拟机所发送的加锁请求,读取所述加锁请求中的加锁信息,并根据所述加锁信息中的虚拟块信息,向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限,以供所述主虚拟器提供服务;Receiving a lock request sent by the primary virtual machine, reading the lock information in the lock request, and assigning the virtual block information to the primary virtual machine according to the virtual block information in the lock information Exclusive rights of the corresponding target virtual block for the primary virtual device to provide services; 当接收到备用虚拟机所发送的接管请求时,根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机;When receiving the takeover request sent by the standby virtual machine, determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request; 将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机,以供所述备用虚拟机提供服务。Transferring exclusive rights of the to-be-managed primary virtual machine to the target virtual block to the standby virtual machine for the backup virtual machine to provide services. 如权利要求1所述的虚拟机服务提供方法,其特征在于,所述向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限的步骤包括:The virtual machine service providing method according to claim 1, wherein the step of assigning the primary virtual machine exclusive rights to the target virtual block corresponding to the virtual block information comprises: 判断所述虚拟块信息所对应的目标虚拟块中是否存在其他虚拟机独占标签,若所述目标虚拟块中存在所述其他虚拟机独占标签,则判定向所述主虚拟机分配所述目标虚拟块独占权限失败;Determining whether there is another virtual machine exclusive tag in the target virtual block corresponding to the virtual block information, and if the other virtual machine exclusive tag exists in the target virtual block, determining to allocate the target virtual to the primary virtual machine Block exclusive permission failed; 若所述目标虚拟块中不存在所述其他虚拟机独占标签,则将所述主虚拟机的独占标签添加到所述目标虚拟块中,以向所述主虚拟机分配对目标虚拟块的独占权限。If the other virtual machine exclusive label does not exist in the target virtual block, adding an exclusive label of the primary virtual machine to the target virtual block to allocate exclusive to the target virtual block to the primary virtual machine Permissions. 如权利要求2所述的虚拟机服务提供方法,其特征在于,所述将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机的步骤包括:The virtual machine service providing method according to claim 2, wherein the step of transferring the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine comprises: 将所述目标虚拟块中待接管的主虚拟机的独占标签擦除,以解除所述待接管的主虚拟机对所述目标虚拟块的独占权限;Erasing an exclusive label of the primary virtual machine to be taken over in the target virtual block to release the exclusive authority of the primary virtual machine to be taken over to the target virtual block; 将所述备用虚拟机的独占标签添加到所述目标虚拟块中,以将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机。Adding an exclusive label of the standby virtual machine to the target virtual block to transfer exclusive rights of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine. 如权利要求1所述的虚拟机服务提供方法,其特征在于,所述当接收到备用虚拟机所发送的接管请求时的步骤之前包括:The virtual machine service providing method according to claim 1, wherein the step of receiving the takeover request sent by the standby virtual machine comprises: 当接收到所述主虚拟机上传的异常日志时,根据所述异常日志中的服务信息确定所述主虚拟机当前所提供的服务类型标签;Determining, according to the service information in the abnormality log, a service type label currently provided by the primary virtual machine, when receiving the abnormality log uploaded by the primary virtual machine; 将所述服务类型标签和各虚拟机的属性标签匹配,生成各个匹配率,并确定所述各个匹配率中数值最大的目标匹配率;Matching the service type label and the attribute label of each virtual machine to generate each matching rate, and determining a target matching rate with the largest value among the respective matching rates; 确定与所述目标匹配率所对应属性标签,并将具有所述属性标签的虚拟机确定为备用虚拟机,向所述备用虚拟机发送提示信息,以供所述备用虚拟机基于提示信息发送接管请求。Determining an attribute tag corresponding to the target matching rate, and determining a virtual machine having the attribute tag as a standby virtual machine, and sending prompt information to the standby virtual machine, where the standby virtual machine sends a takeover based on the prompt information. request. 如权利要求4所述的虚拟机服务提供方法,其特征在于,所述将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机的步骤之后包括:The virtual machine service providing method according to claim 4, wherein the step of transferring the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine comprises: 接收所述主虚拟机上传的日志文件,并根据所述日志文件判断所述异常日志中的异常信息是否恢复正常;Receiving a log file uploaded by the primary virtual machine, and determining, according to the log file, whether the abnormal information in the abnormal log returns to normal; 若所述异常日志中的异常信息恢复正常,将所述主虚拟机作为新的备用虚拟机。If the abnormality information in the abnormality log returns to normal, the primary virtual machine is regarded as a new standby virtual machine. 如权利要求1所述的虚拟机服务提供方法,其特征在于,所述向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限的步骤之后包括:The virtual machine service providing method according to claim 1, wherein the step of assigning the primary virtual machine exclusive rights to the target virtual block corresponding to the virtual block information comprises: 读取所述加锁请求中的主虚拟机标识,并将所述主虚拟机标识添加到预设标识库;Reading the primary virtual machine identifier in the locking request, and adding the primary virtual machine identifier to the preset identifier library; 所述根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机的步骤包括:The step of determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request includes: 将所述接管请求中的主虚拟机信息和预设标识库对比,确定预设标识库中与所述主虚拟机信息一致的主虚拟机标识,并将所述主虚拟机标识对应的主虚拟机确定为所述待接管的主虚拟机。Comparing the primary virtual machine information in the takeover request with the preset identifier database, determining a primary virtual machine identifier in the preset identifier database that is consistent with the primary virtual machine information, and associating the primary virtual machine identifier with the primary virtual machine identifier The machine is determined to be the primary virtual machine to be taken over. 如权利要求1所述的虚拟机服务提供方法,其特征在于,所述接收主虚拟机所发送的加锁请求的步骤包括:The virtual machine service providing method according to claim 1, wherein the step of receiving a lock request sent by the primary virtual machine comprises: 接收主虚拟机所发送的加锁请求,其中所述加锁请求由所述主虚拟机写入到预设层,再由所述主虚拟机对应监管中心从所述预设层中读取,经所述监管中心传递。Receiving a lock request sent by the primary virtual machine, where the lock request is written by the primary virtual machine to a preset layer, and then read by the primary virtual machine corresponding supervision center from the preset layer, Passed through the regulatory center. 一种虚拟机服务提供装置,其特征在于,所述虚拟机服务提供装置包括:A virtual machine service providing apparatus, wherein the virtual machine service providing apparatus includes: 分配模块,用于接收主虚拟机所发送的加锁请求,读取所述加锁请求中的加锁信息,并根据所述加锁信息中的虚拟块信息,向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限,以供所述主虚拟器提供服务;An allocating module, configured to receive a lock request sent by the primary virtual machine, read the lock information in the lock request, and allocate a pair to the primary virtual machine according to the virtual block information in the lock information An exclusive right of the target virtual block corresponding to the virtual block information, for the primary virtual device to provide a service; 确定模块,用于当接收到备用虚拟机所发送的接管请求时,根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机;a determining module, configured to determine, according to the primary virtual machine information in the takeover request, the primary virtual machine to be taken over when receiving the takeover request sent by the standby virtual machine; 转移模块,用于将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机,以供所述备用虚拟机提供服务。And a transfer module, configured to transfer exclusive rights of the host virtual machine to be taken over the target virtual block to the standby virtual machine, to provide services for the standby virtual machine. 一种虚拟机服务提供设备,其特征在于,所述虚拟机服务提供设备包括:存储器、处理器、通信总线以及存储在所述存储器上的虚拟机服务提供程序;A virtual machine service providing device, the virtual machine service providing device comprising: a memory, a processor, a communication bus, and a virtual machine service provider stored on the memory; 所述通信总线用于实现处理器和存储器之间的连接通信;The communication bus is used to implement connection communication between a processor and a memory; 所述处理器用于执行所述虚拟机服务提供程序,以实现以下步骤:The processor is configured to execute the virtual machine service provider to implement the following steps: 接收主虚拟机所发送的加锁请求,读取所述加锁请求中的加锁信息,并根据所述加锁信息中的虚拟块信息,向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限,以供所述主虚拟器提供服务;Receiving a lock request sent by the primary virtual machine, reading the lock information in the lock request, and assigning the virtual block information to the primary virtual machine according to the virtual block information in the lock information Exclusive rights of the corresponding target virtual block for the primary virtual device to provide services; 当接收到备用虚拟机所发送的接管请求时,根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机;When receiving the takeover request sent by the standby virtual machine, determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request; 将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机,以供所述备用虚拟机提供服务。Transferring exclusive rights of the to-be-managed primary virtual machine to the target virtual block to the standby virtual machine for the backup virtual machine to provide services. 如权利要求9所述的虚拟机服务提供设备,其特征在于,所述向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限的步骤包括:The virtual machine service providing device according to claim 9, wherein the step of assigning the primary virtual machine exclusive rights to the target virtual block corresponding to the virtual block information comprises: 判断所述虚拟块信息所对应的目标虚拟块中是否存在其他虚拟机独占标签,若所述目标虚拟块中存在所述其他虚拟机独占标签,则判定向所述主虚拟机分配所述目标虚拟块独占权限失败;Determining whether there is another virtual machine exclusive tag in the target virtual block corresponding to the virtual block information, and if the other virtual machine exclusive tag exists in the target virtual block, determining to allocate the target virtual to the primary virtual machine Block exclusive permission failed; 若所述目标虚拟块中不存在所述其他虚拟机独占标签,则将所述主虚拟机的独占标签添加到所述目标虚拟块中,以向所述主虚拟机分配对目标虚拟块的独占权限。If the other virtual machine exclusive label does not exist in the target virtual block, adding an exclusive label of the primary virtual machine to the target virtual block to allocate exclusive to the target virtual block to the primary virtual machine Permissions. 如权利要求10所述的虚拟机服务提供设备,其特征在于,所述将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机的步骤包括:The virtual machine service providing device according to claim 10, wherein the step of transferring the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine comprises: 将所述目标虚拟块中待接管的主虚拟机的独占标签擦除,以解除所述待接管的主虚拟机对所述目标虚拟块的独占权限;Erasing an exclusive label of the primary virtual machine to be taken over in the target virtual block to release the exclusive authority of the primary virtual machine to be taken over to the target virtual block; 将所述备用虚拟机的独占标签添加到所述目标虚拟块中,以将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机。Adding an exclusive label of the standby virtual machine to the target virtual block to transfer exclusive rights of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine. 如权利要求9所述的虚拟机服务提供设备,其特征在于,所述当接收到备用虚拟机所发送的接管请求时的步骤之前包括:The virtual machine service providing device according to claim 9, wherein the step of receiving the takeover request sent by the standby virtual machine comprises: 当接收到所述主虚拟机上传的异常日志时,根据所述异常日志中的服务信息确定所述主虚拟机当前所提供的服务类型标签;Determining, according to the service information in the abnormality log, a service type label currently provided by the primary virtual machine, when receiving the abnormality log uploaded by the primary virtual machine; 将所述服务类型标签和各虚拟机的属性标签匹配,生成各个匹配率,并确定所述各个匹配率中数值最大的目标匹配率;Matching the service type label and the attribute label of each virtual machine to generate each matching rate, and determining a target matching rate with the largest value among the respective matching rates; 确定与所述目标匹配率所对应属性标签,并将具有所述属性标签的虚拟机确定为备用虚拟机,向所述备用虚拟机发送提示信息,以供所述备用虚拟机基于提示信息发送接管请求。Determining an attribute tag corresponding to the target matching rate, and determining a virtual machine having the attribute tag as a standby virtual machine, and sending prompt information to the standby virtual machine, where the standby virtual machine sends a takeover based on the prompt information. request. 如权利要求12所述的虚拟机服务提供设备,其特征在于,所述将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机的步骤之后包括:The virtual machine service providing device according to claim 12, wherein the step of transferring the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine comprises: 接收所述主虚拟机上传的日志文件,并根据所述日志文件判断所述异常日志中的异常信息是否恢复正常;Receiving a log file uploaded by the primary virtual machine, and determining, according to the log file, whether the abnormal information in the abnormal log returns to normal; 若所述异常日志中的异常信息恢复正常,将所述主虚拟机作为新的备用虚拟机。If the abnormality information in the abnormality log returns to normal, the primary virtual machine is regarded as a new standby virtual machine. 如权利要求9所述的虚拟机服务提供设备,其特征在于,所述向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限的步骤之后包括:The virtual machine service providing device according to claim 9, wherein the step of assigning the primary virtual machine exclusive rights to the target virtual block corresponding to the virtual block information comprises: 读取所述加锁请求中的主虚拟机标识,并将所述主虚拟机标识添加到预设标识库;Reading the primary virtual machine identifier in the locking request, and adding the primary virtual machine identifier to the preset identifier library; 所述根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机的步骤包括:The step of determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request includes: 将所述接管请求中的主虚拟机信息和预设标识库对比,确定预设标识库中与所述主虚拟机信息一致的主虚拟机标识,并将所述主虚拟机标识对应的主虚拟机确定为所述待接管的主虚拟机。Comparing the primary virtual machine information in the takeover request with the preset identifier database, determining a primary virtual machine identifier in the preset identifier database that is consistent with the primary virtual machine information, and associating the primary virtual machine identifier with the primary virtual machine identifier The machine is determined to be the primary virtual machine to be taken over. 一种计算机可读存储介质,其特征在于,所述计算机可读计算机可读存储介质上存储有虚拟机服务提供程序,所述虚拟机服务提供程序被处理器执行,以实现以下步骤:A computer readable storage medium, wherein the computer readable storage medium stores a virtual machine service provider, the virtual machine service provider being executed by a processor to implement the following steps: 接收主虚拟机所发送的加锁请求,读取所述加锁请求中的加锁信息,并根据所述加锁信息中的虚拟块信息,向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限,以供所述主虚拟器提供服务;Receiving a lock request sent by the primary virtual machine, reading the lock information in the lock request, and assigning the virtual block information to the primary virtual machine according to the virtual block information in the lock information Exclusive rights of the corresponding target virtual block for the primary virtual device to provide services; 当接收到备用虚拟机所发送的接管请求时,根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机;When receiving the takeover request sent by the standby virtual machine, determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request; 将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机,以供所述备用虚拟机提供服务。Transferring exclusive rights of the to-be-managed primary virtual machine to the target virtual block to the standby virtual machine for the backup virtual machine to provide services. 如权利要求15所述的计算机可读存储介质,其特征在于,所述向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限的步骤包括:The computer readable storage medium according to claim 15, wherein the step of assigning the primary virtual machine exclusive rights to the target virtual block corresponding to the virtual block information comprises: 判断所述虚拟块信息所对应的目标虚拟块中是否存在其他虚拟机独占标签,若所述目标虚拟块中存在所述其他虚拟机独占标签,则判定向所述主虚拟机分配所述目标虚拟块独占权限失败;Determining whether there is another virtual machine exclusive tag in the target virtual block corresponding to the virtual block information, and if the other virtual machine exclusive tag exists in the target virtual block, determining to allocate the target virtual to the primary virtual machine Block exclusive permission failed; 若所述目标虚拟块中不存在所述其他虚拟机独占标签,则将所述主虚拟机的独占标签添加到所述目标虚拟块中,以向所述主虚拟机分配对目标虚拟块的独占权限。If the other virtual machine exclusive label does not exist in the target virtual block, adding an exclusive label of the primary virtual machine to the target virtual block to allocate exclusive to the target virtual block to the primary virtual machine Permissions. 如权利要求16所述的计算机可读存储介质,其特征在于,所述将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机的步骤包括:The computer readable storage medium according to claim 16, wherein the step of transferring the exclusive authority of the host virtual machine to be taken over the target virtual block to the standby virtual machine comprises: 将所述目标虚拟块中待接管的主虚拟机的独占标签擦除,以解除所述待接管的主虚拟机对所述目标虚拟块的独占权限;Erasing an exclusive label of the primary virtual machine to be taken over in the target virtual block to release the exclusive authority of the primary virtual machine to be taken over to the target virtual block; 将所述备用虚拟机的独占标签添加到所述目标虚拟块中,以将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机。Adding an exclusive label of the standby virtual machine to the target virtual block to transfer exclusive rights of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine. 如权利要求15所述的计算机可读存储介质,其特征在于,所述当接收到备用虚拟机所发送的接管请求时的步骤之前包括:The computer readable storage medium of claim 15, wherein the step of receiving the takeover request sent by the standby virtual machine comprises: 当接收到所述主虚拟机上传的异常日志时,根据所述异常日志中的服务信息确定所述主虚拟机当前所提供的服务类型标签;Determining, according to the service information in the abnormality log, a service type label currently provided by the primary virtual machine, when receiving the abnormality log uploaded by the primary virtual machine; 将所述服务类型标签和各虚拟机的属性标签匹配,生成各个匹配率,并确定所述各个匹配率中数值最大的目标匹配率;Matching the service type label and the attribute label of each virtual machine to generate each matching rate, and determining a target matching rate with the largest value among the respective matching rates; 确定与所述目标匹配率所对应属性标签,并将具有所述属性标签的虚拟机确定为备用虚拟机,向所述备用虚拟机发送提示信息,以供所述备用虚拟机基于提示信息发送接管请求。Determining an attribute tag corresponding to the target matching rate, and determining a virtual machine having the attribute tag as a standby virtual machine, and sending prompt information to the standby virtual machine, where the standby virtual machine sends a takeover based on the prompt information. request. 如权利要求18所述的计算机可读存储介质,其特征在于,所述将所述待接管的主虚拟机对所述目标虚拟块的独占权限转移至所述备用虚拟机的步骤之后包括:The computer readable storage medium according to claim 18, wherein the step of transferring the exclusive authority of the to-be-taken primary virtual machine to the target virtual block to the standby virtual machine comprises: 接收所述主虚拟机上传的日志文件,并根据所述日志文件判断所述异常日志中的异常信息是否恢复正常;Receiving a log file uploaded by the primary virtual machine, and determining, according to the log file, whether the abnormal information in the abnormal log returns to normal; 若所述异常日志中的异常信息恢复正常,将所述主虚拟机作为新的备用虚拟机。If the abnormality information in the abnormality log returns to normal, the primary virtual machine is regarded as a new standby virtual machine. 如权利要求15所述的计算机可读存储介质,其特征在于,所述向所述主虚拟机分配对所述虚拟块信息所对应的目标虚拟块的独占权限的步骤之后包括:The computer readable storage medium according to claim 15, wherein the step of assigning the primary virtual machine exclusive rights to the target virtual block corresponding to the virtual block information comprises: 读取所述加锁请求中的主虚拟机标识,并将所述主虚拟机标识添加到预设标识库;Reading the primary virtual machine identifier in the locking request, and adding the primary virtual machine identifier to the preset identifier library; 所述根据所述接管请求中的主虚拟机信息,确定待接管的主虚拟机的步骤包括:The step of determining the primary virtual machine to be taken over according to the primary virtual machine information in the takeover request includes: 将所述接管请求中的主虚拟机信息和预设标识库对比,确定预设标识库中与所述主虚拟机信息一致的主虚拟机标识,并将所述主虚拟机标识对应的主虚拟机确定为所述待接管的主虚拟机。 Comparing the primary virtual machine information in the takeover request with the preset identifier database, determining a primary virtual machine identifier in the preset identifier database that is consistent with the primary virtual machine information, and associating the primary virtual machine identifier with the primary virtual machine identifier The machine is determined to be the primary virtual machine to be taken over.
PCT/CN2018/093149 2018-04-27 2018-06-27 Virtual machine service providing method, device and equipment and computer readable storage medium Ceased WO2019205272A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810397142.4A CN108614728A (en) 2018-04-27 2018-04-27 Virtual machine service providing method, device, equipment and computer readable storage medium
CN201810397142.4 2018-04-27

Publications (1)

Publication Number Publication Date
WO2019205272A1 true WO2019205272A1 (en) 2019-10-31

Family

ID=63661178

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/093149 Ceased WO2019205272A1 (en) 2018-04-27 2018-06-27 Virtual machine service providing method, device and equipment and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN108614728A (en)
WO (1) WO2019205272A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306762A (en) * 2020-10-30 2021-02-02 西安万像电子科技有限公司 Communication processing method, device and system, and non-volatile storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111142777A (en) * 2018-11-03 2020-05-12 广州市明领信息科技有限公司 Big data storage system
CN109814979B (en) * 2018-12-17 2021-03-30 华为技术有限公司 Data loading method and device, computer equipment and readable storage medium
CN112181593A (en) * 2020-09-27 2021-01-05 北京首都在线科技股份有限公司 Virtual machine scheduling method, device, equipment and storage medium
CN112527205B (en) * 2020-12-16 2024-12-06 江苏国科微电子有限公司 Data security protection method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063338A (en) * 2010-12-28 2011-05-18 华为技术有限公司 Method and device for requesting exclusive resource
CN103309698A (en) * 2012-03-16 2013-09-18 鸿富锦精密工业(深圳)有限公司 Virtual machine memory managing system and method
US20140173595A1 (en) * 2012-12-17 2014-06-19 International Business Machines Corporation Hybrid virtual machine configuration management
CN107391224A (en) * 2017-06-09 2017-11-24 华为技术有限公司 A kind of creation method of virtual volume, hanging method and device
CN107402820A (en) * 2017-08-10 2017-11-28 郑州云海信息技术有限公司 The management method and device of resource in cloud computing system
CN107526653A (en) * 2017-07-31 2017-12-29 华为技术有限公司 The management method and server of a kind of virtual machine

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7181744B2 (en) * 2002-10-24 2007-02-20 International Business Machines Corporation System and method for transferring data between virtual machines or other computer entities
CN103338241B (en) * 2013-06-19 2016-08-10 合肥工业大学 A kind of new publicly-owned cloud framework and virtual resources adaptive configuring method thereof
CN104281496B (en) * 2014-10-27 2018-02-02 深圳中兴网信科技有限公司 The distribution method and distributor of virtual resource
CN107704314B (en) * 2017-11-09 2023-09-12 北京百度网讯科技有限公司 Method and apparatus for migrating virtual machines

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102063338A (en) * 2010-12-28 2011-05-18 华为技术有限公司 Method and device for requesting exclusive resource
CN103309698A (en) * 2012-03-16 2013-09-18 鸿富锦精密工业(深圳)有限公司 Virtual machine memory managing system and method
US20140173595A1 (en) * 2012-12-17 2014-06-19 International Business Machines Corporation Hybrid virtual machine configuration management
CN107391224A (en) * 2017-06-09 2017-11-24 华为技术有限公司 A kind of creation method of virtual volume, hanging method and device
CN107526653A (en) * 2017-07-31 2017-12-29 华为技术有限公司 The management method and server of a kind of virtual machine
CN107402820A (en) * 2017-08-10 2017-11-28 郑州云海信息技术有限公司 The management method and device of resource in cloud computing system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306762A (en) * 2020-10-30 2021-02-02 西安万像电子科技有限公司 Communication processing method, device and system, and non-volatile storage medium

Also Published As

Publication number Publication date
CN108614728A (en) 2018-10-02

Similar Documents

Publication Publication Date Title
WO2019205272A1 (en) Virtual machine service providing method, device and equipment and computer readable storage medium
WO2017088664A1 (en) Data processing method and apparatus for cluster file system
WO2019227557A1 (en) Key management method, device, storage medium and apparatus
WO2017190450A1 (en) Process closing method and apparatus
WO2018028121A1 (en) Method and device for managing storage space of data partition
WO2018233370A1 (en) Mirror synchronization method, system, device and computer readable storage medium
WO2018076812A1 (en) Data request response method and device, storage medium, server and system
WO2013131444A1 (en) Content sharing method, terminal, server, and system, and computer storage medium
WO2021157934A1 (en) Apparatus and method for generating network slice in wireless communication system
WO2018053963A1 (en) Method and apparatus for upgrading system of smart television
WO2020224247A1 (en) Blockchain–based data provenance method, apparatus and device, and readable storage medium
WO2015106497A1 (en) Dynamic interrupt balanced mapping method based on current vcpu scheduling state
WO2018120680A1 (en) Virtual disk backup system, method, apparatus, service host and storage medium
WO2018040421A1 (en) Resource sharing method, apparatus, and system
WO2021080385A1 (en) Computing device and operating method thereof
WO2018233369A1 (en) Virtual disk writing method and device based on copy-on-write, storage medium
WO2018076811A1 (en) Data sharing method, device, system, storage medium and electronic device
WO2018090452A1 (en) Method and apparatus for protecting root permission
WO2018014567A1 (en) Method for improving performance of virtual machine, and terminal, device and computer-readable storage medium
WO2017063366A1 (en) Method and system for starting application
WO2019062109A1 (en) Method of mounting disk array, android device and storage medium
WO2019127869A1 (en) Vulnerability information collection method, apparatus and device, and readable storage medium
WO2018010157A1 (en) Method and device for automatic allocation of ip addresses
WO2019019249A1 (en) Method, apparatus and device for executing network request, and computer-readable storage medium
WO2019080401A1 (en) Method and apparatus for converting script statement, and computer-readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18916162

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 03.02.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18916162

Country of ref document: EP

Kind code of ref document: A1