WO2016090865A1 - 虚拟机数据加载方法及系统 - Google Patents

虚拟机数据加载方法及系统 Download PDF

Info

Publication number
WO2016090865A1
WO2016090865A1 PCT/CN2015/080506 CN2015080506W WO2016090865A1 WO 2016090865 A1 WO2016090865 A1 WO 2016090865A1 CN 2015080506 W CN2015080506 W CN 2015080506W WO 2016090865 A1 WO2016090865 A1 WO 2016090865A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
data
target
network management
target virtual
Prior art date
Application number
PCT/CN2015/080506
Other languages
English (en)
French (fr)
Inventor
郑岩
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016090865A1 publication Critical patent/WO2016090865A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • 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

Definitions

  • This paper relates to the field of telecommunications network virtualization, and in particular to a virtual machine data loading method and system.
  • the virtualization controller is composed of different types of virtual machines and application software running on the virtual machine.
  • the cloud technology is used to dynamically adjust the number of different types of virtual machines according to the load of the controller.
  • the network management system is in communication with the virtualization controller, the network management system is modeled according to the virtual machine of the virtualization controller, and the network management system sends relevant control commands to the virtualization controller, and the virtualization controller processes the virtual machine according to the relevant control instruction. Perform relevant controls.
  • the virtual machine data dynamically changes according to the control of the virtualization controller or the state of the virtualization controller (for example, the number of virtual machines is determined by the load of the virtualization controller), but the dynamic changes of the virtual machine data cannot be synchronized to the network management system. Therefore, the user cannot understand the virtual machine of the virtualized controller in real time, and the network management system cannot provide a data source for other functional modules or programs.
  • the main purpose of the embodiments of the present invention is to provide a method and system for loading virtual machine data, which aims to solve the technical problem of preventing the network management system from being able to know the virtual machine data of the virtualized control in time.
  • a virtual machine data loading method provided by an embodiment of the present invention includes the following steps:
  • the method further includes:
  • the step of acquiring the virtual machine enable status message sent by the virtualization controller is
  • the number of each type of virtual machine and the data of each type of virtual machine are generated;
  • a virtual machine resource pool is constructed according to the number and data of the virtual machines.
  • the target virtual machine identifier includes a target virtual machine ID and a target virtual machine enabled state.
  • the virtual machine data corresponding to the target virtual machine identifier is obtained from the preset virtual machine resource pool according to the target virtual machine identifier, and the virtual machine data is loaded into the network management system.
  • the steps to persist include:
  • the open virtual machine data corresponding to the open target virtual machine ID is obtained from the preset virtual machine resource pool according to the open target virtual machine ID, and the open virtual machine data is added to the network management system for persistence;
  • the virtual machine data in the network management system that is the same as the shutdown target virtual machine ID is deleted according to the shutdown target virtual machine ID.
  • the operation of loading the virtual machine data into the network management system for persistence is a transaction granularity of the virtual machine, and the data is loaded by the virtual machine in a best effort manner.
  • the embodiment of the present invention further provides a virtual machine data loading device, where the virtual machine data loading device includes:
  • a message obtaining module configured to acquire a virtual machine enable status message sent by the virtualization controller when the virtual machine enable message notification sent by the virtualization controller is monitored;
  • a message parsing module configured to parse the virtual machine enable status message to obtain a target virtual machine identifier that needs to load virtual machine data
  • the data loading module is configured to: obtain, according to the target virtual machine identifier, the virtual machine data corresponding to the target virtual machine identifier from the preset virtual machine resource pool, and load the virtual machine data into the network management system. Persistent processing.
  • the virtual machine data loading device further includes:
  • Generating a data module configured to generate a quantity of each type of virtual machine and data of each type of virtual machine according to a definition of the virtual machine model and a maximum capacity of the virtualization controller according to the network management system;
  • Constructing a resource pool module configured to construct a virtual machine resource pool according to the number and data of the virtual machines.
  • the target virtual machine identifier includes a target virtual machine ID and a target virtual machine enabled state.
  • the data loading module includes:
  • An ID obtaining unit is configured to obtain an open target virtual machine ID whose target virtual machine enabled state is an open state according to the target virtual machine ID and a target virtual machine enabled state, and obtain a closed target virtual machine whose target virtual machine enabled state is a closed state. ID;
  • the data persistence unit is configured to: according to the open target virtual machine ID, search for a virtual machine data corresponding to the open target virtual machine ID from a preset virtual machine resource pool, and add the open virtual machine data to Persistence in the network management system;
  • the data deletion unit is configured to delete the virtual machine data in the network management system that is the same as the shutdown target virtual machine ID according to the shutdown target virtual machine ID.
  • the data loading module is configured to perform the persistence processing by loading the virtual machine data into the network management system by: loading the virtual machine data into the network management system for persistence, and operating the virtual machine as a virtual machine. Granularity, and the most effortless way to load data between virtual machines.
  • an embodiment of the present invention further provides a computer storage medium.
  • Computer-executable instructions are stored in the computer storage medium for performing the methods described above.
  • the embodiment of the present invention acquires a virtual machine enable status message sent by the virtualization controller when the virtual machine enable message notification sent by the virtualization controller is monitored; and then parses the virtual machine enable status message to obtain a target that needs to load the virtual machine data.
  • the virtual machine identifier is finally searched for, according to the target virtual machine identifier, the virtual machine data corresponding to the target virtual machine identifier is searched from the preset virtual machine resource pool, and the virtual machine data is loaded into the network management system for persistence processing.
  • the virtual machine data of the virtualized control is synchronized to the network management system in time, so that the virtual machine data in the network management system and the virtual machine data in the virtualized controller are consistent in real time, providing real-time for other functional modules or programs of the network management system.
  • the data source also enables users to understand the virtual machine data of the virtualized controller in real time, and facilitates monitoring of the virtualized controller.
  • FIG. 1 is a schematic flowchart of a virtual machine data loading method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another virtual machine data loading method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of acquiring virtual machine data corresponding to the target virtual machine identifier from a preset virtual machine resource pool according to the target virtual machine identifier, and loading the virtual machine data into a network management system. Schematic diagram of the refinement process of the steps of persistence;
  • FIG. 4 is a schematic diagram of functional modules of a virtual machine data loading device according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of another functional module of a virtual machine data loading device according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a refinement function module of the data loading module of FIG. 4;
  • FIG. 7 is a schematic diagram of connection between a virtual machine data loading device, a network management system, and a virtualization controller according to an embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of a virtual machine data loading apparatus according to an embodiment of the present invention.
  • FIG. 9 is a structural diagram of a memory pool virtual machine in a virtual machine data loading apparatus according to an embodiment of the present invention.
  • FIG. 10 is a diagram showing a virtual machine and related object association in a virtual machine data loading device according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of a collection change of a virtual machine ID list after the network management system and the virtualization controller are disconnected and restored in the virtual machine data loading method according to the embodiment of the present invention.
  • the embodiment of the invention provides a virtual machine data loading method, which is referred to FIG. 1 and FIG.
  • the virtual machine data loading party includes the following steps:
  • Step S10 Acquire a virtual machine enable status message sent by the virtualization controller when the virtual machine enable message notification sent by the virtualization controller is monitored;
  • the virtualization controller and the virtual machine data loading device and the network management system are interconnected by corresponding communication protocols, or the virtualization controller and the network management system are interconnected by corresponding communication protocols, and the virtual machine data loading device is part of the network management system.
  • the virtual machine data loading device listens to the virtualization controller sending the virtual machine enable message notification, the virtual machine enable status message sent by the virtualization controller is obtained.
  • Step S20 parsing the virtual machine enable status message to obtain the target virtual machine identifier that needs to load the virtual machine data
  • the virtual machine data loading device parses the obtained virtual machine enable status message to obtain the target virtual machine identifier that needs to be loaded.
  • the target virtual machine identifier includes a target virtual machine ID (identification code) and a target virtual machine enabled state.
  • Step S30 Search for the virtual machine data corresponding to the target virtual machine identifier from the preset virtual machine resource pool according to the target virtual machine identifier, and load the virtual machine data into the network management system for persistence processing.
  • the virtual machine data loading device searches for the virtual machine data corresponding to the target virtual machine identifier from the preset virtual machine resource pool according to the target virtual machine identifier, and loads the found virtual machine data into the network management system according to the virtual machine data. Generate a corresponding database operation command to hold the virtual machine data Long time into the network management system database.
  • the operation of loading the virtual machine data into the network management system for persistence is to use the virtual machine as the transaction granularity, and the virtual machine uses the best effort to perform data loading.
  • the virtual machine enable status message sent by the virtualization controller virtualization controller is obtained by monitoring the virtual machine enabled message notification sent by the virtualization controller; then parsing the virtual machine enable status message is required to be loaded.
  • the target virtual machine identifier is obtained.
  • the virtual machine data corresponding to the target virtual machine identifier is obtained from the preset virtual machine resource pool according to the target virtual machine identifier, and the virtual machine data is loaded into the network management system for persistence.
  • the virtual machine data of the virtualized control is synchronized to the network management system in time, so that the virtual machine data in the network management system and the virtual machine data in the virtualized controller are consistent in real time, and are other functional modules or programs of the network management system.
  • Providing a real-time data source also enables users to understand the virtual machine data of the virtualized controller in real time, and facilitate monitoring of the virtualized controller.
  • FIG. 2 is a schematic flowchart diagram of another virtual machine data loading method according to an embodiment of the present invention.
  • the method before step S10, the method further includes:
  • Step S40 generating the number of each type of virtual machine and the data of each type of virtual machine according to the definition of the virtual machine model and the maximum capacity of the virtualization controller by the network management system;
  • Step S50 constructing a virtual machine resource pool according to the number of virtual machines and data.
  • a preset virtual machine resource pool is constructed, and the definition of the virtual machine and the maximum capacity of the virtualization controller are calculated by the network management system, and the number of each type of virtual machine is calculated, and each type of virtual machine is generated.
  • Data organize virtual machine data by virtual machine granularity to construct a virtual machine resource pool based on the number of generated virtual machines and data.
  • FIG. 3 is a schematic flowchart of the refinement of step S30 in FIG.
  • step S30 includes:
  • Step S301 according to the target virtual machine ID and the target virtual machine enabled state, obtain the target virtual machine ID whose target virtual machine enabled state is the open state, and obtain the target virtual machine enabled state to be off. Close target virtual machine ID in closed state;
  • step S302 the open virtual machine data corresponding to the open target virtual machine ID is obtained from the preset virtual machine resource pool according to the open target virtual machine ID, and the open virtual machine data is added to the network management system for persistence. ;
  • step S303 the virtual machine data in the network management system that is the same as the shutdown target virtual machine ID is deleted according to the target virtual machine ID.
  • the target virtual machine ID is turned on and the target virtual machine ID is turned off, and then the virtual machine ID is opened in the network management system according to the target virtual machine ID.
  • the corresponding virtual machine is called from the resource pool and is persistent; the virtual machine corresponding to the shutdown target virtual machine ID in the network management system is shut down according to the target VM ID, so as to implement the virtual machine data and the network management system of the virtualization controller.
  • the virtual machine data remains synchronized and consistent.
  • the embodiment of the present invention further provides a virtual machine data loading method, and the steps are as follows:
  • Step S40 generating the number of each type of virtual machine and the data of each type of virtual machine according to the definition of the virtual machine model and the maximum capacity of the virtualization controller by the network management system;
  • Step S50 constructing a virtual machine resource pool according to the number and data of the virtual machine
  • Step S10 Acquire a virtual machine enable status message sent by the virtualization controller when listening to the virtual machine enable message notification sent by the virtualization controller.
  • Step S20 parsing the virtual machine enable status message to obtain a target virtual machine identifier that needs to be loaded, where the target virtual machine identifier includes a target virtual machine ID and a target virtual machine enabled state;
  • Step S301 obtaining an open target virtual machine ID whose target virtual machine enabled state is an open state according to the target virtual machine ID and the target virtual machine enabled state, and acquiring a closed target virtual machine ID whose target virtual machine enabled state is a closed state;
  • step S302 the open virtual machine data corresponding to the open target virtual machine ID is obtained from the preset virtual machine resource pool according to the open target virtual machine ID, and the open virtual machine data is added to the network management system for persistence. ;
  • Step S303 according to the shutdown target virtual machine ID, the virtual network system and the shutdown target virtual The virtual machine data with the same machine ID is deleted.
  • the virtual machine data loading apparatus attached to the virtual machine data loading method of the embodiment of the present invention includes three structures: a resource pool, a listener, and a loader.
  • a resource pool is a hierarchical structure that includes:
  • the data generation layer is set to calculate the number of each type of virtual machine according to the virtual machine model and the maximum capacity supported by the virtual controller, and generate data of the virtual machine;
  • Data parsing layer set to parse the virtual machine data generated by the data generating layer, and organize the data structure according to the granularity of the virtual machine;
  • Data loading layer set to load the data structure generated by the data parsing layer into the memory, and load and send the message to the loader;
  • Resource pool interface layer Set to provide virtual machine access interfaces, including virtual machine query interface and virtual machine comparison interface.
  • the listener is a hierarchical structure that includes:
  • a message listening layer configured to listen for virtual machine enable status messages from the virtualization controller
  • Message forwarding layer set to parse the received virtual machine enable status message and forward it to the loader;
  • Listener Interface Layer Set to provide a virtual machine interface that queries the virtual controller for all enabled states.
  • the loader is a hierarchical structure that includes:
  • Listener layer Set to listen to the virtual machine enable status message forwarded by the listener message forwarding layer; also listen to the message sent by the data load layer of the resource pool.
  • Parsing layer set to parse the message of the listening layer, get the virtual machine ID that needs to be loaded, and call the persistence layer into the database;
  • Persistence layer set to call the external interface of the resource pool interface layer according to the virtual machine ID of the resolution layer. Port, get virtual machine data, generate database operation commands and execute them.
  • External interface layer Set to provide an external interface. The user manually invokes the interface to update the virtual machine data in the network management system. Because the data of the network management system is due to backup and other reasons, the virtual machine data in the network management system is inconsistent with the virtual machine data actually running in the virtualization controller.
  • the virtual machine data loading method is divided into four cases:
  • the network management system is initially started, the resource pool is configured, and the virtual machine data in the loaded resource pool is enabled to be persisted to the network management.
  • the steps are as follows:
  • Step 1 The resource pool data generation layer calculates the number of each type of virtual machine and the data of each virtual machine according to the virtual machine model and the maximum capacity supported by the virtual controller.
  • Step 2 The resource pool data parsing layer parses the data generated in the previous step according to the granularity of the virtual machine
  • Step 3 The loading layer loads the virtual machine data into the memory, and the memory structure is as shown in FIG. 9. Maintain a Map (database map) in memory, the primary key is the VMID of the virtual machine, and the value is the virtual machine object.
  • the virtual machine object and its related objects are shown in Figure 10.
  • the virtual machine object stores a reference to the related object that belongs to the virtual machine. This method can quickly locate all the data related to each virtual machine, which is convenient for the network management. Add virtual machines and delete virtual machines to the system.
  • the data is sent to the resource pool loading completion message after the memory loading is completed;
  • Step 4 After the listener layer of the loader receives the message, the parsing layer accesses the virtual machine in the resource pool through the interface provided by the resource pool, obtains the virtual machine with the enabled state enabled, and obtains all the data of the virtual machine and its related objects, and invokes The interface of the persistence layer, the virtual machine data is persisted to the network management; the operation of the persistence layer is to use the virtual machine as the transaction granularity, and the best effort is adopted.
  • the network management system is running, and the virtual machine data is loaded without abnormality in the link with the virtualization controller.
  • the steps are as follows:
  • Step 1 The message listening layer of the listener has a long connection link with the virtualization controller, and receives a virtual machine enable message notification of the virtualization controller;
  • Step 2 After receiving the message, the listener layer of the listener parses the message, obtains the virtual machine ID and the enabled state, and forwards through the message forwarding layer of the listener.
  • Step 3 After the listener layer of the loader receives the forwarding message, the parsing layer parses the virtual machine ID and Use status.
  • Step 4 Call the interface of the resource pool, obtain all the data of the virtual machine related object, call the interface of the persistent layer, and persist the virtual machine data to the network management.
  • the virtual machine is enabled in different states.
  • the persistence processing mode is different. If it is ON, to increase the virtual machine, if it is OFF, to delete the virtual machine, the operation of the persistence layer should be based on the virtual machine as the transaction granularity.
  • the steps are as follows:
  • Step 1 After the link is restored, the loader calls the interface layer interface of the listener to obtain all the virtual machines of the current virtualization controller.
  • Step 2 The message listening layer of the listener receives the query result returned by the virtualization controller, and is forwarded to the loader after being parsed by the data forwarding layer.
  • Step 3 After the listener layer of the loader receives the message, the parsing layer parses out the virtual machine ID list (set A).
  • Step 4 Obtain a list of virtual machine IDs that are persistent in the current network management system (set B)
  • Step 5 Take the difference set between the set A and the set B.
  • the virtual machine is a virtual machine that is enabled by the virtualization controller before the link is restored.
  • the virtual machine is not persisted to the network management, and the interface of the resource pool is called to obtain the virtual machine.
  • the data of its related objects call the persistence layer, and persist this part of the virtual machine to the network management system.
  • Step 6 Take the difference set between the set B and the set A.
  • the virtual machine is a virtual machine that is shut down before the link is restored by the virtualized controller.
  • the virtual machine is not deleted in the network management system, and the interface of the resource pool is called to obtain the virtual machine.
  • the data of the related object, the persistence layer is called, and the virtual machine is deleted from the network management system; the operation of the persistence layer is to use the virtual machine as the transaction granularity, and the best effort is adopted.
  • the algorithm change of the virtual machine data in the resource pool may cause the virtual machine data of the network management system to be inconsistent with the virtual machine data in the resource pool.
  • the probability of occurrence is small, and the user manually initiates the method. as follows:
  • Step 1 When the user invokes the external interface layer interface of the loader to initiate the operation, the network is cleared. Persistent virtual machine data in the pipe system;
  • Step 2 The loader calls the interface layer interface of the listener to obtain all the virtual machines of the current virtualization controller.
  • the message listening layer of the step 3 listener receives the query result returned by the virtualization controller, and is forwarded to the loader after being parsed by the data forwarding layer;
  • Step 4 after the listener layer of the loader receives the message, the parsing layer parses out the virtual machine ID list (set A);
  • Step 5 Invoke the interface of the resource pool, obtain the data of the set A virtual machine and its related objects, call the persistence layer, and persist the virtual machine to the network management system; the operation of the persistence layer is to use the virtual machine as the transaction granularity. Use the best effort.
  • the embodiment of the present invention further provides a virtual machine data loading device.
  • the virtual machine data loading device includes:
  • the message obtaining module 60 is configured to obtain a virtual machine enable status message sent by the virtualization controller when the virtual machine enable message notification sent by the virtualization controller is monitored;
  • the virtualization controller and the virtual machine data loading device and the network management system are interconnected by corresponding communication protocols, or the virtualization controller and the network management system are interconnected by corresponding communication protocols, and the virtual machine data loading device is part of the network management system.
  • the virtual machine data loading device listens to the virtual machine enable message notification sent by the virtualization controller, the virtual machine enable status message sent by the virtualized controller is received.
  • the message parsing module 70 is configured to parse the virtual machine enable status message to obtain a target virtual machine identifier that needs to load the virtual machine data;
  • the virtual machine data loading device parses the obtained virtual machine enable status message to obtain the target virtual machine identifier that needs to be loaded.
  • the target virtual machine identifier includes a target virtual machine ID (identification code) and a target virtual machine enabled state.
  • the data loading module 80 is configured to: obtain, according to the target virtual machine identifier, the virtual machine data corresponding to the target virtual machine identifier from the preset virtual machine resource pool, and load the virtual machine data into the network management system. Persistence processing in the system.
  • the virtual machine data loading device searches for the virtual machine data corresponding to the target virtual machine identifier from the preset virtual machine resource pool according to the target virtual machine identifier, and loads the found virtual machine data into the network management system according to the virtual machine data. Generate the corresponding database operation command to persist the virtual machine data into the network management system database.
  • the operation of loading the virtual machine data into the network management system for persistence is to use the virtual machine as the transaction granularity, and the virtual machine uses the best effort to perform data loading.
  • the virtual machine enable status message sent by the virtualization controller virtualization controller is obtained by monitoring the virtual machine enabled message notification sent by the virtualization controller; then parsing the virtual machine enable status message is required to be loaded.
  • the target virtual machine identifier is obtained.
  • the virtual machine data corresponding to the target virtual machine identifier is obtained from the preset virtual machine resource pool according to the target virtual machine identifier, and the virtual machine data is loaded into the network management system for persistence.
  • the virtual machine data of the virtualized control is synchronized to the network management system in time, so that the virtual machine data in the network management system and the virtual machine data in the virtualized controller are consistent in real time, and are other functional modules or programs of the network management system.
  • Providing a real-time data source also enables users to understand the virtual machine data of the virtualized controller in real time, and facilitate monitoring of the virtualized controller.
  • the virtual machine data loading apparatus further includes:
  • the generating data module 90 is configured to generate the number of each type of virtual machine and the data of each type of virtual machine according to the definition of the virtual machine model and the maximum capacity of the virtualization controller according to the network management system;
  • the resource pool module 100 is configured to construct a virtual machine resource pool according to the number of virtual machines and data.
  • a preset virtual machine resource pool is constructed, and the definition of the virtual machine and the maximum capacity of the virtualization controller are calculated by the network management system, and the number of each type of virtual machine is calculated, and each type of virtual machine is generated.
  • Data organize virtual machine data by virtual machine granularity to construct a virtual machine resource pool based on the number of generated virtual machines and data.
  • the data loading module 80 includes:
  • the ID obtaining unit 801 is configured to obtain an open target virtual machine ID whose target virtual machine enabled state is an open state according to the target virtual machine ID and the target virtual machine enabled state, and obtain a closed target virtual machine ID whose target virtual machine enabled state is the closed state. ;
  • the data persistence unit 802 is configured to: obtain, according to the open target virtual machine ID, the obtained virtual machine data corresponding to the open target virtual machine ID from the preset virtual machine resource pool, and add the open virtual machine data to the network management Persistence in the system;
  • the data deletion unit 803 is configured to delete the virtual machine data in the network management system that is the same as the shutdown target virtual machine ID according to the target virtual machine ID.
  • the target virtual machine ID is turned on and the target virtual machine ID is turned off, and then the virtual machine ID is opened in the network management system according to the target virtual machine ID.
  • the corresponding virtual machine is called from the resource pool and is persistent; the virtual machine corresponding to the shutdown target virtual machine ID in the network management system is shut down according to the target VM ID, so as to implement the virtual machine data and the network management system of the virtualization controller.
  • the virtual machine data remains synchronized and consistent.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • Each device/function module/functional unit in the above embodiments may use a general-purpose computing device. Implementations can be centralized on a single computing device or distributed across a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the foregoing technical solution realizes that the virtual machine data of the virtualized control is synchronized to the network management system in time, so that the virtual machine data in the network management system and the virtual machine data in the virtualized controller are consistent in real time, and are provided for other functional modules or programs of the network management system.
  • the real-time data source also enables users to understand the virtual machine data of the virtualized controller in real time, which is convenient for monitoring the virtualized controller.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种虚拟机数据加载方法和装置,该方法包括:当监听到虚拟化控制器发送的虚拟机启用消息通知时,获取虚拟化控制器发送的虚拟机启用状态消息;解析虚拟机启用状态消息得到需要加载虚拟机数据的目标虚拟机标识;根据目标虚拟机标识从预设的虚拟机资源池中查找获取与目标虚拟机标识对应的虚拟机数据,并将虚拟机数据加载到网管系统中进行持久化处理。上述技术方案实现了虚拟化控制的虚拟机数据及时同步到网管系统中,从而网管系统中的虚拟机数据与虚拟化控制器中的虚拟机数据实时保持一致。

Description

虚拟机数据加载方法及系统 技术领域
本文涉及电信网络虚拟化领域,尤其涉及一种虚拟机数据加载方法及系统。
背景技术
虚拟化控制器由不同类型的虚拟机及运行在虚拟机上的应用软件组成,同时利用了云的技术实现了根据控制器的负荷动态调整不同类型虚拟机数量。网管系统与虚拟化控制器通信连接,网管系统根据虚拟化控制器的虚拟机进行建模,并且网管系统将相关控制指令发送至虚拟化控制器,虚拟化控制器根据该相关控制指令对虚拟机进行相关控制。虚拟机数据会根据虚拟化控制器的控制或者虚拟化控制器的状态(例如虚拟机的数量由虚拟化控制器的负荷决定)动态变化,但是,虚拟机数据的动态变化无法同步到网管系统中,使用户无法实时了解虚拟化控制器的虚拟机的情况,网管系统无法为其他功能模块或程序提供数据源。
发明内容
本发明实施例的主要目的在于提供一种虚拟机数据加载方法及系统,旨在解决如何避免网管系统无法及时获知虚拟化控制的虚拟机数据的技术问题。
为实现上述目的,本发明实施例提供的一种虚拟机数据加载方法,所述虚拟机数据加载方法包括以下步骤:
当监听到虚拟化控制器发送的虚拟机启用消息通知时,获取所述虚拟化控制器发送的虚拟机启用状态消息;
解析所述虚拟机启用状态消息得到需要加载虚拟机数据的目标虚拟机标识;
根据所述目标虚拟机标识从预设的虚拟机资源池中查找获取与所述目标虚拟机标识对应的虚拟机数据,并将所述虚拟机数据加载到网管系统中进行持久化处理。
可选地,所述方法还包括:
所述当监听到虚拟化控制器发送的虚拟机启用消息通知时,获取所述虚拟化控制器发送的虚拟机启用状态消息的步骤之前,
根据网管系统对虚拟机模型的定义和虚拟化控制器的最大容量,生成每种类型的虚拟机的数量和每种类型的虚拟机的数据;
根据所述虚拟机的数量和数据构造虚拟机资源池。
可选地,所述目标虚拟机标识包括目标虚拟机ID和目标虚拟机启用状态。
可选地,所述根据所述目标虚拟机标识从预设的虚拟机资源池中查找获取与所述目标虚拟机标识对应的虚拟机数据,并将所述虚拟机数据加载到网管系统中进行持久化的步骤包括:
根据所述目标虚拟机ID和目标虚拟机启用状态,获取目标虚拟机启用状态为开启状态的开启目标虚拟机ID,获取目标虚拟机启用状态为关闭状态的关闭目标虚拟机ID;
根据所述开启目标虚拟机ID,从预设的虚拟机资源池中查找获取与该开启目标虚拟机ID对应的开启虚拟机数据,并将该开启虚拟机数据增加到网管系统中进行持久化;
根据所述关闭目标虚拟机ID,将网管系统中与该关闭目标虚拟机ID相同的虚拟机数据删除。
可选地,将所述虚拟机数据加载到网管系统进行持久化的操作是以虚拟机为事务粒度,并且虚拟机间采用最大努力方式进行数据加载。
此外,为实现上述目的,本发明实施例还提供一种虚拟机数据加载装置,所述虚拟机数据加载装置包括:
消息获取模块,设置为当监听到虚拟化控制器发送的虚拟机启用消息通知时,获取所述虚拟化控制器发送的虚拟机启用状态消息;
消息解析模块,设置为解析所述虚拟机启用状态消息得到需要加载虚拟机数据的目标虚拟机标识;
数据加载模块,设置为根据所述目标虚拟机标识从预设的虚拟机资源池中查找获取与所述目标虚拟机标识对应的虚拟机数据,并将所述虚拟机数据加载到网管系统中进行持久化处理。
可选地,所述虚拟机数据加载装置还包括:
生成数据模块,设置为根据网管系统对虚拟机模型的定义和虚拟化控制器的最大容量,生成每种类型的虚拟机的数量和每种类型的虚拟机的数据;
构造资源池模块,设置为根据所述虚拟机的数量和数据构造虚拟机资源池。
可选地,所述目标虚拟机标识包括目标虚拟机ID和目标虚拟机启用状态。
可选地,所述数据加载模块包括:
ID获取单元,设置为根据所述目标虚拟机ID和目标虚拟机启用状态,获取目标虚拟机启用状态为开启状态的开启目标虚拟机ID,获取目标虚拟机启用状态为关闭状态的关闭目标虚拟机ID;
数据持久化单元,设置为根据所述开启目标虚拟机ID,从预设的虚拟机资源池中查找获取与该开启目标虚拟机ID对应的开启虚拟机数据,并将该开启虚拟机数据增加到网管系统中进行持久化;
数据删除单元,设置为根据所述关闭目标虚拟机ID,将网管系统中与该关闭目标虚拟机ID相同的虚拟机数据删除。
可选地,数据加载模块是设置为通过如下方式实现所述虚拟机数据加载到网管系统中进行持久化处理:将所述虚拟机数据加载到网管系统进行持久化的操作是以虚拟机为事务粒度,并且虚拟机间采用最大努力方式进行数据加载。
此外,为实现上述目的,本发明实施例还提供一种计算机存储介质,所 述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述的方法。
本发明实施例通过在监听到虚拟化控制器发送的虚拟机启用消息通知时,获取虚拟化控制器发送的虚拟机启用状态消息;然后解析该虚拟机启用状态消息得到需要加载虚拟机数据的目标虚拟机标识;最后根据该目标虚拟机标识从预设的虚拟机资源池中查找与该目标虚拟机标识对应的虚拟机数据,并将该虚拟机数据加载到网管系统中进行持久化处理,这样,实现了虚拟化控制的虚拟机数据及时同步到网管系统中,从而网管系统中的虚拟机数据与虚拟化控制器中的虚拟机数据实时保持一致,为网管系统的其他功能模块或程序提供实时数据源,也使用户能够实时了解虚拟化控制器的虚拟机数据情况,便于对虚拟化控制器的监控。
附图概述
图1为本发明实施例虚拟机数据加载方法流程示意图;
图2为本发明实施例另一种虚拟机数据加载方法流程示意图;
图3为图1中根据所述目标虚拟机标识从预设的虚拟机资源池中查找获取与所述目标虚拟机标识对应的虚拟机数据,并将所述虚拟机数据加载到网管系统中进行持久化的步骤的细化流程示意图;
图4为本发明实施例虚拟机数据加载装置功能模块示意图;
图5为本发明实施例另一种虚拟机数据加载装置功能模块示意图;
图6为图4中数据加载模块的细化功能模块示意图;
图7为本发明实施例虚拟机数据加载装置与网管系统、虚拟化控制器连接示意图;
图8为本发明实施例虚拟机数据加载装置的结构示意图;
图9为本发明实施例虚拟机数据加载装置中资源池虚拟机内存结构图;
图10为本发明实施例虚拟机数据加载装置中虚拟机及相关对象关联 图;
图11为本发明实施例虚拟机数据加载方法中在网管系统与虚拟化控制器断开至恢复后,虚拟机ID列表的集合变化示意图。
本发明的较佳实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明实施例提供一种虚拟机数据加载方法,参照图1和图7。
在本发明实施例虚拟机数据加载方法中,该虚拟机数据加载方包括以下步骤:
步骤S10,当监听到虚拟化控制器发送的虚拟机启用消息通知时,获取虚拟化控制器发送的虚拟机启用状态消息;
虚拟化控制器与虚拟机数据加载装置和网管系统通过对应的通信协议互连,或者虚拟化控制器与网管系统通过对应的通信协议互连,虚拟机数据加载装置为网管系统的一部分。当虚拟机数据加载装置监听到虚拟化控制器发送虚拟机启用消息通知时,获取虚拟化控制器发送的虚拟机启用状态消息。
步骤S20,解析虚拟机启用状态消息得到需要加载虚拟机数据的目标虚拟机标识;
虚拟机数据加载装置解析获取的虚拟机启用状态消息得到需要加载的目标虚拟机标识。
可选地,目标虚拟机标识包括目标虚拟机ID(identification,身份验证码)和目标虚拟机启用状态。
步骤S30,根据目标虚拟机标识从预设的虚拟机资源池中查找获取与目标虚拟机标识对应的虚拟机数据,并将虚拟机数据加载到网管系统中进行持久化处理。
虚拟机数据加载装置根据目标虚拟机标识从预设的虚拟机资源池中查找获取与目标虚拟机标识对应的虚拟机数据,将查找到的虚拟机数据加载到网管系统中,并根据虚拟机数据生成相应数据库操作命令,将该虚拟机数据持 久化入网管系统数据库。
可选地,将虚拟机数据加载到网管系统进行持久化的操作是以虚拟机为事务粒度,并且虚拟机间采用最大努力方式进行数据加载。
在本实例中,通过在监听到虚拟化控制器发送的虚拟机启用消息通知时,获取虚拟化控制器虚拟化控制器发送的虚拟机启用状态消息;然后解析该虚拟机启用状态消息得到需要加载的目标虚拟机标识;最后根据该目标虚拟机标识从预设的虚拟机资源池中查找获取与该目标虚拟机标识对应的虚拟机数据,并将该虚拟机数据加载到网管系统中进行持久化,这样,实现了虚拟化控制的虚拟机数据及时同步到网管系统中,从而网管系统中的虚拟机数据与虚拟化控制器中的虚拟机数据实时保持一致,为网管系统的其他功能模块或程序提供实时数据源,也使用户能够实时了解虚拟化控制器的虚拟机数据情况,便于对虚拟化控制器的监控。
参照图2,图2为本发明实施例另一种虚拟机数据加载方法的流程示意图。
在本发明实施例另一种虚拟机数据加载方法中,步骤S10之前还包括:
步骤S40,根据网管系统对虚拟机模型的定义和虚拟化控制器的最大容量,生成每种类型的虚拟机的数量和每种类型的虚拟机的数据;
步骤S50,根据虚拟机的数量和数据构造虚拟机资源池。
在本实施例中,构造预设的虚拟机资源池,通过网管系统对虚拟机的定义和虚拟化控制器的最大容量,计算出每种类型的虚拟机的数量,生成每种类型虚拟机的数据;根据生成的虚拟机数量和数据,按照虚拟机粒度组织虚拟机数据以构造虚拟机资源池。
可选地,参照图3,图3为图1中步骤S30的细化流程示意图。
在本实施例中,步骤S30包括:
步骤S301,根据目标虚拟机ID和目标虚拟机启用状态,获取目标虚拟机启用状态为开启状态的开启目标虚拟机ID,获取目标虚拟机启用状态为关 闭状态的关闭目标虚拟机ID;
步骤S302,根据开启目标虚拟机ID,从预设的虚拟机资源池中查找获取与该开启目标虚拟机ID对应的开启虚拟机数据,并将该开启虚拟机数据增加到网管系统中进行持久化;
步骤S303,根据关闭目标虚拟机ID,将网管系统中与该关闭目标虚拟机ID相同的虚拟机数据删除。
在本实施例中,根据目标虚拟机ID和目标虚拟机启用状态,分别获取开启目标虚拟机ID和关闭目标虚拟机ID,然后根据开启目标虚拟机ID将网管系统中与该开启目标虚拟机ID对应的虚拟机从资源池中调用并持久化;根据关闭目标虚拟机ID将网管系统中与该关闭目标虚拟机ID对应的虚拟机关闭,以实现虚拟化控制器的虚拟机数据与网管系统中的虚拟机数据保持同步和一致。
综合上述,本发明实施例还提供一种虚拟机数据加载方法,步骤如下:
步骤S40,根据网管系统对虚拟机模型的定义和虚拟化控制器的最大容量,生成每种类型的虚拟机的数量和每种类型的虚拟机的数据;
步骤S50,根据虚拟机的数量和数据构造虚拟机资源池;
步骤S10,当监听到虚拟化控制器发送的虚拟机启用消息通知时,获取虚拟化控制器发送的虚拟机启用状态消息
步骤S20,解析虚拟机启用状态消息得到需要加载的目标虚拟机标识,其中目标虚拟机标识包括目标虚拟机ID和目标虚拟机启用状态;
步骤S301,根据目标虚拟机ID和目标虚拟机启用状态,获取目标虚拟机启用状态为开启状态的开启目标虚拟机ID,获取目标虚拟机启用状态为关闭状态的关闭目标虚拟机ID;
步骤S302,根据开启目标虚拟机ID,从预设的虚拟机资源池中查找获取与该开启目标虚拟机ID对应的开启虚拟机数据,并将该开启虚拟机数据增加到网管系统中进行持久化;
步骤S303,根据关闭目标虚拟机ID,将网管系统中与该关闭目标虚拟 机ID相同的虚拟机数据删除。
参照图8,本发明实施例的虚拟机数据加载方法所依附的虚拟机数据加载装置包括资源池、监听器和加载器三个结构,
一)资源池
资源池是一个分层结构,该资源池包括:
数据生成层,设置为根据虚拟机模型以及虚拟控制器支持的最大容量,计算出每种类型的虚拟机的数量,生成虚拟机的数据;
数据解析层:设置为解析数据生成层生成的虚拟机数据,按照虚拟机的粒度组织数据结构;
数据加载层:设置为将数据解析层生成的数据结构加载到内存,加载完成发送消息到加载器;
资源池接口层:设置为提供虚拟机访问接口,包括虚拟机查询接口,虚拟机比对接口。
二)监听器
监听器是一个分层结构,该监听器包括:
消息监听层,设置为监听来自虚拟化控制器的虚拟机启用状态消息;
消息转发层:设置为解析收到的虚拟机启用状态消息,并转发到加载器;
监听器接口层:设置为提供向虚拟控制器查询全部启用状态的虚拟机接口。
三)加载器
加载器是一个分层结构,该加载器包括:
监听层:设置为监听来至监听器消息转发层转发的虚拟机启用状态消息;同时监听资源池的数据加载层发送的消息。
解析层:设置为解析监听层的消息,得出需要加载的虚拟机ID,并调用持久化层入数据库;
持久化层:设置为根据解析层的虚拟机ID,调用资源池接口层的外部接 口,获取虚拟机数据,生成数据库操作命令并执行。
外部接口层:设置为提供外部接口,用户手工调用接口,更新网管系统中的虚拟机数据。因为网管系统的数据由于备份恢复等原因,会导致网管系统中的虚拟机数据与虚拟化控制器中实际运行的虚拟机数据不一致。
此外,根据本发明实施例的虚拟机数据加载方法,将虚拟机数据加载方法分为四种情况分别叙述:
第一种情况、网管系统初始启动,构造资源池,加载资源池中状态为启用的虚拟机数据持久化到网管,步骤如下:
步骤1,资源池数据生成层根据虚拟机模型以及虚拟控制器支持的最大容量,计算出每种类型的虚拟机的数量以及每种虚拟机的数据;
步骤2,资源池数据解析层按照虚拟机的粒度解析上一步生成的数据;
步骤3,加载层把虚拟机数据加载到内存,内存结构如图9。内存中维护一个Map(数据库地图),主键为虚拟机的VMID,值为虚拟机对象。虚拟机对象及其相关对象如图10所示,虚拟机对象中保存了对归属于这个虚拟机的相关对象的引用,这种方式可以快速定位出每个虚拟机相关的所有数据,便于在网管系统中增加虚拟机和删除虚拟机。数据在内存加载完成后发送资源池加载完成消息;
步骤4,加载器的监听层收到消息后,解析层通过资源池提供的接口访问资源池中的虚拟机,获取启用状态为开启的虚机,获取虚拟机及其相关对象的全部数据,调用持久层的接口,持久化虚拟机数据到网管;持久化层的操作要以虚拟机为事务粒度,采用最大努力方式。
第二种情况、网管系统运行中,并且与虚拟化控制器链路无异常的情况下虚拟机数据加载,步骤如下:
步骤1,监听器的消息监听层与虚拟化控制器有长连接链路,接收虚拟化控制器的虚拟机启用消息通知;
步骤2,监听器的消息监听层收到消息后,解析消息,获取虚拟机ID和启用状态,通过监听器的消息转发层转发
步骤3,加载器的监听层收到转发消息后,解析层解析出虚拟机ID和启 用状态。
步骤4,调用资源池的接口,获取该虚拟机机器相关对象的全部数据,调用持久层的接口,持久化虚拟机数据到网管。虚拟机的启用状态不同,持久化处理方式不同,如果为ON,为增加虚拟机,如果为OFF,为删除虚拟机,持久化层的操作要以虚拟机为事务粒度,采用最大努力方式。
第三种情况、网管系统与虚拟化控制器链路断开发到恢复期间,监听器收不到虚拟化控制器的虚拟机状态消息,导致不能及时更新网管系统内的虚拟机数据,在链路恢复后,要重新加载网管系统的虚拟机数据,参照图11,步骤如下:
步骤1,链路恢复后,加载器调用监听器的接口层接口,获取当前虚拟化控制器的所有启用状态的虚拟机。
步骤2,监听器的消息监听层收到虚拟化控制器返回的查询结果,经过数据转发层的解析后转发给加载器。
步骤3,加载器的监听层收到消息后,解析层解析出虚拟机ID列表(集合A)
步骤4,获取当前网管系统持久化的虚拟机ID列表(集合B)
步骤5,取集合A与集合B的差集,这部分虚机为虚拟化控制器在链路恢复前启用的虚机,还没有持久化到网管,调用资源池的接口,获取这部分虚拟机及其相关对象的数据,调用持久化层,将这部分虚拟机持久化到网管系统。
步骤6,取集合B与集合A的差集,这部分虚机为虚拟化控制器在链路恢复前关闭的虚机,还没有在网管系统删除,调用资源池的接口,获取这部分虚拟机及其相关对象的数据,调用持久化层,将这部分虚拟机从网管系统删除;持久化层的操作要以虚拟机为事务粒度,采用最大努力方式。
第四种情况、资源池计算虚拟机数据的算法变化,会导致网管系统持久化的虚拟机数据与资源池中的虚拟机数据不一致,这种情况发生概率小,采用用户手动发起的方式,步骤如下:
步骤1,在用户调用加载器的外部接口层接口,发起本操作时,清除网 管系统中持久化的虚拟机数据;
步骤2,加载器调用监听器的接口层接口,获取当前虚拟化控制器的所有启用状态的虚拟机;
步骤3监听器的消息监听层收到虚拟化控制器返回的查询结果,经过数据转发层的解析后转发给加载器;
步骤4,加载器的监听层收到消息后,解析层解析出虚拟机ID列表(集合A);
步骤5,调用资源池的接口,获取集合A虚拟机及其相关对象的数据,调用持久化层,将这部分虚拟机持久化到网管系统;持久化层的操作要以虚拟机为事务粒度,采用最大努力方式。
此外,为实现上述目的,本发明实施例还提供一种虚拟机数据加载装置,参照图4,虚拟机数据加载装置包括:
消息获取模块60,设置为当监听到虚拟化控制器发送的虚拟机启用消息通知时,获取虚拟化控制器发送的虚拟机启用状态消息;
虚拟化控制器与虚拟机数据加载装置和网管系统通过对应的通信协议互连,或者虚拟化控制器与网管系统通过对应的通信协议互连,虚拟机数据加载装置为网管系统的一部分。当虚拟机数据加载装置监听到虚拟化控制器发送的虚拟机启用消息通知时,接收获取虚拟化控制器发送的虚拟机启用状态消息。
消息解析模块70,设置为解析虚拟机启用状态消息得到需要加载虚拟机数据的目标虚拟机标识;
虚拟机数据加载装置解析获取的虚拟机启用状态消息得到需要加载的目标虚拟机标识。
可选地,目标虚拟机标识包括目标虚拟机ID(identification,身份验证码)和目标虚拟机启用状态。
数据加载模块80,设置为根据目标虚拟机标识从预设的虚拟机资源池中查找获取与目标虚拟机标识对应的虚拟机数据,并将虚拟机数据加载到网管 系统中进行持久化处理。
虚拟机数据加载装置根据目标虚拟机标识从预设的虚拟机资源池中查找获取与目标虚拟机标识对应的虚拟机数据,将查找到的虚拟机数据加载到网管系统中,并根据虚拟机数据生成相应数据库操作命令,将该虚拟机数据持久化入网管系统数据库。
可选地,将虚拟机数据加载到网管系统进行持久化的操作是以虚拟机为事务粒度,并且虚拟机间采用最大努力方式进行数据加载。
在本实例中,通过在监听到虚拟化控制器发送的虚拟机启用消息通知时,获取虚拟化控制器虚拟化控制器发送的虚拟机启用状态消息;然后解析该虚拟机启用状态消息得到需要加载的目标虚拟机标识;最后根据该目标虚拟机标识从预设的虚拟机资源池中查找获取与该目标虚拟机标识对应的虚拟机数据,并将该虚拟机数据加载到网管系统中进行持久化,这样,实现了虚拟化控制的虚拟机数据及时同步到网管系统中,从而网管系统中的虚拟机数据与虚拟化控制器中的虚拟机数据实时保持一致,为网管系统的其他功能模块或程序提供实时数据源,也使用户能够实时了解虚拟化控制器的虚拟机数据情况,便于对虚拟化控制器的监控。
可选地,参照图5,虚拟机数据加载装置还包括:
生成数据模块90,设置为根据网管系统对虚拟机模型的定义和虚拟化控制器的最大容量,生成每种类型的虚拟机的数量和每种类型的虚拟机的数据;
构造资源池模块100,设置为根据虚拟机的数量和数据构造虚拟机资源池。
在本实施例中,构造预设的虚拟机资源池,通过网管系统对虚拟机的定义和虚拟化控制器的最大容量,计算出每种类型的虚拟机的数量,生成每种类型虚拟机的数据;根据生成的虚拟机数量和数据,按照虚拟机粒度组织虚拟机数据以构造虚拟机资源池。
可选地,如图6所示,数据加载模块80包括:
ID获取单元801,设置为根据目标虚拟机ID和目标虚拟机启用状态,获取目标虚拟机启用状态为开启状态的开启目标虚拟机ID,获取目标虚拟机启用状态为关闭状态的关闭目标虚拟机ID;
数据持久化单元802,设置为根据开启目标虚拟机ID,从预设的虚拟机资源池中查找获取与该开启目标虚拟机ID对应的开启虚拟机数据,并将该开启虚拟机数据增加到网管系统中进行持久化;
数据删除单元803,设置为根据关闭目标虚拟机ID,将网管系统中与该关闭目标虚拟机ID相同的虚拟机数据删除。
在本实施例中,根据目标虚拟机ID和目标虚拟机启用状态,分别获取开启目标虚拟机ID和关闭目标虚拟机ID,然后根据开启目标虚拟机ID将网管系统中与该开启目标虚拟机ID对应的虚拟机从资源池中调用并持久化;根据关闭目标虚拟机ID将网管系统中与该关闭目标虚拟机ID对应的虚拟机关闭,以实现虚拟化控制器的虚拟机数据与网管系统中的虚拟机数据保持同步和一致。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来 实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
上述技术方案实现了虚拟化控制的虚拟机数据及时同步到网管系统,从而网管系统中的虚拟机数据与虚拟化控制器中的虚拟机数据实时保持一致,为网管系统的其他功能模块或程序提供实时数据源,也使用户能够实时了解虚拟化控制器的虚拟机数据情况,便于对虚拟化控制器的监控。

Claims (11)

  1. 一种虚拟机数据加载方法,所述虚拟机数据加载方法包括以下步骤:
    当监听到虚拟化控制器发送的虚拟机启用消息通知时,获取所述虚拟化控制器发送的虚拟机启用状态消息;
    解析所述虚拟机启用状态消息得到需要加载虚拟机数据的目标虚拟机标识;
    根据所述目标虚拟机标识从预设的虚拟机资源池中查找获取与所述目标虚拟机标识对应的虚拟机数据,并将所述虚拟机数据加载到网管系统中进行持久化处理。
  2. 如权利要求1所述的虚拟机数据加载方法,所述方法还包括:
    所述当监听到虚拟化控制器发送的虚拟机启用消息通知时,获取所述虚拟化控制器发送的虚拟机启用状态消息的步骤之前,
    根据网管系统对虚拟机模型的定义和虚拟化控制器的最大容量,生成每种类型的虚拟机的数量和每种类型的虚拟机的数据;
    根据所述虚拟机的数量和数据构造虚拟机资源池。
  3. 如权利要求1所述的虚拟机数据加载方法,其中,所述目标虚拟机标识包括目标虚拟机身份验证码ID和目标虚拟机启用状态。
  4. 如权利要求3所述的虚拟机数据加载方法,其中,所述根据所述目标虚拟机标识从预设的虚拟机资源池中查找获取与所述目标虚拟机标识对应的虚拟机数据,并将所述虚拟机数据加载到网管系统中进行持久化的步骤包括:
    根据所述目标虚拟机ID和目标虚拟机启用状态,获取目标虚拟机启用状态为开启状态的开启目标虚拟机ID,获取目标虚拟机启用状态为关闭状态的关闭目标虚拟机ID;
    根据所述开启目标虚拟机ID,从预设的虚拟机资源池中查找获取与该开 启目标虚拟机ID对应的开启虚拟机数据,并将该开启虚拟机数据增加到网管系统中进行持久化;
    根据所述关闭目标虚拟机ID,将网管系统中与该关闭目标虚拟机ID相同的虚拟机数据删除。
  5. 如权利要求1所述的虚拟机数据加载方法,其中,将所述虚拟机数据加载到网管系统进行持久化的操作是以虚拟机为事务粒度,并且虚拟机间采用最大努力方式进行数据加载。
  6. 一种虚拟机数据加载装置,所述虚拟机数据加载装置包括:
    消息获取模块,设置为当监听到虚拟化控制器发送的虚拟机启用消息通知时,获取所述虚拟化控制器发送的虚拟机启用状态消息;
    消息解析模块,设置为解析所述虚拟机启用状态消息得到需要加载虚拟机数据的目标虚拟机标识;
    数据加载模块,设置为根据所述目标虚拟机标识从预设的虚拟机资源池中查找获取与所述目标虚拟机标识对应的虚拟机数据,并将所述虚拟机数据加载到网管系统中进行持久化处理。
  7. 如权利要求6所述的虚拟机数据加载装置,所述虚拟机数据加载装置还包括:
    生成数据模块,设置为根据网管系统对虚拟机模型的定义和虚拟化控制器的最大容量,生成每种类型的虚拟机的数量和每种类型的虚拟机的数据;
    构造资源池模块,设置为根据所述虚拟机的数量和数据构造虚拟机资源池。
  8. 如权利要求6所述的虚拟机数据加载装置,其中,所述目标虚拟机标识包括目标虚拟机身份验证码ID和目标虚拟机启用状态。
  9. 如权利要求8所述的虚拟机数据加载装置,其中,所述数据加载模块包括:
    ID获取单元,设置为根据所述目标虚拟机ID和目标虚拟机启用状态,获取目标虚拟机启用状态为开启状态的开启目标虚拟机ID,获取目标虚拟机启用状态为关闭状态的关闭目标虚拟机ID;
    数据持久化单元,设置为根据所述开启目标虚拟机ID,从预设的虚拟机资源池中查找获取与该开启目标虚拟机ID对应的开启虚拟机数据,并将该开启虚拟机数据增加到网管系统中进行持久化;
    数据删除单元,设置为根据所述关闭目标虚拟机ID,将网管系统中与该关闭目标虚拟机ID相同的虚拟机数据删除。
  10. 如权利要求6所述的虚拟机数据加载装置,其中,数据加载模块是设置为通过如下方式实现所述虚拟机数据加载到网管系统中进行持久化处理:
    将所述虚拟机数据加载到网管系统进行持久化的操作是以虚拟机为事务粒度,并且虚拟机间采用最大努力方式进行数据加载。
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1~5中任一项所述的方法。
PCT/CN2015/080506 2014-12-10 2015-06-01 虚拟机数据加载方法及系统 WO2016090865A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410758202.2A CN105740040B (zh) 2014-12-10 2014-12-10 虚拟机数据加载方法及系统
CN201410758202.2 2014-12-10

Publications (1)

Publication Number Publication Date
WO2016090865A1 true WO2016090865A1 (zh) 2016-06-16

Family

ID=56106574

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/080506 WO2016090865A1 (zh) 2014-12-10 2015-06-01 虚拟机数据加载方法及系统

Country Status (2)

Country Link
CN (1) CN105740040B (zh)
WO (1) WO2016090865A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399101B (zh) 2017-02-06 2021-03-16 腾讯科技(深圳)有限公司 资源调度的方法、装置和系统
CN115086405B (zh) * 2022-06-10 2024-05-31 上海莉莉丝科技股份有限公司 服务器的数据处理方法、系统、设备、介质及程序产品

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930376A (zh) * 2010-08-25 2010-12-29 中兴通讯股份有限公司 一种java虚拟机图片资源加载的方法和终端
US20130275969A1 (en) * 2012-04-17 2013-10-17 Vencislav Dimitrov Application installation management
CN103455392A (zh) * 2013-09-18 2013-12-18 成都易我科技开发有限责任公司 一种虚拟器及跨os的数据处理系统和方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479100B (zh) * 2010-11-26 2015-08-26 中国科学院软件研究所 一种普适计算环境虚拟机平台及其创建方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930376A (zh) * 2010-08-25 2010-12-29 中兴通讯股份有限公司 一种java虚拟机图片资源加载的方法和终端
US20130275969A1 (en) * 2012-04-17 2013-10-17 Vencislav Dimitrov Application installation management
CN103455392A (zh) * 2013-09-18 2013-12-18 成都易我科技开发有限责任公司 一种虚拟器及跨os的数据处理系统和方法

Also Published As

Publication number Publication date
CN105740040A (zh) 2016-07-06
CN105740040B (zh) 2020-07-14

Similar Documents

Publication Publication Date Title
WO2021042790A1 (zh) 分布式容器集群镜像管理主节点、从节点、系统及方法
US11184216B2 (en) State control method and apparatus
US20190205220A1 (en) System and method for live migration of a virtual machine
US9117019B2 (en) Debugging remote software applications across WAN connections
US9830181B2 (en) Method and system for gracefully shutdown virtual system
WO2017124933A1 (zh) 一种信息处理方法、装置和系统
US9565243B2 (en) System and method for managing event tracking
WO2016131172A1 (zh) 一种更新网络服务描述器nsd的方法及装置
WO2015188579A1 (zh) 分布式虚拟防火墙装置、方法及防火墙控制器
US20220100550A1 (en) Accelerator Loading Method, System, and Apparatus
WO2019041930A1 (zh) 巡检方法、装置、系统、计算机设备和存储介质
US20180302500A1 (en) Environment isolation method and device
WO2016062011A1 (zh) 告警处理方法及装置
CN107656705B (zh) 一种计算机存储介质和一种数据迁移方法、装置及系统
WO2017008578A1 (zh) 网络功能虚拟化架构中数据检查的方法和装置
CN109905492B (zh) 基于分布式模块化数据中心的安全运营管理系统及方法
US11212175B2 (en) Configuration management for cloud storage system and method
WO2017148297A1 (zh) 数据表连接方法及装置
CN105183495A (zh) 跨操作系统域来协调活动视图
CN103885865A (zh) 一种传感器管理方法及装置
CN105591778A (zh) 一种分布式系统更新配置文件的方法及系统
US8719622B2 (en) Recording and preventing crash in an appliance
WO2016090865A1 (zh) 虚拟机数据加载方法及系统
US9612935B2 (en) Enhanced resiliency testing by enabling state level control for request
CN110569140A (zh) 一种运维方法及装置

Legal Events

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

Ref document number: 15868068

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15868068

Country of ref document: EP

Kind code of ref document: A1