CN112148572B - Virtual machine cluster test method, system, electronic device and storage medium - Google Patents

Virtual machine cluster test method, system, electronic device and storage medium Download PDF

Info

Publication number
CN112148572B
CN112148572B CN202010864780.XA CN202010864780A CN112148572B CN 112148572 B CN112148572 B CN 112148572B CN 202010864780 A CN202010864780 A CN 202010864780A CN 112148572 B CN112148572 B CN 112148572B
Authority
CN
China
Prior art keywords
virtual machine
application
test
multiplexing
time
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
CN202010864780.XA
Other languages
Chinese (zh)
Other versions
CN112148572A (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.)
Hangzhou Xujian Science And Technology Co ltd
Original Assignee
Hangzhou Xujian Science And 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 Hangzhou Xujian Science And Technology Co ltd filed Critical Hangzhou Xujian Science And Technology Co ltd
Priority to CN202010864780.XA priority Critical patent/CN112148572B/en
Publication of CN112148572A publication Critical patent/CN112148572A/en
Application granted granted Critical
Publication of CN112148572B publication Critical patent/CN112148572B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application relates to a virtual machine cluster testing method, a system, an electronic device and a storage medium, wherein the virtual machine cluster testing method comprises the following steps: the method comprises the steps of obtaining the types of virtual machines, determining an application virtual machine and a test virtual machine according to the types of the virtual machines, distributing notification to monitoring background of each physical host by a main program under the condition that a time-sharing multiplexing switch is started, obtaining application data packets of the physical hosts by a slave program, judging whether the application virtual machine has data packets or not according to the application data packets, closing the application virtual machine under the condition that the application virtual machine has no data packets, and starting the test virtual machine to conduct cluster test. The application solves the problem of congestion caused by the operation of deploying application virtual machines and cluster test virtual machines at the same time, improves the efficiency and usability of the server, and reduces the research and development cost.

Description

Virtual machine cluster test method, system, electronic device and storage medium
Technical Field
The present application relates to the field of computers, and in particular, to a method, a system, an electronic device, and a storage medium for virtual machine cluster testing.
Background
With the rapid development of information technology, virtualization technology is widely used, virtual machines are created and managed on physical machines based on virtualization technology (Kernel Virtual Machine, abbreviated as KVM), and the division of physical machine resources can be realized, so that a plurality of virtual system environments can be operated. However, in the actual use process, since the physical machine resources are limited, all virtual machines cannot be supported to run continuously, so that the running states of the virtual machines need to be coordinated to improve the efficiency and usability of the server.
In the related technology, when the virtual machine is applied to run, the cluster test virtual machine is deployed for testing, so that the internal resource allocation of the physical machine is insufficient, the hard disk speed reaches the bottleneck of the whole system, and even hardware equipment can be damaged under high-load running.
At present, no effective solution is proposed for the problem of running congestion of an application virtual machine and a cluster test virtual machine under the condition of limited physical resources in the related technology.
Disclosure of Invention
The embodiment of the application provides a method, a system, an electronic device and a storage medium for testing a virtual machine cluster, which at least solve the problem of running congestion of an application virtual machine and a cluster test virtual machine under the condition of limited physical resources in the related technology.
In a first aspect, an embodiment of the present application provides a method for testing a virtual machine cluster, where the method includes:
acquiring the type of a virtual machine, and determining an application virtual machine and a test virtual machine according to the type of the virtual machine;
under the condition that a time-sharing multiplexing switch is turned on, a main program distributes notification to each physical host monitoring background, an application data packet of the physical host is obtained from a program, and whether the application virtual machine has a data packet or not is judged according to the application data packet;
and under the condition that the application virtual machine is judged to have no data packet, closing the application virtual machine, and starting the test virtual machine to perform cluster test.
In some of these embodiments, after the time division multiplexing switch is turned on, the method includes:
and acquiring a preset multiplexing time period, wherein in the multiplexing time period, the main program judges whether the application virtual machine has a data packet or not according to the application data packet.
In some embodiments, in a case that the application virtual machine is determined to have no data packet, closing the application virtual machine includes:
and closing the application virtual machine under the condition that the data packet of the application virtual machine is not captured in the first time period.
In some embodiments, the closing the application virtual machine and opening the test virtual machine to perform cluster testing includes:
under the condition that the application virtual machine is closed, acquiring server performance information;
and under the condition that the performance information of the server reaches a preset performance index, starting the test virtual machines one by one to perform cluster test until the test virtual machines are started, and performing cluster test on the test virtual machines.
In some embodiments, after the starting the test virtual machine to perform the cluster test, the method includes:
and at a preset time point, the main program distributes a closing multiplexing notification to each physical host monitoring background, and the slave programs of the physical hosts close the test virtual machines one by one to recover the application virtual machines.
In a second aspect, an embodiment of the present application provides a system for testing a virtual machine cluster, where the system includes: a server and a physical host;
the server acquires the type of the virtual machine, and determines an application virtual machine and a test virtual machine according to the type of the virtual machine;
under the condition that a time-sharing multiplexing switch is started, a main program of the server distributes notification to each physical host monitoring background, a slave program of the server acquires an application data packet of the physical host, and the server judges whether the application virtual machine has a data packet according to the application data packet;
and under the condition that the server judges that the application virtual machine has no data packet, closing the application virtual machine, and starting the test virtual machine to perform cluster test.
In some embodiments, after the time division multiplexing switch is turned on, the server acquires a preset multiplexing time period, and in the multiplexing time period, the main program determines that the application virtual machine has no data packet according to the application data packet.
In some embodiments, the closing the application virtual machine and opening the test virtual machine to perform cluster testing includes:
under the condition that the application virtual machine is closed, the server acquires server performance information;
and under the condition that the performance information of the server reaches a preset performance index, the server starts the test virtual machines one by one to perform cluster test until the test virtual machines are started, and the test virtual machines perform cluster test.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory, in which a computer program is stored, and a processor configured to run the computer program to perform the method of virtual machine cluster testing of any one of the above.
In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored therein, where the computer program is configured to perform, when run, a method of virtual machine cluster testing as described in any one of the preceding claims.
Compared with the related art, the virtual machine cluster testing method provided by the embodiment of the application has the advantages that the types of the virtual machines are obtained, and the application virtual machine and the test virtual machine are determined according to the types of the virtual machines; under the condition that a time-sharing multiplexing switch is turned on, a main program distributes notification to each physical host monitoring background, an application data packet of the physical host is obtained from a program, and whether the application virtual machine has a data packet or not is judged according to the application data packet; under the condition that the application virtual machine is judged to have no data packet, the application virtual machine is closed, the test virtual machine is started to conduct cluster test, the problem that the operation of the application virtual machine and the cluster test virtual machine is blocked under the condition of limited physical resources is solved, and the efficiency and the usability of the server are improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a schematic view of an application environment of a method for virtual machine cluster testing according to an embodiment of the present application;
FIG. 2 is a flow chart of a virtual machine cluster test method according to an embodiment of the application;
FIG. 3 is a block diagram of a virtual machine cluster test system, according to an embodiment of the application;
FIG. 4 is a system diagram of a virtualized time-division multiplexed cluster test environment in accordance with an embodiment of the application;
fig. 5 is a schematic view of an internal structure of an electronic device according to an embodiment of the present application.
Detailed Description
The present application will be described and illustrated with reference to the accompanying drawings and examples in order to make the objects, technical solutions and advantages of the present application more apparent. 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. All other embodiments, which can be made by a person of ordinary skill in the art based on the embodiments provided by the present application without making any inventive effort, are intended to fall within the scope of the present application. Moreover, it should be appreciated that while such a development effort might be complex and lengthy, it would nevertheless be a routine undertaking of design, fabrication, or manufacture for those of ordinary skill having the benefit of this disclosure, and thus should not be construed as having the benefit of this disclosure.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by those of ordinary skill in the art that the described embodiments of the application can be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," and similar referents in the context of the application are not to be construed as limiting the quantity, but rather as singular or plural. The terms "comprising," "including," "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "connected," "coupled," and the like in connection with the present application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means greater than or equal to two. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., "a and/or B" may mean: a exists alone, A and B exist together, and B exists alone. The terms "first," "second," "third," and the like, as used herein, are merely distinguishing between similar objects and not representing a particular ordering of objects.
The method for testing the virtual machine cluster provided by the application can be applied to an application environment shown in fig. 1, fig. 1 is an application environment schematic diagram of the method for testing the virtual machine cluster according to the embodiment of the application, as shown in fig. 1, wherein a system of the application environment comprises a server 10 and each physical host 11, a cloud management platform is operated on the server 10, the cloud management platform sets virtual machines and is divided into the application virtual machines and the test virtual machines according to the types of the virtual machines, a main program of a cloud management background monitors and distributes notification to each physical host 11, acquires application data packets of each physical host 11 from the program, and judges whether the application virtual machine has no data packets according to the application data packets under the condition that a time division multiplexing switch is started; under the condition that the application virtual machine is judged to have no data packet, the application virtual machine is closed, the test virtual machine is started to conduct cluster test, and the problem of congestion caused by the fact that the application virtual machine and the cluster test virtual machine are deployed and run simultaneously in the process of using the virtual machine to conduct research and development test is solved, so that in order to improve the efficiency of a server, the physical resource can be allocated to run the virtual machine in a time-sharing multiplexing mode.
The embodiment provides a virtual machine cluster testing method, and fig. 2 is a flowchart of a virtual machine cluster testing method according to an embodiment of the application, as shown in fig. 2, where the flowchart includes the following steps:
in step S201, the cloud management platform sets up virtual machines, and divides the virtual machines into application virtual machines and test virtual machines according to the types of the virtual machines, and stores the application virtual machines and the test virtual machines in a database, where the cloud management platform (Cloud Management Platform, abbreviated as CMP) is a unified management platform for data center resources, and provides data and space (such as a network disk, a micro disk, etc.) for data storage operation by means of a network or the internet. The functions of the cloud management platform comprise virtual machine remote control management, self-service interface, multi-role support, on-demand virtual data center hosting, elastic load management, virtual machine monitoring and high availability, resource over allocation and quota, service directory, storage and network resource configuration, resource management and monitoring and the like. The virtual machine is a complete computer system which is simulated by software and has the function of a complete hardware system and operates in a complete isolation environment, common virtual machines comprise a Java virtual machine, a Linux virtual machine and windows virtual machines, and the functions of the virtual machines comprise a demonstration environment, the quick operation of a host machine, the testing of applications, the use of different operating systems and the like. In the embodiment, the cloud management platform is utilized to create and manage the virtual machines, the types of the virtual machines are divided into the application virtual machines and the test virtual machines, wherein the application virtual machines are used for technical research and development, the test virtual machines are used for cluster test, and the working efficiency can be improved by calling the virtual machines in a classified mode.
Step S202, a cloud management platform sets a time-sharing multiplexing switch to be started, a main program receives a notification of the cloud management platform webpage to start the time-sharing multiplexing switch, starting a multiplexing task, under the condition that the time-sharing multiplexing switch is started, the main program distributes the notification to each physical host monitoring background, an application data packet passing through the physical host is obtained from the program, whether the application virtual machine has a data packet or not is judged according to the application data packet, wherein the main program is positioned in the cloud management background and is used for receiving the notification of the cloud management platform webpage to start the time-sharing multiplexing switch and distributing the notification to the monitoring background of each physical host; the slave program is located in the physical host for acquiring application data packets passing through the physical host. Time division multiplexing (Time Division Multiplexing, simply referred to as TDM) is a method of transmitting different signals using different time periods of the same physical connection, so as to achieve the purpose of multiplexing, and is applied to transmitting multiple data by one line in a network. Alternatively, the time division multiplexing is divided into synchronous time division multiplexing and asynchronous time division multiplexing, and the synchronous time division multiplexing (Synchronous Time Division Multiplexing, abbreviated as STDM) adopts a fixed time slot allocation mode, that is, the time of transmitting signals is continuously divided into specific time periods (one period) according to specific lengths, each time period is further divided into a plurality of time slots with equal lengths, each time slot is allocated to each digital signal in a fixed mode, and each digital signal is sequentially allocated to one time slot in each time period. Asynchronous time division multiplexing (Asynchronous Time Division Multiplexing, abbreviated as ATDM) is a time division multiplexing technique that dynamically allocates channel resources according to the actual needs of users. The asynchronous time division multiplexing technology divides the data of the users into data units, and the data units of different users still share channels in a time division manner, but time slots can be dynamically allocated according to the requirements of the users so as to avoid idle time slots in each frame. In addition, in asynchronous time division multiplexing, each user can obtain a higher transmission rate by occupying multiple time slots, and the highest rate can reach the total transmission capacity of the circuit, namely, the user occupies all the time slots. The frequency utilization rate can be effectively improved by adopting the time division multiplexing technology, and the anti-interference capability of the network is enhanced.
And step S203, closing the application virtual machine and starting the test virtual machine to perform cluster test under the condition that the application virtual machine has no data packet. Optionally, if the application virtual machine is detected by the slave program that the application data packet passing through the physical host is not acquired, the application virtual machine is closed, and the test virtual machine is started to perform cluster test, wherein the definition of the application data packet can be set in advance.
Through the steps S201 to S203, compared with the prior art, when the application virtual machine is operated, the deployment of the cluster test virtual machine for testing can lead to insufficient allocation of internal resources of the physical machine, the hard disk speed reaches the bottleneck of the whole system, and even the problem of damaging hardware equipment under high-load operation can be solved. According to the embodiment, a time division multiplexing method is adopted, a cloud management platform divides a virtual machine into two types of an application virtual machine and a test virtual machine and stores the two types in a database for time division multiplexing, a time division multiplexing switch is set by the cloud management platform, a main program receives a notification of the time division multiplexing switch which is started by a webpage of the cloud management platform, starting multiplexing tasks, the main program distributes the notification to each physical host monitoring background, acquires an application data packet passing through the physical host from the program, judges whether the application virtual machine has no data packet according to the application data packet, closes the application virtual machine under the condition that the application virtual machine has no data packet, starts the test virtual machine for cluster test, so that physical resources of the virtual machine are fully utilized, the problem of congestion caused by running of the application virtual machine and the cluster test virtual machine which are deployed simultaneously in the prior art is solved, efficiency and usability of a server are improved, and research and development cost is reduced.
In some embodiments, the cloud management platform sets a multiplexing switch and multiplexing time, stores the multiplexing time in the database, after the time-sharing multiplexing switch is turned on, the main program invokes the multiplexing time, in the multiplexing time period, the main program distributes notification to the monitoring background of each physical host, receives a data packet passing through the physical host from the program, and determines that the application virtual machine has no data packet according to the application data packet, where the multiplexing time can be set according to experience, for example, in the case that the multiplexing time is 00:00-08:00, the cloud management turns on the multiplexing switch, the main program receives the notification of enabling the multiplexing switch by the webpage of the cloud management platform, automatically acquires the starting time, and turns on the multiplexing task at 00:00. Through the setting of multiplexing time period, the server use peak can be staggered, and the resource waste is avoided.
In some of these embodiments, determining that the application virtual machine is free of data packets includes: and acquiring the data packet passing through the physical host from the program, wherein the application data packet sent to the application virtual machine is not captured in a first time period, and the first time period can be set according to requirements, for example, if the first time period is 5 minutes, if the application data packet sent to the application virtual machine is not captured by the slave program, the application virtual machine is closed.
In some embodiments, in order to improve the running efficiency of the server, the performance information of the server may be obtained when the application virtual machine is turned off, and the test virtual machines are turned on one by one when the performance state of the server reaches a preset performance index, until the test virtual machine is started, and an automatic cluster test task is started. Optionally, the preset performance index may be set according to the running requirement of the server, for example, in the case that the preset performance index is 80% of the system performance, the test virtual machines may be turned on one by one to perform the cluster test.
In some embodiments, after the test virtual machine is started to perform cluster test, after the time reaches the preset time node, the main program distributes a shutdown multiplexing notification to each physical host monitoring background, and the slave programs shut down the test virtual machine one by one, and restore the previous application virtual machine. The preset time node may be determined according to a multiplexing time set on the management platform, for example, when the preset multiplexing time 08:00 is reached, the main program distributes a multiplexing closing notification to each physical host monitoring background, and the slave program closes the test virtual machines one by one, and resumes the previous application virtual machines.
It should be noted that the steps illustrated in the above-described flow or flow diagrams of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flow diagrams, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
The embodiment also provides a system for testing a virtual machine cluster, which is used for implementing the above embodiment and the preferred implementation manner, and the description is omitted. As used below, the terms "module," "unit," "sub-unit," and the like may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 3 is a block diagram of a virtual machine cluster test system according to an embodiment of the present application, and as shown in fig. 3, the system includes a classification module 31, an enabling module 32, and a judging module 33:
the classification module 31 is configured to set a virtual machine by the cloud management platform, and divide the virtual machine into an application virtual machine and a test virtual machine according to the type of the virtual machine; the enabling module 32 is configured to, when the time-sharing multiplexing switch is turned on, send a notification to each physical host monitoring background by a main program of the cloud management background, obtain an application data packet of each physical host from the program, and determine whether an application virtual machine has a data packet according to the application data packet; and the judging module 33 is used for closing the application virtual machine and starting the test virtual machine to perform cluster test under the condition that the application virtual machine has no data packet.
Through the system, the classification module 31 classifies virtual machines into two types, namely an application virtual machine and a test virtual machine, wherein the application virtual machine is used for technical research and development, the test virtual machine is used for cluster test, and the classification type calls the virtual machine to execute different tasks, so that the working efficiency is improved; the starting module 32 adopts a time division multiplexing technology, and under the condition that a time division multiplexing switch is started, a main program of the cloud management background distributes notification to each physical host monitoring background, application data packets of each physical host are acquired from the program, whether the application virtual machine has no data packets is judged according to the application data packets, and the frequency utilization rate is effectively improved; the judging module 33 may judge that the application virtual machine is closed and the test virtual machine is opened to perform the cluster test under the condition that the application virtual machine has no data packet. The whole system solves the problem of congestion caused by the operation of deploying application virtual machines and cluster test virtual machines at the same time, improves the efficiency and usability of the server, and reduces the research and development cost.
In some embodiments, the enabling module 32 is further configured to obtain a preset multiplexing time period after the time division multiplexing switch is turned on, and determine whether the application virtual machine has an application data packet according to the data packet obtained from the program in the multiplexing time period. The multiplexing time may be set according to experience, for example, when the multiplexing time is 00:00-08:00, the cloud management starts the multiplexing switch, the main program receives notification that the webpage of the cloud management platform starts the multiplexing switch, automatically acquires the starting time, and starts the multiplexing task at 00:00. According to the embodiment, the multiplexing time is set, so that the service peaks of the server can be staggered, the resource waste is avoided, and the efficiency of the server is improved.
In some embodiments, considering the performance problem of the server, under the condition that the application virtual machine is closed and the test virtual machine is opened, the performance information of the server is obtained, and under the condition that the performance information of the server reaches the preset performance indexes, the server starts the test virtual machines one by one to perform cluster test until the start of the test virtual machines is completed, and the test virtual machines start the cluster test, wherein the preset performance indexes can be set according to the running requirement of the server, for example, under the condition that the preset performance indexes are 80% of the system performance, the test virtual machines can be started one by one to perform the cluster test, and the usability of the server can be improved.
The present application is described in detail below in connection with application scenarios.
The application aims to provide a virtualized time-sharing multiplexing cluster test environment, and fig. 4 is a system schematic diagram of the virtualized time-sharing multiplexing cluster test environment according to an embodiment of the application, as shown in fig. 4, virtual machines are divided into two types in total, namely an application virtual machine and a test virtual machine, whether the application virtual machine has application data packets or not is detected through monitoring, the application virtual machine is stopped, and the test virtual machine is started for cluster test.
The flow steps of the technical scheme of the virtualized time-sharing multiplexing cluster test in the embodiment comprise:
s1, adding a virtual machine on a webpage of a cloud management platform, storing the type of the virtual machine in a database, and distinguishing an application virtual machine from a test virtual machine;
s2, setting time-sharing multiplexing switch starting on a cloud management platform, setting multiplexing time, for example, the multiplexing time is 00:00-08:00, and storing the multiplexing time in a database;
s3, the main program of the cloud management background receives a notice of starting a time-sharing multiplexing switch of a webpage of the cloud management platform, automatically acquires starting time and starts multiplexing tasks at 00:00;
s4, after the multiplexing task is started, the main program distributes notification to the monitoring background of each physical host, all data packets passing through the physical host are acquired from the program of each physical host, and if the application data packets sent to the application virtual machine are not acquired within 5 minutes (wherein the definition of the application data packets can be preset), the application virtual machine is started to be closed;
s5, after the application virtual machines are closed, because the application virtual machines closed by the physical machines are unequal, at the moment, according to the performance condition of the server and the performance cost of 80 percent of the system, the test virtual machines are started one by one to perform cluster test until the test virtual machines are started, and an automatic test task is started
S6, when the time reaches 8 points, the main program distributes the closing multiplexing notification to the slave programs again, at the moment, the slave programs close the test virtual machines one by one, and the previous application virtual machines are restored
By the system, time-sharing multiplexing is realized under the condition of limited physical resources, and automatic cluster testing is completed.
The present embodiment also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
In addition, in combination with the method for testing the virtual machine cluster in the embodiment, the embodiment of the application can be realized by providing a storage medium. The storage medium has a computer program stored thereon; the computer program, when executed by a processor, implements the method of virtual machine cluster testing of any of the above embodiments.
In one embodiment, fig. 5 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present application, and as shown in fig. 5, an electronic device, which may be a server, is provided, and an internal structure diagram thereof may be as shown in fig. 5. The electronic device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the electronic device is for storing data. The network interface of the electronic device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of virtual machine cluster testing.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the electronic device to which the present inventive arrangements are applied, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be understood by those skilled in the art that the technical features of the above-described embodiments may be combined in any manner, and for brevity, all of the possible combinations of the technical features of the above-described embodiments are not described, however, they should be considered as being within the scope of the description provided herein, as long as there is no contradiction between the combinations of the technical features.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A method for virtual machine cluster testing, the method comprising:
acquiring the type of a virtual machine, and determining an application virtual machine and a test virtual machine according to the type of the virtual machine;
the cloud management platform sets a time-sharing multiplexing switch and multiplexing time, stores the multiplexing time in a database, and after the time-sharing multiplexing switch is turned on, a main program calls the multiplexing time, and in a multiplexing time period, the main program distributes notification to each physical host monitoring background, acquires an application data packet of the physical host from a program, and judges whether the application virtual machine has a data packet according to the application data packet; the main program is located in the background of the cloud management platform and is used for receiving the notification of enabling the time-sharing multiplexing switch by the webpage of the cloud management platform and distributing the notification to the monitoring background of each physical host; the slave program is positioned in the physical host computer and is used for acquiring an application data packet passing through the physical host computer;
and under the condition that the application virtual machine is judged to have no data packet, closing the application virtual machine, and starting the test virtual machine to perform cluster test.
2. The method of claim 1, wherein after the time division multiplexing switch is turned on, the method comprises:
and acquiring a preset multiplexing time period, wherein in the multiplexing time period, the main program judges whether the application virtual machine has a data packet or not according to the application data packet.
3. The method of claim 1, wherein the closing the application virtual machine if it is determined that the application virtual machine has no data packets comprises:
and closing the application virtual machine under the condition that the data packet of the application virtual machine is not captured in the first time period.
4. The method of claim 1, wherein the turning off the application virtual machine and the turning on the test virtual machine for cluster testing comprises:
under the condition that the application virtual machine is closed, acquiring server performance information;
and under the condition that the performance information of the server reaches a preset performance index, starting the test virtual machines one by one to perform cluster test until the test virtual machines are started, and performing cluster test on the test virtual machines.
5. The method according to any one of claims 1 to 4, wherein after the starting the test virtual machine for cluster testing, the method comprises:
and at a preset time point, the main program distributes a closing multiplexing notification to each physical host monitoring background, and the slave programs of the physical hosts close the test virtual machines one by one to recover the application virtual machines.
6. A system for virtual machine cluster testing, the system comprising: a server and a physical host;
the server acquires the type of the virtual machine, and determines an application virtual machine and a test virtual machine according to the type of the virtual machine;
the cloud management platform sets a time-sharing multiplexing switch and multiplexing time, stores the multiplexing time in a database, and after the time-sharing multiplexing switch is turned on, a main program calls the multiplexing time, and in a multiplexing time period, the main program of the server distributes notifications to each physical host monitoring background, a slave program of the server acquires application data packets of the physical host, and the server judges whether the application virtual machine has no data packets according to the application data packets; wherein the cloud management platform is operated on the server; the main program is positioned in the background of the cloud management platform and is used for receiving the notification of enabling the time-sharing multiplexing switch by the webpage of the cloud management platform and distributing the notification to the monitoring background of each physical host; the slave program is positioned in the physical host computer and is used for acquiring an application data packet passing through the physical host computer;
and under the condition that the server judges that the application virtual machine has no data packet, closing the application virtual machine, and starting the test virtual machine to perform cluster test.
7. The system of claim 6, wherein the server obtains a preset multiplexing time period after the time division multiplexing switch is turned on, and the main program determines that the application virtual machine has no data packet according to the application data packet during the multiplexing time period.
8. The system of claim 6, wherein the turning off the application virtual machine and the turning on the test virtual machine for cluster testing comprises:
under the condition that the application virtual machine is closed, the server acquires server performance information;
and under the condition that the performance information of the server reaches a preset performance index, the server starts the test virtual machines one by one to perform cluster test until the test virtual machines are started, and the test virtual machines perform cluster test.
9. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of virtual machine cluster testing of any of claims 1 to 5.
10. A storage medium having stored therein a computer program, wherein the computer program is arranged to perform the method of virtual machine cluster testing of any one of claims 1 to 5 at run-time.
CN202010864780.XA 2020-08-25 2020-08-25 Virtual machine cluster test method, system, electronic device and storage medium Active CN112148572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010864780.XA CN112148572B (en) 2020-08-25 2020-08-25 Virtual machine cluster test method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010864780.XA CN112148572B (en) 2020-08-25 2020-08-25 Virtual machine cluster test method, system, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN112148572A CN112148572A (en) 2020-12-29
CN112148572B true CN112148572B (en) 2023-09-19

Family

ID=73889094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010864780.XA Active CN112148572B (en) 2020-08-25 2020-08-25 Virtual machine cluster test method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN112148572B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423109A (en) * 2017-05-24 2017-12-01 兰雨晴 Virtual machine energy-saving scheduling method based on anonymous stochastic variable
CN206790524U (en) * 2016-12-01 2017-12-22 广州高能计算机科技有限公司 A kind of based on performance requirement and sequence cloud service system
CN107741868A (en) * 2017-10-19 2018-02-27 郑州云海信息技术有限公司 The method to set up and device of a kind of basic input-output system BIOS
CN111538561A (en) * 2020-03-27 2020-08-14 上海仪电(集团)有限公司中央研究院 OpenStack large-scale cluster deployment test method and system based on KVM virtualization technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN206790524U (en) * 2016-12-01 2017-12-22 广州高能计算机科技有限公司 A kind of based on performance requirement and sequence cloud service system
CN107423109A (en) * 2017-05-24 2017-12-01 兰雨晴 Virtual machine energy-saving scheduling method based on anonymous stochastic variable
CN107741868A (en) * 2017-10-19 2018-02-27 郑州云海信息技术有限公司 The method to set up and device of a kind of basic input-output system BIOS
CN111538561A (en) * 2020-03-27 2020-08-14 上海仪电(集团)有限公司中央研究院 OpenStack large-scale cluster deployment test method and system based on KVM virtualization technology

Also Published As

Publication number Publication date
CN112148572A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
CN107832100B (en) APK plug-in loading method and terminal thereof
US8082400B1 (en) Partitioning a memory pool among plural computing nodes
CN110096220B (en) Distributed storage system, data processing method and storage node
CN104978231A (en) Multisystem device based on internal storage partitions and loading and switching method thereof
CN110267276B (en) Network slice deployment method and device
CN111338779B (en) Resource allocation method, device, computer equipment and storage medium
CN114615340B (en) Request processing method and device, computer equipment and storage device
CN110637272A (en) Dynamic maximum frequency limit for processing core group
CN114945028A (en) Information processing method based on Internet of things equipment, related equipment and storage medium
CN103634128A (en) A configuration method of a virtual machine placing strategy and an apparatus
CN113886058A (en) Cross-cluster resource scheduling method and device
CN112148572B (en) Virtual machine cluster test method, system, electronic device and storage medium
CN108833570B (en) Cluster storage and balanced transmission system based on cloud storage
CN114629958B (en) Resource allocation method, device, electronic equipment and storage medium
CN110545336A (en) IP address replacing method, device, computer equipment and storage medium
CN113093995A (en) Cloud disk data migration method and system
CN115878309A (en) Resource allocation method, device, processing core, equipment and computer readable medium
CN111245794B (en) Data transmission method and device
CN114489930A (en) Virtual machine live migration method, device and system
CN115827745A (en) Memory database cluster and implementation method and device thereof
CN114040378A (en) Application arranging method and device, computer equipment and storage medium
CN110347473B (en) Method and device for distributing virtual machines of virtualized network elements distributed across data centers
CN117032905B (en) Method and system for associating container cluster with block storage and virtual machine
CN114721834B (en) Resource allocation processing method, device, equipment, vehicle and medium
CN117472799B (en) Elastic allocation method, device, terminal and storage medium for cache resources

Legal Events

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