CN117453457A - Virtual machine backup method and device, intelligent network card and computer readable storage medium - Google Patents

Virtual machine backup method and device, intelligent network card and computer readable storage medium Download PDF

Info

Publication number
CN117453457A
CN117453457A CN202311458779.7A CN202311458779A CN117453457A CN 117453457 A CN117453457 A CN 117453457A CN 202311458779 A CN202311458779 A CN 202311458779A CN 117453457 A CN117453457 A CN 117453457A
Authority
CN
China
Prior art keywords
virtual machine
backup
server
abnormal
network card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311458779.7A
Other languages
Chinese (zh)
Inventor
汪伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202311458779.7A priority Critical patent/CN117453457A/en
Publication of CN117453457A publication Critical patent/CN117453457A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

The invention relates to the technical field of data communication, and provides a virtual machine backup method, a device, an intelligent network card and a computer readable storage medium, which are applied to the intelligent network card, wherein the intelligent network card is installed on a server, and at least one virtual machine is operated on the server, and the method comprises the following steps: receiving an abnormal backup instruction aiming at any virtual machine, wherein the abnormal backup instruction is used for carrying out backup processing on the virtual machine when communication between a server and a remote server for backing up the virtual machine is abnormal; and based on the abnormal backup instruction, the virtual machine is backed up by utilizing a communication channel between the pre-configured virtual machine and the server. The invention can still improve the reliability of the virtual machine to the greatest extent when the communication between the host machine of the virtual machine and the remote server for backing up the virtual machine is abnormal.

Description

Virtual machine backup method and device, intelligent network card and computer readable storage medium
Technical Field
The present invention relates to the field of data communications technologies, and in particular, to a virtual machine backup method, a device, an intelligent network card, and a computer readable storage medium.
Background
With the development of data centers, the CPU computing power of the server becomes a service deployment bottleneck gradually, so that the intelligent network card is introduced to release the computing power of the server. The intelligent network card can bear the services of network unloading, storage, security and the like.
With the development of cloud computing technology, 5G, artificial intelligence, edge computing and other next generation information technologies, the demands of people for virtualization technologies are also increasing. Typically, in order to relieve the stress of the physical servers of the computing nodes, the virtual machine data files are mounted to a third party storage for backup.
When the virtual machine is damaged due to some reasons and data recovery is needed to be carried out on the virtual machine, a backup server or a network fails, and a virtual machine backup or recovery task related to the backup server cannot be carried out; or because the performance bottleneck of a single backup server excessively occupies network resources and CPU resources of the backup server, the virtual machine can not be backed up and restored quickly, the reliability of the virtual machine is greatly influenced, and the reliability of the server is further influenced.
Disclosure of Invention
The invention aims to provide a virtual machine backup method, a device, an intelligent network card and a computer readable storage medium, which can still improve the reliability of a virtual machine to the greatest extent when communication between a host machine of the virtual machine and a remote server for backing up the virtual machine is abnormal.
Embodiments of the invention may be implemented as follows:
in a first aspect, the present invention provides a virtual machine backup method applied to an intelligent network card, where the intelligent network card is installed on a server, and at least one virtual machine is running on the server, and the method includes:
receiving an abnormal backup instruction aiming at any virtual machine, wherein the abnormal backup instruction is used for carrying out backup processing on the virtual machine when communication between the server and a remote server for backing up the virtual machine is abnormal;
and based on the abnormal backup instruction, backing up the virtual machine by utilizing a communication channel between the server and the preset communication channel.
In an optional implementation manner, the intelligent network card is pre-allocated with a corresponding virtual device for the virtual machine, and the step of backing up the virtual machine by using a pre-configured communication channel with the server based on the abnormal backup instruction includes:
acquiring the flow of a message processed by the virtual virtio device in a preset period;
and if the flow is greater than a preset value, backing up the virtual machine by utilizing the communication channel.
In an alternative embodiment, the virtual device includes a virtual-net device and a virtual-blk device, where the virtual-net device is used to process a message that is communicated with the virtual machine, and the virtual-blk device is used to process a message that accesses data stored in the virtual machine, and the method further includes:
if the flow of the message processed by the virtio-net device is larger than a first preset value or the flow of the message processed by the virtio-blk device is larger than a second preset value, judging that the flow is larger than the preset value.
In an optional implementation manner, the manner of backing up the virtual machine to the intelligent network card includes snapshot backup and clone backup, and before the step of backing up the virtual machine by using a pre-configured communication channel with the server based on the abnormal backup instruction, the method further includes:
acquiring the state of the virtual machine from the server by utilizing the communication channel;
and if the state of the virtual machine is the starting state, setting the backup mode as snapshot backup, otherwise setting the backup mode as clone backup so as to backup the virtual machine according to the set backup mode.
In an alternative embodiment, the method further comprises:
receiving an abnormality recovery instruction for the virtual machine, wherein the abnormality recovery instruction is used for recovering the virtual machine when communication between the server and a remote server for backing up the virtual machine is abnormal;
and carrying out recovery processing on the virtual machine based on the abnormal recovery instruction.
In an optional embodiment, the step of performing recovery processing on the virtual machine based on the exception recovery instruction includes:
based on the abnormal recovery instruction, the virtual machine on the intelligent network card is provided for the server in a sharing storage mode, so that the server provides services provided by the virtual machine through the virtual machine on the intelligent network card.
In a second aspect, the present invention provides a virtual machine backup device applied to an intelligent network card, where the intelligent network card is installed on a server, and at least one virtual machine is running on the server, and the device includes:
the receiving module is used for receiving an abnormal backup instruction aiming at any virtual machine, and the abnormal backup instruction is used for carrying out backup processing on the virtual machine when communication between the server and a remote server for backing up the virtual machine is abnormal;
and the backup module is used for backing up the virtual machine by utilizing a pre-configured communication channel between the virtual machine and the server based on the abnormal backup instruction.
In an optional embodiment, the intelligent network card is pre-allocated with a corresponding virtual device for the virtual machine, and the backup module is specifically configured to:
acquiring the flow of a message processed by the virtual virtio device in a preset period;
and if the flow is greater than a preset value, backing up the virtual machine by utilizing the communication channel.
In a third aspect, the present invention provides an intelligent network card, including a processor and a memory, where the memory is configured to store a program, and the processor is configured to implement the virtual machine backup method according to any one of the foregoing embodiments when executing the program.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the virtual machine backup method of any of the foregoing embodiments.
Compared with the prior art, the virtual machine backup method, the device, the intelligent network card and the computer readable storage medium provided by the embodiment adopt an abnormal backup instruction when communication between the server running the virtual machine and the remote server for backing up the virtual machine is abnormal, backup the virtual machine by utilizing a communication channel between the intelligent network card and the server which are configured in advance, and the reliability of virtual machine backup under abnormal conditions is improved by utilizing the intelligent network card to backup the virtual machine.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an exemplary diagram of an application scenario provided in this embodiment.
Fig. 2 is a block diagram of an intelligent network card according to the present embodiment.
Fig. 3 is a flowchart illustrating a virtual machine backup method according to the present embodiment.
Fig. 4 is a block diagram illustrating a virtual machine backup apparatus according to this embodiment.
Icon: 10-an intelligent network card; 11-a processor; 12-memory; 13-bus; 20-a server; 30-a backup server; 100-a virtual machine backup device; 110-a receiving module; 120-a backup module; 130-a configuration module; 140-a recovery module.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
In the description of the present invention, it should be noted that, if the terms "upper", "lower", "inner", "outer", and the like indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, or the azimuth or the positional relationship in which the inventive product is conventionally put in use, it is merely for convenience of describing the present invention and simplifying the description, and it is not indicated or implied that the apparatus or element referred to must have a specific azimuth, be configured and operated in a specific azimuth, and thus it should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, if any, are used merely for distinguishing between descriptions and not for indicating or implying a relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is an exemplary diagram of an application scenario provided in this embodiment, in fig. 1, an intelligent network card 10 is installed on a server 20, a virtual machine is running on the server 20, and the virtual machine simulates a virtual computer on a physical server through software by using a virtualization technology. The virtual machine has complete hardware system function and is a complete computer system running in completely isolated environment. The server 20 is also called as a host of the virtual machine, the server 20 is also connected with the backup server 30 through the intelligent network card 10 in a communication manner, in order to avoid influencing the reliability of the server 20 when the virtual machine fails, when the communication between the server 20 and the backup server 30 is normal, the server 20 backs up the data of the virtual machine to the backup server 30, when the virtual machine on the server 20 fails, the virtual machine on the server 20 is restored through the backup of the virtual machine on the backup server 30, so as to improve the reliability of the server 20, when the communication between the server 20 and the backup server 30 is abnormal, the server 20 cannot normally backup the data of the virtual machine to the backup server 30, and when the virtual machine fails, the virtual machine of the server 20 cannot be restored according to the backup of the virtual machine on the backup server 30, so that the reliability of the server 20 when the communication between the server 20 and the backup server 30 is abnormal is influenced.
The present embodiment provides a virtual machine backup method, device, intelligent network card and computer readable storage medium, which are aimed at the problem that the virtual machine cannot be backed up or restored when the communication is abnormal, and the virtual machine is backed up or restored by using the intelligent network card 10 when the communication is abnormal, and because the communication channel between the pre-configured intelligent network card 10 and the server 20 is different from the communication channel between the server 20 and the remote server 30, the virtual machine can be backed up or restored by using the intelligent network card, which will be described in detail below.
Referring to fig. 2, fig. 2 is a block diagram illustrating the intelligent network card 10 of fig. 1 according to the present embodiment.
The intelligent network card 10 includes a processor 11, a memory 12, and a bus 13, and the processor 11 and the memory 12 are connected by the bus 13.
The processor 11 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the virtual machine backup method may be performed by integrated logic circuits of hardware in the processor 11 or instructions in the form of software. The processor 11 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), and the like; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The memory 12 is used to store programs, such as virtual machine backup apparatuses in the following embodiments. Virtual machine backup apparatus 100 includes at least one software functional module that may be stored in memory 12 in the form of software or firmware (firmware) or cured in intelligent network card 10. After receiving the execution instruction, the processor 11 executes the program to implement the virtual machine backup method disclosed in the above embodiment.
Based on fig. 1 and fig. 2, the present embodiment further provides a virtual machine backup method applied to the intelligent network card 10 in fig. 1 and fig. 2, please refer to fig. 3, fig. 3 is a flowchart illustrating a virtual machine backup method provided in the present embodiment, and the method includes the following steps:
step S101, an abnormal backup instruction for the virtual machine is received, wherein the abnormal backup instruction is used for carrying out backup processing on the virtual machine when communication between a server and a remote server for backing up the virtual machine is abnormal.
In this embodiment, at least one virtual machine is running on the server 20, and when an abnormality occurs in communication between the server and the cloud server for backing up any virtual machine, an abnormal backup instruction for the virtual machine may be sent to the intelligent network card 10.
In this embodiment, the abnormal backup instruction may be sent to the intelligent network card 10 through a command line, or may be sent to the intelligent network card 10 by operating on an operation interface provided by network management software, or may be automatically sent to the intelligent network card 10 when the server 20 detects that the communication between the server and the remote server 30 is abnormal. The abnormal backup instruction is used for distinguishing a normal backup instruction, and the normal backup instruction is a backup instruction used for backing up the virtual machine to the remote server.
In this embodiment, the backup processing for the virtual machine includes, but is not limited to, backing up configuration parameters and operation parameters of the virtual machine, for example, an operating system version of the virtual machine, the number of CPUs of the virtual machine, a memory size of the virtual machine, an application running on the virtual machine, and configuration of each application.
Step S102, based on the abnormal backup instruction, the virtual machine is backed up by utilizing a communication channel between the pre-configured virtual machine and the server.
In the present embodiment, the communication channel between the intelligent network card 10 and the server 20 is different from the communication channel between the server 20 and the remote server 30, and when the communication channel between the server 20 and the remote server 30 is abnormal, the communication channel between the intelligent network card 10 and the server 20 is not affected by it, so that normal communication can be performed.
According to the method provided by the embodiment, the intelligent network card 10 backs up the virtual machine by utilizing the communication channel between the pre-configured server and the server, and backs up the virtual machine by utilizing the intelligent network card, so that the reliability of the virtual machine backup under the abnormal condition is improved.
In an alternative embodiment, in order to avoid that the performance of the server 20 is greatly affected by the backup performed during real-time anomaly, and further affect that the server 20 normally provides services to the outside, the embodiment provides an implementation manner of the backup virtual machine:
acquiring the flow of a message processed by virtual virtio equipment in a preset period;
if the flow is greater than the preset value, the communication channel is utilized to backup the virtual machine.
In this embodiment, when the virtual machine is created, the intelligent network card is pre-allocated with a corresponding virtual io device, where virtual io is an I/O paravirtualization solution, and is a set of general I/O device virtualization programs. The virtio provides a set of communication framework and programming interfaces between the upper-layer application and each virtualization device, reduces compatibility problems caused by cross-platform, and greatly improves the development efficiency of the driving program.
The virtual virtio device provides message interaction for the virtual machine. The preset period may be set according to the requirement of the actual scene, where the flow is the sum of the lengths of the actual data included in the data fields in all the messages processed by the virtual virtio device in the preset period, for example, the preset period is 1ms (millisecond), the virtual virtio device processes 3 messages in 1ms, and the lengths of the actual data included in the data fields in the 3 messages are 100KB, 50KB, and 50KB respectively, where the flow=100kb+50kb+50kb=200kb.
In this embodiment, if the flow is greater than the preset value, it generally means that the data changed by the virtual machine accumulates a certain flow, and at this time, the data is backed up once, so that the processing resources of the server 10 wasted in the way that the data is backed up every time the data is changed are avoided.
In this embodiment, the virtual device includes a virtual-net device and a virtual-blk device, which are referred to as a virtual network device and a virtual storage device, respectively. The virtual-net device is used for processing messages communicated with a virtual machine, and is a driver of a virtualized network device, which allows the virtual machine to directly interact with a physical network, and in a virtualized environment, the virtual machine needs to communicate with other computers or network devices, and the virtual-net uses a virtualization technology to map network resources on a physical host onto the virtual machine, so that high-performance and low-delay network access is provided. The virtio-blk device is used for processing messages for accessing data stored by the virtual machine, and the virtio-blk device is a driver of the virtualized storage device and provides block-level storage access for the virtual machine. In a virtualized environment, virtual machines typically need to connect to other storage devices to access and manage storage resources. virtual-blk uses virtualization techniques to map storage resources on a physical host onto virtual machines, providing high performance and low latency block-level storage access. In order to separate and judge the messages processed by the virtio-net device and the virtio-blk device, a preset value is set for each of the messages: the first preset value and the second preset value, and one way for judging whether the flow is greater than the preset value is as follows:
if the flow of the message processed by the virtio-net device is larger than a first preset value or the flow of the message processed by the virtio-blk device is larger than a second preset value, judging that the flow is larger than the preset value.
In this embodiment, other judging modes may be adopted according to actual needs, for example, if the sum of the flow of the message processed by the virtio-net device and the flow of the message processed by the virtio-blk device is greater than a preset value, the flow is determined to be greater than the preset value, or if the flow of the message processed by the virtio-net device is greater than a first preset value and the flow of the message processed by the virtio-blk device is greater than a second preset value, the flow is determined to be greater than the preset value, and the improvement of the method disclosed by the embodiment of the invention for adapting to the actual scene by those skilled in the art belongs to the improvement based on the thought provided by the invention and is within the protection scope of the invention.
It should be noted that, the intelligent network card repeatedly polls the flow statistics of virtio-net1 and virtio-blk1 through the commands provided by the OVS and SPDK modules of the intelligent network card, and sets a preset value and a statistical flow value according to the requirement to update and backup periodically.
In an alternative implementation manner, in order to configure a communication channel between the intelligent network card and the server, this embodiment provides an implementation manner using the virtual switch OVS:
and adding a flow table item for realizing communication between the intelligent network card and the server through the OVS so as to configure a communication channel between the intelligent network card and the server.
In this embodiment, the intelligent network card communicates with the server through an interface on the CPU side of the intelligent network card, and specifically needs to be configured in advance through an OVS to realize communication. OVS (Open vSwitch) is a virtual switch supporting openFlow protocol, which is a set of SDN (Software Defined Network ) control protocols, and a switch and a controller implemented by different vendors using the standard can be mutually compatible, so that the implementation of SDN is facilitated. The OVS is a high-quality virtual switch supporting multi-layer data forwarding, has better programming expansibility compared with the traditional switch, has network isolation and data forwarding functions realized by the traditional switch, operates on each physical machine realizing virtualization, and provides remote management. In the embodiment, the OVS is mainly deployed on the intelligent network card, and can configure and monitor the flow of each interface of the intelligent network card. And adding a flow table item in the flow table of the OVS, wherein the flow table item transmits the message from the server to the intelligent network card or transmits the message from the intelligent network card to the server, thereby realizing the communication between the two.
In an alternative embodiment, in order to reduce the influence on the running service of the server 20 as much as possible during the backup, the embodiment adopts different backup modes in different running states of the virtual machine, so before the virtual machine is backed up, the embodiment further provides an implementation manner of setting the backup mode:
acquiring the state of the virtual machine from the server by using a communication channel;
if the state of the virtual machine is the starting state, setting the backup mode as snapshot backup, otherwise setting the backup mode as clone backup so as to backup the virtual machine according to the set backup mode.
In this embodiment, the intelligent network card can obtain the state of the virtual machine through a communication channel between the pre-configured intelligent network card and the server, and the state of the virtual machine may be on or off.
In this embodiment, the backup mode includes snapshot backup and clone backup, the snapshot backup is that the first backup is full backup, the second backup is incremental backup, i.e. the second backup is that the second and the first snapshot are compared with each other to make a backup, and the second backup is composed of the second snapshot file and the first and the second differential data. Because the second backup only needs to backup the differentiated data, the data needing to be backed up is reduced, and the influence on the running service of the server is reduced; the clone backup is that the full backup is carried out every time, the backup reliability is high, but the flow of each time needed to be backed up is larger, and the influence on the running service of the server is larger.
When the virtual machine is started, the data related to the virtual machine is in a change state, and only the backup of the difference data is needed at the moment, so that a snapshot backup mode is selected, and when the virtual machine is shut down, all the data of the virtual machine are needed to be backed up for reliability, so that a clone backup mode is selected.
In an alternative embodiment, when the virtual machine is deleted or the user needs to cancel the abnormal backup, the intelligent network card receives a deletion instruction for deleting the virtual machine or an abnormal backup cancellation instruction, and based on the deletion instruction for deleting the virtual machine or the abnormal backup cancellation instruction, the intelligent network card deletes the backup of the corresponding virtual machine and timely releases the storage space of the intelligent network card occupied by the backup virtual machine.
In this embodiment, when an abnormality occurs in a virtual machine of a server and an abnormality occurs in communication between the server and a remote server for backing up the virtual machine, the server cannot restore the virtual machine from the remote server at this time, and for this scenario, the embodiment further provides an implementation manner for restoring the virtual machine on the server:
firstly, an abnormal recovery instruction aiming at a virtual machine is received, wherein the abnormal recovery instruction is used for recovering the virtual machine when communication between a server and a remote server for backing up the virtual machine is abnormal;
in this embodiment, the abnormal recovery instruction is similar to the abnormal backup instruction, and the abnormal backup instruction may be issued to the intelligent network card through a command line, an operation interface provided by network management software, or the like, where the abnormal backup instruction is used to distinguish a normal backup instruction, and the normal backup instruction is used to recover the backup virtual machine of the remote server to the server.
And secondly, carrying out recovery processing on the virtual machine based on the abnormal recovery instruction.
Because the intelligent network card is installed on the server, in order to recover the virtual machine on the server more timely, the embodiment provides a recovery mode:
based on the abnormal recovery instruction, the virtual machine on the intelligent network card is provided for the server in a sharing storage mode, so that the server provides services provided by the virtual machine outside through the virtual machine on the intelligent network card.
The server can provide normal functions on the virtual machine outwards in a shared storage mode, so that recovery processing expenditure caused by data communication is avoided, on one hand, the recovery efficiency of the virtual machine is improved, and on the other hand, the influence of the recovery virtual machine on the service of the server is reduced.
It should be noted that, in addition to the sharing storage mode, the data of the virtual machine on the intelligent network card may be copied to the server to restore the normal operation of the virtual machine on the server, and the intelligent network card sends the data of the local virtual machine to the server through the communication channel between the pre-configured intelligent network card and the server to restore the virtual machine on the server, so as to ensure the normal operation of the virtual machine on the server.
In order to perform the corresponding steps in the above embodiments and various possible implementations, an implementation of the virtual machine backup apparatus 100 is given below. Referring to fig. 4, fig. 4 is a block diagram illustrating a virtual machine backup apparatus 100 according to an embodiment of the invention. It should be noted that, the basic principle and the technical effects of the virtual machine backup apparatus 100 provided in this embodiment are the same as those of the foregoing embodiments, and for brevity, the description of this embodiment is not mentioned.
The virtual machine backup apparatus 100 includes a receiving module 110, a backup module 120, a configuration module 130, and a recovery module 140.
The receiving module 110 is configured to receive an abnormal backup instruction for any virtual machine, where the abnormal backup instruction is configured to perform backup processing on a virtual machine when an abnormality occurs in communication between a server and a remote server for backing up the virtual machine;
the backup module 120 is configured to backup the virtual machine by using a communication channel between the pre-configured virtual machine and the server based on the abnormal backup instruction.
In an alternative embodiment, the intelligent network card is pre-allocated with a corresponding virtual device for the virtual machine, and the backup module 120 is specifically configured to:
acquiring the flow of a message processed by virtual virtio equipment in a preset period;
if the flow is greater than the preset value, the communication channel is utilized to backup the virtual machine.
In an alternative embodiment, the virtual device includes a virtual-net device and a virtual-blk device, where the virtual-net device is used to process a message that is communicated with the virtual machine, the virtual-blk device is used to process a message that accesses data stored in the virtual machine, and the backup module 120 is further configured to:
if the flow of the message processed by the virtio-net device is larger than a first preset value or the flow of the message processed by the virtio-blk device is larger than a second preset value, judging that the flow is larger than the preset value.
In an alternative embodiment, the intelligent network card is deployed with a virtual switch OVS, and the configuration module 130 is configured to:
and adding a flow table item for realizing communication between the intelligent network card and the server through the OVS so as to configure a communication channel between the intelligent network card and the server.
In an alternative embodiment, the manner of backing up the virtual machine includes snapshot backup and clone backup, and the configuration module 130 is specifically configured to:
acquiring the state of the virtual machine from the server by using a communication channel;
if the state of the virtual machine is the starting state, setting the backup mode as snapshot backup, otherwise setting the backup mode as clone backup so as to backup the virtual machine according to the set backup mode.
In an alternative embodiment, the recovery module 140 is configured to:
receiving an abnormality recovery instruction for the virtual machine, wherein the abnormality recovery instruction is used for recovering the virtual machine when communication between a server and a remote server for backing up the virtual machine is abnormal;
and carrying out recovery processing on the virtual machine based on the abnormal recovery instruction.
In an alternative embodiment, the recovery module 140 is specifically configured to:
based on the abnormal recovery instruction, the virtual machine on the intelligent network card is provided for the server in a sharing storage mode, so that the server provides services provided by the virtual machine outside through the virtual machine on the intelligent network card.
An embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the virtual machine backup method in the foregoing embodiment.
In summary, the embodiments of the present invention provide a virtual machine backup method, a device, an intelligent network card and a computer readable storage medium, which are applied to the intelligent network card, where the intelligent network card is installed on a server, and at least one virtual machine is running on the server, and the method includes: receiving an abnormal backup instruction aiming at any virtual machine, wherein the abnormal backup instruction is used for carrying out backup processing on the virtual machine when communication between a server and a remote server for backing up the virtual machine is abnormal; based on the abnormal backup instruction, the virtual machine is backed up by utilizing a communication channel between the pre-configured virtual machine and the server. Compared with the prior art, the embodiment has at least the following advantages: (1) According to the embodiment, the virtual machine backup and recovery under the abnormal condition is processed by utilizing the self programmable advantage and the resource advantage of the intelligent network card to the greatest extent, and public resources are not required to be occupied. When the virtual machine is damaged and needs to be backed up and restored, the normal operation of the virtual machine can be maintained under the extreme condition that a backup server or a large network environment is abnormal; (2) According to the embodiment, different backup modes are adopted under different running states of the virtual machine, so that the backup reliability is ensured, and the influence on running business of the server is reduced as much as possible during backup; (3) The method ensures that the server can provide normal functions on the virtual machine outwards in a sharing storage mode, avoids recovery processing expenditure caused by data communication, improves the recovery efficiency of the virtual machine on one hand, and reduces the influence of the recovery virtual machine on the service of the server on the other hand.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. The virtual machine backup method is characterized by being applied to an intelligent network card, wherein the intelligent network card is installed on a server, and at least one virtual machine is operated on the server, and the method comprises the following steps:
receiving an abnormal backup instruction aiming at any virtual machine, wherein the abnormal backup instruction is used for carrying out backup processing on the virtual machine when communication between the server and a remote server for backing up the virtual machine is abnormal;
and based on the abnormal backup instruction, backing up the virtual machine by utilizing a communication channel between the server and the preset communication channel.
2. The virtual machine backup method as claimed in claim 1, wherein the intelligent network card allocates a corresponding virtual device to the virtual machine in advance, and the step of backing up the virtual machine using a communication channel configured in advance with the server based on the abnormal backup instruction includes:
acquiring the flow of a message processed by the virtual virtio device in a preset period;
and if the flow is greater than a preset value, backing up the virtual machine by utilizing the communication channel.
3. The virtual machine backup method of claim 2, wherein the virtual device comprises a virtual-net device and a virtual-blk device, the virtual-net device to process messages in communication with the virtual machine, the virtual-blk device to process messages to access data stored by the virtual machine, the method further comprising:
if the flow of the message processed by the virtio-net device is larger than a first preset value or the flow of the message processed by the virtio-blk device is larger than a second preset value, judging that the flow is larger than the preset value.
4. The virtual machine backup method of claim 1, wherein the manner in which the virtual machine is backed up to the intelligent network card includes snapshot backup and clone backup, and wherein prior to the step of backing up the virtual machine using a pre-configured communication channel with the server based on the abnormal backup instruction, the method further comprises:
acquiring the state of the virtual machine from the server by utilizing the communication channel;
and if the state of the virtual machine is the starting state, setting the backup mode as snapshot backup, otherwise setting the backup mode as clone backup so as to backup the virtual machine according to the set backup mode.
5. The virtual machine backup method of claim 1, wherein the method further comprises:
receiving an abnormality recovery instruction for the virtual machine, wherein the abnormality recovery instruction is used for recovering the virtual machine when communication between the server and a remote server for backing up the virtual machine is abnormal;
and carrying out recovery processing on the virtual machine based on the abnormal recovery instruction.
6. The virtual machine backup method as claimed in claim 5, wherein the step of performing recovery processing on the virtual machine based on the abnormality recovery instruction includes:
based on the abnormal recovery instruction, the virtual machine on the intelligent network card is provided for the server in a sharing storage mode, so that the server provides services provided by the virtual machine through the virtual machine on the intelligent network card.
7. A virtual machine backup device, applied to an intelligent network card, wherein the intelligent network card is installed on a server, and at least one virtual machine is operated on the server, the device comprising:
the receiving module is used for receiving an abnormal backup instruction aiming at any virtual machine, and the abnormal backup instruction is used for carrying out backup processing on the virtual machine when communication between the server and a remote server for backing up the virtual machine is abnormal;
and the backup module is used for backing up the virtual machine by utilizing a pre-configured communication channel between the virtual machine and the server based on the abnormal backup instruction.
8. The virtual machine backup apparatus of claim 7, wherein the intelligent network card is pre-allocated with a corresponding virtual device for the virtual machine, and the backup module is specifically configured to:
acquiring the flow of a message processed by the virtual virtio device in a preset period;
and if the flow is greater than a preset value, backing up the virtual machine by utilizing the communication channel.
9. An intelligent network card, comprising a processor and a memory, wherein the memory is configured to store a program, and the processor is configured to implement the virtual machine backup method of any one of claims 1-6 when executing the program.
10. A computer readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the virtual machine backup method of any of claims 1-6.
CN202311458779.7A 2023-11-02 2023-11-02 Virtual machine backup method and device, intelligent network card and computer readable storage medium Pending CN117453457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311458779.7A CN117453457A (en) 2023-11-02 2023-11-02 Virtual machine backup method and device, intelligent network card and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311458779.7A CN117453457A (en) 2023-11-02 2023-11-02 Virtual machine backup method and device, intelligent network card and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117453457A true CN117453457A (en) 2024-01-26

Family

ID=89594496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311458779.7A Pending CN117453457A (en) 2023-11-02 2023-11-02 Virtual machine backup method and device, intelligent network card and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117453457A (en)

Similar Documents

Publication Publication Date Title
US10983880B2 (en) Role designation in a high availability node
US9430266B2 (en) Activating a subphysical driver on failure of hypervisor for operating an I/O device shared by hypervisor and guest OS and virtual computer system
US8375363B2 (en) Mechanism to change firmware in a high availability single processor system
US7194652B2 (en) High availability synchronization architecture
US5758157A (en) Method and system for providing service processor capability in a data processing by transmitting service processor requests between processing complexes
EP4083786A1 (en) Cloud operating system management method and apparatus, server, management system, and medium
US20080178201A1 (en) Sharing a network i/o adapter between logical partitions
US11640314B2 (en) Service provision system, resource allocation method, and resource allocation program
CN109656742B (en) Node exception handling method and device and storage medium
US20040083358A1 (en) Reboot manager usable to change firmware in a high availability single processor system
US7065673B2 (en) Staged startup after failover or reboot
CN108027723B (en) Optical line terminal and method for upgrading master and slave equipment thereof
CN109245926B (en) Intelligent network card, intelligent network card system and control method
US20210406127A1 (en) Method to orchestrate a container-based application on a terminal device
CN112311646A (en) Hybrid cloud based on super-fusion system and deployment method
US20200153682A1 (en) System and method for processing messages during a reboot of a network device
CN113515408A (en) Data disaster tolerance method, device, equipment and medium
CN116881053B (en) Data processing method, exchange board, data processing system and data processing device
CN110795209B (en) Control method and device
US11055263B2 (en) Information processing device and information processing system for synchronizing data between storage devices
CN117453457A (en) Virtual machine backup method and device, intelligent network card and computer readable storage medium
CN110333973A (en) A kind of method and system of multi-host hot swap
CN115499300A (en) Embedded equipment clustering operation architecture, method and device
CN108847980A (en) A kind of method and device of CTDB node failure virtual IP address migration
JP6822706B1 (en) Cluster system, server equipment, takeover method, and program

Legal Events

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