CN117177050B - Virtual machine VPC network configuration snapshot processing method and system - Google Patents

Virtual machine VPC network configuration snapshot processing method and system Download PDF

Info

Publication number
CN117177050B
CN117177050B CN202311081499.9A CN202311081499A CN117177050B CN 117177050 B CN117177050 B CN 117177050B CN 202311081499 A CN202311081499 A CN 202311081499A CN 117177050 B CN117177050 B CN 117177050B
Authority
CN
China
Prior art keywords
snapshot
virtual machine
network card
service
appointed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311081499.9A
Other languages
Chinese (zh)
Other versions
CN117177050A (en
Inventor
李美云
张凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhiling Haina Technology Co ltd
Original Assignee
Beijing Zhiling Haina Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zhiling Haina Technology Co ltd filed Critical Beijing Zhiling Haina Technology Co ltd
Priority to CN202311081499.9A priority Critical patent/CN117177050B/en
Publication of CN117177050A publication Critical patent/CN117177050A/en
Application granted granted Critical
Publication of CN117177050B publication Critical patent/CN117177050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method and a system for processing virtual machine VPC network configuration snapshots, wherein the method comprises the following steps: responding to a user request to realize the creation processing of the virtual machine snapshot; the method comprises the steps of creating a network card snapshot, storing configuration information of the network card snapshot into a virtual machine snapshot, and constructing a mapping relation between the virtual machine snapshot and the network card snapshot I D; when the virtual machine snapshot deleting process is executed, deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot I D; when detecting that the current user needs to roll back the current virtual machine to the appointed snapshot, acquiring configuration information of the appointed snapshot by acquiring a network card snapshot I D of the appointed snapshot and then acquiring the configuration information of the network card snapshot of the appointed snapshot according to the network card snapshot I D of the appointed snapshot and the mapping relation; and finally, rolling back the current virtual machine on the appointed snapshot according to the configuration information of the corresponding network card snapshot of the appointed snapshot. The method ensures that the snapshot can be rolled back successfully, and ensures the stability and reliability of the snapshot rolling back.

Description

Virtual machine VPC network configuration snapshot processing method and system
Technical Field
The application relates to the technical field of virtual networks, in particular to a method and a system for processing virtual machine (VPC) network configuration snapshots.
Background
The VPC network, collectively referred to as Virtual Private Cloud, is a cloud computing service for creating and managing virtual networks.
VM (Virtual machine) realizes the access to vpc Network through association support vpc (Virtual Private Cloud) Network vnic (Virtual Network INTERFACE CARD); the overall architecture of the VPC network in the prior art is shown in fig. 1, in which:
the ELF service provides functions related to virtual machine operations, such as creating, deleting, creating snapshots, rolling back, associating vnic, and the like. The VPC service provides VPC network related functions such as vnic creation, deletion, association vnic to VPC-net, etc. vnic contains two pieces of information: VPC related information, such as VPC-net, ip addresses, etc., is stored in the VPC service. mac address, mode, etc. is stored in the ELF service.
When a user needs to create a snapshot for a virtual machine, the user requests an ELF service to create the snapshot for the virtual machine, and the ELF service stores the current information of the virtual machine, wherein the method comprises the following steps: metadata configured by the virtual machine, cpu, memory, storage and the like; vnic, the number of network cards, the mac address of each network card, the network card mode and the like;
When the user desires to roll back the virtual machine to a certain snapshot, the user requests the ELF service to roll back the virtual machine to the designated snapshot, and the ELF service rolls back the virtual machine to the configuration in the snapshot according to the virtual machine information stored in the previous snapshot.
Research shows that the technical scheme still has some technical defects:
For a virtual machine supporting a vpc network, when the virtual machine rolls back, the information of vnic can only recover the information stored in the ELF, such as mac address, network card mode and the like; for information stored in the VPC, information such as VPC-net, ip address, etc. is lost.
And after the virtual machine creates the snapshot, the network card is deleted, so that the vpc service releases the ip address occupied by the deleted network card at the moment, and even the vpc-net is possibly deleted. When the virtual machine needs to roll back to the configuration in the snapshot, even though the network card information before the virtual machine is reconfigured by means of manual configuration, the situation that the vpc-net is deleted or the ip address is occupied may be found, so that snapshot roll-back failure is caused.
Disclosure of Invention
In order to solve the above-mentioned problems, according to a first aspect of the present application, a method for processing a virtual machine VPC network configuration snapshot is provided, including:
the invention provides a processing method for supporting virtual machine VPC network configuration snapshot, which comprises the following steps:
responding to a user request to realize the creation processing of the virtual machine snapshot;
When creating the virtual machine snapshot, the configuration information of the network card snapshot is stored in the virtual machine snapshot while the network card snapshot is created, and the mapping relation between the virtual machine snapshot and the network card snapshot ID is constructed;
After receiving an instruction of deleting the virtual machine snapshot from the user, deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot ID when executing the virtual machine snapshot deleting process;
When detecting that the current user needs to roll back the current virtual machine to the appointed snapshot, acquiring the network card snapshot ID of the appointed snapshot, and then acquiring configuration information of the network card snapshot of the appointed snapshot according to the network card snapshot ID of the appointed snapshot and the mapping relation;
and finally, rolling back the current virtual machine on the appointed snapshot according to the configuration information of the corresponding network card snapshot of the appointed snapshot.
Preferably, as an embodiment; the method for responding to the user request to realize the creation processing of the virtual machine snapshot specifically comprises the following steps:
The user still requests ELF service to create a snapshot for the virtual machine, and the virtual machine snapshot is obtained;
the ELF service acquires a network card of a VPC network in the virtual machine, and requests the VPC service to create a snapshot for the network card so as to obtain the network card snapshot;
The VPC service stores the configuration information of the network card snapshot at the moment, the configuration information of the network card snapshot, and returns the network card snapshot ID to the ELF service;
The ELF service stores virtual machine attribute information, wherein the virtual machine attribute information comprises a network card mac address, a network card mode and a network card snapshot ID returned by the VPC service.
Preferably, as an embodiment; the configuration information of the network card snapshot comprises a vpc network and ip information.
Preferably, as an embodiment; after receiving an instruction of deleting the virtual machine snapshot from the user, deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot ID when executing the virtual machine snapshot deleting process, and specifically comprises the following operation steps:
The user requests the ELF service to delete the current virtual machine snapshot;
the ELF service reads the stored virtual machine attribute information corresponding to the current virtual machine snapshot, and acquires the network card snapshot ID correspondingly recorded in the virtual machine attribute information of the current virtual machine snapshot;
the ELF service requests the VPC service to delete the network card snapshot corresponding to the current virtual machine snapshot according to the network card snapshot ID stored in the corresponding record;
The VPC service deletes the network card snapshot.
Preferably, as an embodiment; when detecting that the current user needs to roll back the current virtual machine to the appointed snapshot, obtaining the configuration information of the network card snapshot of the appointed snapshot by obtaining the network card snapshot ID of the appointed snapshot and obtaining the configuration information of the network card snapshot of the appointed snapshot according to the network card snapshot ID of the appointed snapshot and the mapping relation, and specifically comprising the following operation steps:
The user requests ELF service, and rolls back the virtual machine to the appointed snapshot;
The ELF service reads the network card snapshot ID of the appointed snapshot;
The ELF service requests the VPC service to acquire configuration information of the network card snapshot corresponding to the specified network card snapshot according to the network card snapshot ID of the specified snapshot; and the VPC service obtains configuration information of the network card snapshot of the specified snapshot according to the network card snapshot ID of the specified snapshot and the mapping relation.
Preferably, as an embodiment; and finally, virtual machine rollback of the current virtual machine on the appointed snapshot is realized according to the configuration information of the corresponding network card snapshot of the appointed snapshot, and the method specifically comprises the following operation steps:
and the ELF service retrieves the virtual machine configuration file from the storage module according to the configuration information of the network card snapshot corresponding to the appointed network card snapshot, updates the virtual machine configuration file into the virtual machine configuration file configured when the appointed snapshot, and realizes virtual machine rollback of the current virtual machine on the appointed snapshot.
Correspondingly, the invention provides a processing system supporting virtual machine VPC network configuration snapshot, which comprises a creation module, a configuration processing module, a deletion processing module, a determination module and a rollback processing module; wherein,
The creation module is used for responding to a user request to realize the creation processing of the virtual machine snapshot;
The configuration processing module is used for creating the network card snapshot when creating the virtual machine snapshot, storing configuration information of the network card snapshot into the virtual machine snapshot, and constructing a mapping relation between the virtual machine snapshot and the network card snapshot ID;
the deleting processing module is used for deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot ID when the virtual machine snapshot deleting process is executed after receiving the command of deleting the virtual machine snapshot from the user;
The determining module is used for obtaining the network card snapshot ID of the appointed snapshot when detecting that the current user needs to roll back the current virtual machine to the appointed snapshot, and then obtaining the configuration information of the network card snapshot of the appointed snapshot according to the network card snapshot ID of the appointed snapshot and the mapping relation;
and the rollback processing module is used for finally realizing virtual machine rollback on the appointed snapshot for the current virtual machine according to the configuration information of the corresponding network card snapshot of the appointed snapshot.
Preferably, as an embodiment; the creation module is specifically used for still requesting ELF service to create a snapshot for the virtual machine by the user to obtain the virtual machine snapshot; the ELF service acquires a network card of a VPC network in the virtual machine, and requests the VPC service to create a snapshot for the network card so as to obtain the network card snapshot; the VPC service stores the configuration information of the network card snapshot at the moment, the configuration information of the network card snapshot, and returns the network card snapshot ID to the ELF service; the ELF service stores virtual machine attribute information, wherein the virtual machine attribute information comprises a network card mac address, a network card mode and a network card snapshot ID returned by the VPC service.
Preferably, as an embodiment; the configuration processing module is specifically used for requesting the ELF service to delete the current virtual machine snapshot by the user; the ELF service reads the stored virtual machine attribute information corresponding to the current virtual machine snapshot, and acquires the network card snapshot ID correspondingly recorded in the virtual machine attribute information of the current virtual machine snapshot; the ELF service requests the VPC service to delete the network card snapshot corresponding to the current virtual machine snapshot according to the network card snapshot ID stored in the corresponding record; the VPC service deletes the network card snapshot.
Preferably, as an embodiment; the determining module is used for requesting ELF service by a user and rolling back the virtual machine to the appointed snapshot; the ELF service reads the network card snapshot ID of the appointed snapshot; the ELF service requests the VPC service to acquire configuration information of the network card snapshot corresponding to the specified network card snapshot according to the network card snapshot ID of the specified snapshot; and the VPC service obtains configuration information of the network card snapshot of the specified snapshot according to the network card snapshot ID of the specified snapshot and the mapping relation.
Preferably, as an embodiment; the rollback processing module is specifically configured to retrieve a virtual machine configuration file from the storage module according to configuration information of a network card snapshot corresponding to a specified network card snapshot by using the ELF service, update the virtual machine configuration file to be a virtual machine configuration file configured when the specified snapshot is performed, and implement virtual machine rollback on the specified snapshot for the current virtual machine.
Compared with the prior art, the invention has at least the following technical advantages:
The technical scheme provided by the application is realized by the following method; responding to a user request to realize the creation processing of the virtual machine snapshot; when creating the virtual machine snapshot, the configuration information of the network card snapshot is stored in the virtual machine snapshot while the network card snapshot is created, and the mapping relation between the virtual machine snapshot and the network card snapshot ID is constructed; after receiving an instruction of deleting the virtual machine snapshot from the user, deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot ID when executing the virtual machine snapshot deleting process; when detecting that the current user needs to roll back the current virtual machine to the appointed snapshot, acquiring the network card snapshot ID of the appointed snapshot, and then acquiring configuration information of the network card snapshot of the appointed snapshot according to the network card snapshot ID of the appointed snapshot and the mapping relation; and finally, rolling back the current virtual machine on the appointed snapshot according to the configuration information of the corresponding network card snapshot of the appointed snapshot.
According to the virtual machine VPC network configuration snapshot processing method, the VPC can sense that the VPC network in the snapshot is still used by the virtual machine through the network card snapshot, so that the VPC network and the ip address can be ensured not to be deleted, the ip address can not be occupied by other devices, and further, even if the virtual machine performs the deletion operation of the VPC network card after the snapshot, the VPC network and the ip address can still be used when the snapshot is rolled back, so that configuration information of the network card snapshot of the designated snapshot can still be determined through a mapping relation when the snapshot is rolled back, and the VPC network and the ip address can still be used because the configuration information comprises the VPC network and the ip address, so that the snapshot can be rolled back successfully, and the stability and the reliability of the snapshot are ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a snapshot rollback process provided in the prior art;
Fig. 2 is a main flow diagram of a method for processing a snapshot of a virtual machine VPC network configuration according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a specific operation flow of a method for processing a snapshot of a virtual machine VPC network configuration according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another specific operation flow of a method for supporting snapshot processing of virtual machine VPC network configuration according to an embodiment of the present invention;
Fig. 5 is an information processing flow chart of a method for supporting virtual machine VPC network configuration snapshot processing according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a snapshot processing system supporting virtual machine VPC network configuration according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
Example 1
Referring to fig. 2, fig. 2 is a flowchart of a first method for processing a snapshot of a virtual machine VPC network configuration according to an embodiment of the application.
As shown in fig. 2, the present invention provides a method for processing a virtual machine VPC network configuration snapshot, which includes the following operation steps:
S100, responding to a user request to realize the creation processing of the virtual machine snapshot;
s200, when creating the virtual machine snapshot, the configuration information of the network card snapshot is saved in the virtual machine snapshot while the network card snapshot is created, and the mapping relation between the virtual machine snapshot and the network card snapshot ID is constructed;
s300, after receiving an instruction of deleting the virtual machine snapshot from the user, deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot ID when executing the virtual machine snapshot deleting process;
s400, when detecting that a current user needs to roll back a current virtual machine to a specified snapshot, acquiring a network card snapshot ID of the specified snapshot, and then acquiring configuration information of the network card snapshot of the specified snapshot according to the network card snapshot ID of the specified snapshot and the mapping relation;
S500, finally, virtual machine rollback is realized on the appointed snapshot for the current virtual machine according to the configuration information of the corresponding network card snapshot of the appointed snapshot.
A virtual machine snapshot is a mirror image of a particular file system that has read-only properties for a particular time.
The virtual machine snapshot creation flow is as shown in fig. 3:
the method for responding to the user request to realize the creation processing of the virtual machine snapshot specifically comprises the following steps:
s101, a user still requests ELF service to create a snapshot for a virtual machine, and the snapshot of the virtual machine is obtained;
s102, an ELF service acquires a network card of a VPC network in a virtual machine, and requests a VPC service to create a snapshot for the network card so as to obtain a network card snapshot;
s103, the VPC service stores the configuration information of the network card snapshot at the moment, and returns the network card snapshot ID to the ELF service;
And S104, the ELF service stores virtual machine attribute information, wherein the virtual machine attribute information comprises a network card mac address, a network card mode and a network card snapshot ID returned by the VPC service.
Preferably, as an embodiment; the configuration information of the network card snapshot comprises a vpc network and ip information. Therefore, when the virtual machine is executed to create the snapshot, the configuration information of the network card snapshot needs to be saved, the mapping relation between the network card snapshot ID and the virtual machine attribute information (virtual machine snapshot) can be constructed at the same time, and the virtual machine configuration file corresponding to the configuration information of the network card snapshot is stored at the same time so as to be called when the virtual machine is rolled back.
The virtual machine snapshot deleting process is as shown in fig. 4:
After receiving an instruction of deleting the virtual machine snapshot from the user, deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot ID when executing the virtual machine snapshot deleting process, and specifically comprises the following operation steps:
s301, a user requests an ELF service to delete a current virtual machine snapshot;
s302, the ELF service reads the stored virtual machine attribute information corresponding to the current virtual machine snapshot, and acquires the network card snapshot ID correspondingly recorded in the virtual machine attribute information of the current virtual machine snapshot;
S303, the ELF service requests the VPC service to delete the network card snapshot corresponding to the current virtual machine snapshot according to the network card snapshot ID stored in the corresponding record;
S304, the VPC service deletes the network card snapshot.
The virtual machine snapshot rollback flow is as follows, as shown in fig. 5:
When detecting that the current user needs to roll back the current virtual machine to the appointed snapshot, obtaining the configuration information of the network card snapshot of the appointed snapshot by obtaining the network card snapshot ID of the appointed snapshot and obtaining the configuration information of the network card snapshot of the appointed snapshot according to the network card snapshot ID of the appointed snapshot and the mapping relation, and specifically comprising the following operation steps:
S401, a user requests ELF service, and virtual machines are rolled back to a specified snapshot;
s402, the ELF service reads the network card snapshot ID of the appointed snapshot;
S403, the ELF service requests the VPC service to acquire configuration information of the network card snapshot corresponding to the specified network card snapshot according to the network card snapshot ID of the specified snapshot; and the VPC service obtains configuration information of the network card snapshot of the specified snapshot according to the network card snapshot ID of the specified snapshot and the mapping relation.
Preferably, as an embodiment; and finally, virtual machine rollback of the current virtual machine on the appointed snapshot is realized according to the configuration information of the corresponding network card snapshot of the appointed snapshot, and the method specifically comprises the following operation steps:
and S404, the ELF service retrieves the virtual machine configuration file from the storage module according to the configuration information of the network card snapshot corresponding to the appointed network card snapshot, updates the virtual machine configuration file to the virtual machine configuration file configured when the appointed snapshot, and realizes virtual machine rollback on the appointed snapshot for the current virtual machine.
In summary, the invention provides a processing method for supporting virtual machine VPC network configuration snapshot, which realizes the function of network card snapshot through VPC, thereby ensuring the accuracy of virtual machine snapshot creation and rollback: the capability of providing the network card snapshot through the VPC service ensures the integrity of the network card information in the virtual machine snapshot, and saves the network card information (namely the configuration information of the network card snapshot) related to the VPC service in the network card snapshot, such as the information of the VPC network, the ip address and the like of the network card. The configuration information of the network card snapshot comprises information such as a vpc network, an ip address and the like of the network card.
Meanwhile, the VPC service can perceive that the VPC network in the snapshot is still used by the virtual machine through the network card snapshot, so that the VPC network is not deleted, the ip address is not occupied by other equipment, and further, even if the virtual machine performs the deletion operation of the VPC network card after the snapshot, the VPC network and the ip address are still available when the snapshot is rolled back, and the snapshot is ensured to be rolled back successfully.
In addition, based on the same concept of the above method embodiment, the embodiment of the present application further provides a snapshot processing system supporting virtual machine VPC network configuration, so as to implement the above method of the present application, and since the principle of solving the problem in the method embodiment is similar to that of the system, the method at least has all the beneficial effects brought by the technical solution of the above embodiment, which is not described in detail herein.
Example two
Referring to fig. 6, fig. 6 is a schematic structural diagram of a snapshot processing system supporting virtual machine VPC network configuration according to a second embodiment of the present invention.
As shown in fig. 6, the virtual machine VPC network configuration snapshot processing system includes a creation module 10, a configuration processing module 20, a deletion processing module 30, a determination module 40, and a rollback processing module 50; wherein,
The creation module is used for responding to a user request to realize the creation processing of the virtual machine snapshot;
The configuration processing module is used for creating the network card snapshot when creating the virtual machine snapshot, storing configuration information of the network card snapshot into the virtual machine snapshot, and constructing a mapping relation between the virtual machine snapshot and the network card snapshot ID;
the deleting processing module is used for deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot ID when the virtual machine snapshot deleting process is executed after receiving the command of deleting the virtual machine snapshot from the user;
The determining module is used for obtaining the network card snapshot ID of the appointed snapshot when detecting that the current user needs to roll back the current virtual machine to the appointed snapshot, and then obtaining the configuration information of the network card snapshot of the appointed snapshot according to the network card snapshot ID of the appointed snapshot and the mapping relation;
and the rollback processing module is used for finally realizing virtual machine rollback on the appointed snapshot for the current virtual machine according to the configuration information of the corresponding network card snapshot of the appointed snapshot.
Preferably, as an embodiment; the creation module is specifically used for still requesting ELF service to create a snapshot for the virtual machine by the user to obtain the virtual machine snapshot; the ELF service acquires a network card of a VPC network in the virtual machine, and requests the VPC service to create a snapshot for the network card so as to obtain the network card snapshot; the VPC service stores the configuration information of the network card snapshot at the moment, the configuration information of the network card snapshot, and returns the network card snapshot ID to the ELF service; the ELF service stores virtual machine attribute information, wherein the virtual machine attribute information comprises a network card mac address, a network card mode and a network card snapshot ID returned by the VPC service.
Preferably, as an embodiment; the configuration processing module is specifically used for requesting the ELF service to delete the current virtual machine snapshot by the user; the ELF service reads the stored virtual machine attribute information corresponding to the current virtual machine snapshot, and acquires the network card snapshot ID correspondingly recorded in the virtual machine attribute information of the current virtual machine snapshot; the ELF service requests the VPC service to delete the network card snapshot corresponding to the current virtual machine snapshot according to the network card snapshot ID stored in the corresponding record; the VPC service deletes the network card snapshot.
Preferably, as an embodiment; the determining module is used for requesting ELF service by a user and rolling back the virtual machine to the appointed snapshot; the ELF service reads the network card snapshot ID of the appointed snapshot; the ELF service requests the VPC service to acquire configuration information of the network card snapshot corresponding to the specified network card snapshot according to the network card snapshot ID of the specified snapshot; and the VPC service obtains configuration information of the network card snapshot of the specified snapshot according to the network card snapshot ID of the specified snapshot and the mapping relation.
Preferably, as an embodiment; the rollback processing module is specifically configured to retrieve a virtual machine configuration file from the storage module according to configuration information of a network card snapshot corresponding to a specified network card snapshot by using the ELF service, update the virtual machine configuration file to be a virtual machine configuration file configured when the specified snapshot is performed, and implement virtual machine rollback on the specified snapshot for the current virtual machine.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (4)

1. A method for processing a virtual machine VPC network configuration snapshot is characterized by comprising the following steps:
responding to a user request to realize the creation processing of the virtual machine snapshot;
When creating the virtual machine snapshot, the configuration information of the network card snapshot is stored in the virtual machine snapshot while the network card snapshot is created, and the mapping relation between the virtual machine snapshot and the network card snapshot ID is constructed;
After receiving an instruction of deleting the virtual machine snapshot from the user, deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot ID when executing the virtual machine snapshot deleting process;
When detecting that the current user needs to roll back the current virtual machine to the appointed snapshot, acquiring the network card snapshot ID of the appointed snapshot, and then acquiring configuration information of the network card snapshot of the appointed snapshot according to the network card snapshot ID of the appointed snapshot and the mapping relation;
finally, virtual machine rollback is realized on the appointed snapshot for the current virtual machine according to the configuration information of the corresponding network card snapshot of the appointed snapshot;
the method for responding to the user request to realize the creation processing of the virtual machine snapshot specifically comprises the following steps:
The user still requests ELF service to create a snapshot for the virtual machine, and the virtual machine snapshot is obtained;
the ELF service acquires a network card of a VPC network in the virtual machine, and requests the VPC service to create a snapshot for the network card so as to obtain the network card snapshot;
The VPC service stores the configuration information of the network card snapshot at the moment, the configuration information of the network card snapshot, and returns the network card snapshot ID to the ELF service;
the ELF service stores virtual machine attribute information, wherein the virtual machine attribute information comprises a network card mac address, a network card mode and a network card snapshot ID returned by the VPC service;
the configuration information of the network card snapshot comprises a vpc network and ip information;
After receiving an instruction of deleting the virtual machine snapshot from the user, deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot ID when executing the virtual machine snapshot deleting process, and specifically comprises the following operation steps:
The user requests the ELF service to delete the current virtual machine snapshot;
the ELF service reads the stored virtual machine attribute information corresponding to the current virtual machine snapshot, and acquires the network card snapshot ID correspondingly recorded in the virtual machine attribute information of the current virtual machine snapshot;
the ELF service requests the VPC service to delete the network card snapshot corresponding to the current virtual machine snapshot according to the network card snapshot ID stored in the corresponding record;
The VPC service deletes the network card snapshot;
When detecting that the current user needs to roll back the current virtual machine to the appointed snapshot, obtaining the configuration information of the network card snapshot of the appointed snapshot by obtaining the network card snapshot ID of the appointed snapshot and obtaining the configuration information of the network card snapshot of the appointed snapshot according to the network card snapshot ID of the appointed snapshot and the mapping relation, and specifically comprising the following operation steps:
The user requests ELF service, and rolls back the virtual machine to the appointed snapshot;
The ELF service reads the network card snapshot ID of the appointed snapshot;
The ELF service requests the VPC service to acquire configuration information of the network card snapshot corresponding to the specified network card snapshot according to the network card snapshot ID of the specified snapshot; and the VPC service obtains configuration information of the network card snapshot of the specified snapshot according to the network card snapshot ID of the specified snapshot and the mapping relation.
2. The method for processing virtual machine VPC network configuration snapshot supported in claim 1, wherein the virtual machine rollback is implemented on the designated snapshot for the current virtual machine according to configuration information of the corresponding network card snapshot of the designated snapshot, specifically comprising the following operation steps:
and the ELF service retrieves the virtual machine configuration file from the storage module according to the configuration information of the network card snapshot corresponding to the appointed network card snapshot, updates the virtual machine configuration file into the virtual machine configuration file configured when the appointed snapshot, and realizes virtual machine rollback of the current virtual machine on the appointed snapshot.
3. The processing system for supporting virtual machine VPC network configuration snapshot is characterized by comprising a creation module, a configuration processing module, a deletion processing module, a determination module and a rollback processing module; wherein,
The creation module is used for responding to a user request to realize the creation processing of the virtual machine snapshot;
The configuration processing module is used for creating the network card snapshot when creating the virtual machine snapshot, storing configuration information of the network card snapshot into the virtual machine snapshot, and constructing a mapping relation between the virtual machine snapshot and the network card snapshot ID;
the deleting processing module is used for deleting the corresponding network card snapshot according to the mapping relation between the virtual machine snapshot and the network card snapshot ID when the virtual machine snapshot deleting process is executed after receiving the command of deleting the virtual machine snapshot from the user;
The determining module is used for obtaining the network card snapshot ID of the appointed snapshot when detecting that the current user needs to roll back the current virtual machine to the appointed snapshot, and then obtaining the configuration information of the network card snapshot of the appointed snapshot according to the network card snapshot ID of the appointed snapshot and the mapping relation;
The rollback processing module is used for finally realizing virtual machine rollback on the appointed snapshot for the current virtual machine according to the configuration information of the corresponding network card snapshot of the appointed snapshot;
The creation module is specifically used for still requesting ELF service to create a snapshot for the virtual machine by the user to obtain the virtual machine snapshot; the ELF service acquires a network card of a VPC network in the virtual machine, and requests the VPC service to create a snapshot for the network card so as to obtain the network card snapshot; the VPC service stores the configuration information of the network card snapshot at the moment, the configuration information of the network card snapshot, and returns the network card snapshot ID to the ELF service; the ELF service stores virtual machine attribute information, wherein the virtual machine attribute information comprises a network card mac address, a network card mode and a network card snapshot ID returned by the VPC service;
The configuration processing module is specifically used for requesting the ELF service to delete the current virtual machine snapshot by the user; the ELF service reads the stored virtual machine attribute information corresponding to the current virtual machine snapshot, and acquires the network card snapshot ID correspondingly recorded in the virtual machine attribute information of the current virtual machine snapshot; the ELF service requests the VPC service to delete the network card snapshot corresponding to the current virtual machine snapshot according to the network card snapshot ID stored in the corresponding record; the VPC service deletes the network card snapshot;
The determining module is used for requesting ELF service by a user and rolling back the virtual machine to the appointed snapshot; the ELF service reads the network card snapshot ID of the appointed snapshot; the ELF service requests the VPC service to acquire configuration information of the network card snapshot corresponding to the specified network card snapshot according to the network card snapshot ID of the specified snapshot; and the VPC service obtains configuration information of the network card snapshot of the specified snapshot according to the network card snapshot ID of the specified snapshot and the mapping relation.
4. The virtual machine VPC network configuration snapshot supporting processing system according to claim 3, wherein the rollback processing module is specifically configured to retrieve a virtual machine configuration file from the storage module according to configuration information of a network card snapshot corresponding to a specified network card snapshot by using an ELF service, update the virtual machine configuration file to be the virtual machine configuration file configured when the specified snapshot is performed, and implement virtual machine rollback on the specified snapshot for a current virtual machine.
CN202311081499.9A 2023-08-25 2023-08-25 Virtual machine VPC network configuration snapshot processing method and system Active CN117177050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311081499.9A CN117177050B (en) 2023-08-25 2023-08-25 Virtual machine VPC network configuration snapshot processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311081499.9A CN117177050B (en) 2023-08-25 2023-08-25 Virtual machine VPC network configuration snapshot processing method and system

Publications (2)

Publication Number Publication Date
CN117177050A CN117177050A (en) 2023-12-05
CN117177050B true CN117177050B (en) 2024-05-17

Family

ID=88934981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311081499.9A Active CN117177050B (en) 2023-08-25 2023-08-25 Virtual machine VPC network configuration snapshot processing method and system

Country Status (1)

Country Link
CN (1) CN117177050B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103532731A (en) * 2012-07-06 2014-01-22 杭州华三通信技术有限公司 method and device for preventing network configuration of virtual machine from losing
CN104917630A (en) * 2015-04-15 2015-09-16 深圳市深信服电子科技有限公司 Method for recovering virtual network and system for recovering virtual network
CN106775957A (en) * 2017-01-20 2017-05-31 郑州云海信息技术有限公司 A kind of virtual machine snapshot implementation method
CN111580929A (en) * 2020-05-07 2020-08-25 上海英方软件股份有限公司 Validity verification system and method based on virtual machine protection data
CN112965783A (en) * 2021-02-24 2021-06-15 上海英方软件股份有限公司 System and method for using storage snapshot backup virtual machine
CN115048190A (en) * 2022-08-16 2022-09-13 江苏安超云软件有限公司 Virtual machine snapshot management method, system and computer readable medium
CN115550309A (en) * 2022-08-29 2022-12-30 紫光云技术有限公司 Method for solving VPC intercommunication address overlapping

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8458688B2 (en) * 2009-12-28 2013-06-04 International Business Machines Corporation Virtual machine maintenance with mapped snapshots

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103532731A (en) * 2012-07-06 2014-01-22 杭州华三通信技术有限公司 method and device for preventing network configuration of virtual machine from losing
CN104917630A (en) * 2015-04-15 2015-09-16 深圳市深信服电子科技有限公司 Method for recovering virtual network and system for recovering virtual network
CN106775957A (en) * 2017-01-20 2017-05-31 郑州云海信息技术有限公司 A kind of virtual machine snapshot implementation method
CN111580929A (en) * 2020-05-07 2020-08-25 上海英方软件股份有限公司 Validity verification system and method based on virtual machine protection data
CN112965783A (en) * 2021-02-24 2021-06-15 上海英方软件股份有限公司 System and method for using storage snapshot backup virtual machine
CN115048190A (en) * 2022-08-16 2022-09-13 江苏安超云软件有限公司 Virtual machine snapshot management method, system and computer readable medium
CN115550309A (en) * 2022-08-29 2022-12-30 紫光云技术有限公司 Method for solving VPC intercommunication address overlapping

Also Published As

Publication number Publication date
CN117177050A (en) 2023-12-05

Similar Documents

Publication Publication Date Title
CN111078147B (en) Processing method, device and equipment for cache data and storage medium
US9864791B2 (en) Flow for multi-master replication in distributed storage
CN110532123B (en) Fault transfer method and device of HBase system
CN107391033B (en) Data migration method and device, computing equipment and computer storage medium
CN113094430B (en) Data processing method, device, equipment and storage medium
CN112000426A (en) Data processing method and device
CN114780019A (en) Electronic device management method and device, electronic device and storage medium
CN105574026A (en) Method and device for service supporting by using non-relational database
CN112000850B (en) Method, device, system and equipment for processing data
WO2024082857A1 (en) Data migration method and system, and related apparatus
CN117177050B (en) Virtual machine VPC network configuration snapshot processing method and system
JPH1063557A (en) Distributed file synchronization system
JP5691306B2 (en) Information processing system
CN113806309A (en) Metadata deleting method, system, terminal and storage medium based on distributed lock
CN115098537A (en) Transaction execution method and device, computing equipment and storage medium
CN111339061A (en) Data migration method and system of distributed database
CN112434001B (en) Multi-data source configurable MongoDB data synchronization system supporting data preprocessing, electronic equipment and medium
JP2924786B2 (en) Exclusive control system, exclusive control method, and medium for storing exclusive control program for shared file in loosely coupled multiple computer system
CN117171266B (en) Data synchronization method, device, equipment and storage medium
CN108984343A (en) A kind of virtual machine backup and memory management method based on content analysis
US20220206991A1 (en) Storage system and data management method
CN117255101B (en) Data processing method, device, equipment and medium of distributed storage system
CN114676093B (en) File management method and device, electronic equipment and storage medium
CN113590309B (en) Data processing method, device, equipment and storage medium
US20180225362A1 (en) Data processing system and data processing method

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
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: 8b, building 1, No. 48, Zhichun Road, Haidian District, Beijing 100086

Applicant after: Beijing Zhiling Haina Technology Co.,Ltd.

Address before: 8b, building 1, No. 48, Zhichun Road, Haidian District, Beijing 100086

Applicant before: Beijing zhilinghaina Technology Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant