CN107102884B - Method and device for customizing virtual machine operation - Google Patents

Method and device for customizing virtual machine operation Download PDF

Info

Publication number
CN107102884B
CN107102884B CN201710154607.9A CN201710154607A CN107102884B CN 107102884 B CN107102884 B CN 107102884B CN 201710154607 A CN201710154607 A CN 201710154607A CN 107102884 B CN107102884 B CN 107102884B
Authority
CN
China
Prior art keywords
script
virtual machine
message
serial port
custom
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
CN201710154607.9A
Other languages
Chinese (zh)
Other versions
CN107102884A (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.)
Wuxi century century Polytron Technologies Inc.
Original Assignee
Wuxi Century Century Polytron Technologies Inc
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 Wuxi Century Century Polytron Technologies Inc filed Critical Wuxi Century Century Polytron Technologies Inc
Priority to CN201710154607.9A priority Critical patent/CN107102884B/en
Publication of CN107102884A publication Critical patent/CN107102884A/en
Application granted granted Critical
Publication of CN107102884B publication Critical patent/CN107102884B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/45562Creating, deleting, cloning virtual machine instances

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)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method for customizing virtual machine operation, which comprises the following steps: the operation management module receives a script of custom operation created by a user and a request for executing the custom operation on a target virtual machine, identifies the target virtual machine and a server where the target virtual machine is located, and then forwards the script of custom operation and the request to an operation agent module on the server in a message form; the operation agent module receives the message and forwards the message to a serial port of the target virtual machine; and an operation execution module in the target virtual machine monitors the message from the serial port, puts the message into a memory and executes the script of the custom operation contained in the message.

Description

Method and device for customizing virtual machine operation
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of virtualization, in particular to a method and a device for customizing virtual machine operation.
[ background of the invention ]
Through the virtualization technology, a user can deploy an application in a virtual machine, but the user is often required to log in the virtual machine for manual operation in order to manage and operate the application in the virtual machine or obtain the running state and the health condition of the application, so that inconvenience is brought to the user, for example, when the application cluster is large in scale, a plurality of virtual machines are required to log in for repeated operation; the applied health monitoring cannot be conveniently and uniformly acquired for further processing and the like.
[ summary of the invention ]
In view of the above, there is a need to provide a reliable and stable way for users to customize and uniformly manage operations performed inside a virtual machine. The customization means that the user creates a script or an operation in a self-mode without following a system template.
The embodiment of the invention discloses a method for customizing virtual machine operation, which comprises the following steps:
the operation management module receives a script of custom operation created by a user and a request for executing the custom operation on a target virtual machine, identifies the target virtual machine and a server where the target virtual machine is located, and then forwards the script of custom operation and the request to an operation agent module on the server in a message form;
the operation agent module receives the message and forwards the message to a serial port of the target virtual machine;
and an operation execution module in the target virtual machine monitors the message from the serial port, puts the message into a memory and executes the script of the custom operation contained in the message.
The operation execution module executes the script of the custom operation contained in the message, including:
the operation execution module detects whether the script of the custom operation contained in the message is lost;
if the script is lost, the operation execution module sends an instruction for acquiring the script to the operation agent module, the operation agent module acquires the script from the operation management module and pushes the acquired script into the serial port when receiving the instruction, and the operation execution module executes the script and feeds back an operation result to the serial port after recognizing the script;
and if the script is not lost, the operation execution module executes the script and feeds back an operation result to the serial port.
Further, after sending the message for acquiring the script to the operation agent module, the operation execution module checks whether the script exists at a preset frequency, and if no target script exists after a preset time, sends information indicating operation failure to the serial port.
Still further, the method further comprises:
after the operation result is sent to the serial port, the operation agent module receives the operation result and forwards the operation result to the operation management module;
and the operation management module receives the operation result and records the operation result into a database.
The invention also provides a device for customizing the operation of the virtual machine, which is characterized by comprising the following components:
the operation management module is used for receiving a script of the custom operation created by a user and a request for executing the custom operation of a target virtual machine, identifying the target virtual machine and a server where the target virtual machine is located, and forwarding the script of the custom operation and the request together in a message form;
the operation agent module is used for receiving the message and forwarding the message to a serial port of the target virtual machine;
and the operation execution module is used for monitoring the message from the serial port, putting the message into a memory and executing the script of the custom operation contained in the message.
Further, the operation execution module identifying the script of the custom operation contained in the message comprises:
the operation execution module detects whether the script of the custom operation contained in the message is lost;
if the script is lost, the operation execution module sends an instruction for acquiring the script to the operation agent module, the operation agent module acquires the script from the operation management module and pushes the acquired script into the serial port when receiving the instruction, and the operation execution module executes the script and feeds back an operation result to the serial port after recognizing the script;
and if the script is not lost, the operation execution module executes the script and feeds back an operation result to the serial port.
The invention allows the user to operate in batch and manage the application in the virtual machine in a unified way by a user-defined operation mode without manual operation of logging in the virtual machine by the user, and can reduce the work of the user on application operation and maintenance to a great extent. Compared with the prior art, the invention has the following beneficial effects:
1. the user can define some repeated and common operations in the form of scripts and transmits the operations to the virtual machines for batch execution through the device of the invention without the need of the user to remotely log in each virtual machine for respective operation;
2. the communication is carried out by using the serial port of the virtual machine, and the influence of a virtual machine network can not be caused.
[ description of the drawings ]
FIG. 1 is a flowchart showing the steps of example 1 of the present invention.
[ detailed description ] embodiments
The invention relates to a method for customizing virtual machine operation, which comprises the following specific implementation mode.
Example 1: referring to fig. 1, the method for executing the custom virtual machine operation of the present embodiment includes the following main steps:
s101, an operation management module receives a script of custom operation created by a user and a request for executing the custom operation on a target virtual machine, identifies the target virtual machine and a server where the target virtual machine is located, and then forwards the script of custom operation and the request to an operation agent module on the server in a message form;
s102, the operation agent module receives the message and forwards the message to a serial port of the target virtual machine;
s103, the operation execution module in the target virtual machine monitors the message from the serial port, puts the message into a memory, and executes the script of the custom operation contained in the message. It should be noted that operations herein refer to a user-defined collection comprising one or more scripts and script execution sequences. And the operation execution module carries out asynchronous processing after putting the message into the memory.
In step S103, the identifying, by the operation execution module, the script of the custom operation included in the message includes:
the operation execution module detects whether the script of the custom operation contained in the message is lost;
if the script is lost, the operation execution module sends an instruction for acquiring the script to the operation agent module, the operation agent module acquires the script from the operation management module and pushes the acquired script into the serial port when receiving the instruction, and the operation execution module executes the script and feeds back an operation result to the serial port after recognizing the script;
and if the script is not lost, the operation execution module executes the script and feeds back an operation result to the serial port. The operation execution module checks whether the script of the custom operation is lost by identifying the script and the script version number corresponding to the request.
Further, after sending the message for acquiring the script to the operation agent module, the operation execution module checks whether the script exists at a preset frequency, and if no target script exists after a preset time, sends information indicating operation failure to the serial port. The preset frequency is preferably a frequency of once a second, and the preset time period is preferably 30 seconds.
Further, the method further comprises:
after the operation result is sent to the serial port, the operation agent module receives the operation result and forwards the operation result to the operation management module;
and the operation management module receives the operation result and records the operation result into a database.
By the method and the device, the user is allowed to operate the virtual machines in batch and manage the customized virtual machine operation in a unified mode, the operation execution cannot be influenced by the change of the virtual machine network, and the management of the user on the virtual machines or the application is enhanced.
The invention also provides a device for customizing the operation of the virtual machine, which is characterized by comprising the following components:
the operation management module is used for receiving a script of the custom operation created by a user and a request for executing the custom operation of a target virtual machine, identifying the target virtual machine and a server where the target virtual machine is located, and forwarding the script of the custom operation and the request together in a message form;
the operation agent module is used for receiving the message and forwarding the message to a serial port of the target virtual machine;
and the operation execution module is used for monitoring the message from the serial port, putting the message into a memory and executing the script of the custom operation contained in the message.
Further, the operation execution module identifying the script of the custom operation contained in the message comprises:
the operation execution module detects whether the script of the custom operation contained in the message is lost;
if the script is lost, the operation execution module sends an instruction for acquiring the script to the operation agent module, the operation agent module acquires the script from the operation management module and pushes the acquired script into the serial port when receiving the instruction, and the operation execution module executes the script and feeds back an operation result to the serial port after recognizing the script;
and if the script is not lost, the operation execution module executes the script and feeds back an operation result to the serial port.
The invention allows the user to operate in batch and manage the application in the virtual machine in a unified way by a user-defined operation mode without manual operation of logging in the virtual machine by the user, and can reduce the work of the user on application operation and maintenance to a great extent.

Claims (3)

1. A method for customizing virtual machine operation is characterized in that a user is allowed to operate in batch and uniformly manage applications in a virtual machine in a customized operation mode, and the method comprises the following steps:
the operation management module receives a script of custom operation created by a user and a request for executing the custom operation on a target virtual machine, identifies the target virtual machine and a server where the target virtual machine is located, and then forwards the script of custom operation and the request to an operation agent module on the server in a message form;
the operation agent module receives the message and forwards the message to a serial port of the target virtual machine;
an operation execution module in the target virtual machine monitors the message from the serial port, puts the message into a memory, and executes the script of the custom operation contained in the message;
the operation execution module executes the script of the custom operation contained in the message, including:
the operation execution module detects whether the script of the custom operation contained in the message is lost;
if the script is lost, the operation execution module sends an instruction for acquiring the script to the operation agent module, the operation agent module acquires the script from the operation management module after receiving the instruction and pushes the acquired script into the serial port, and the operation execution module executes the script and feeds back an operation result to the serial port after recognizing the script; if the script is not lost, the operation execution module executes the script and feeds back an operation result to the serial port;
after the operation execution module sends an instruction for acquiring the script to the operation agent module, checking whether the script exists at a preset frequency, and if the script does not exist after a preset time, sending information for indicating operation failure to the serial port;
by means of the user-defined operation mode, the user is allowed to operate the applications in the virtual machine in batch and in unified management, and manual operation of logging in the virtual machine by the user is not needed.
2. The method of claim 1, wherein the method further comprises:
after the operation result is sent to the serial port, the operation agent module receives the operation result and forwards the operation result to the operation management module;
and the operation management module receives the operation result and records the operation result into a database.
3. A device for customizing virtual machine operation is characterized in that a user is allowed to operate in batch and uniformly manage applications in a virtual machine in a customized operation mode, and the device for customizing virtual machine operation comprises:
the operation management module is used for receiving a script of the custom operation created by a user and a request for executing the custom operation of a target virtual machine, identifying the target virtual machine and a server where the target virtual machine is located, and forwarding the script of the custom operation and the request together in a message form;
the operation agent module is used for receiving the message and forwarding the message to a serial port of the target virtual machine;
the operation execution module is used for monitoring the message from the serial port, putting the message into a memory and executing the script of the custom operation contained in the message;
the operation execution module executes the script of the custom operation contained in the message, including:
if the script is lost, the operation execution module sends an instruction for acquiring the script to the operation agent module, the operation agent module acquires the script from the operation management module and pushes the acquired script into the serial port when receiving the instruction, and the operation execution module executes the script and feeds back an operation result to the serial port after recognizing the script;
and if the script is not lost, the operation execution module executes the script and feeds back an operation result to the serial port.
CN201710154607.9A 2017-03-15 2017-03-15 Method and device for customizing virtual machine operation Active CN107102884B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710154607.9A CN107102884B (en) 2017-03-15 2017-03-15 Method and device for customizing virtual machine operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710154607.9A CN107102884B (en) 2017-03-15 2017-03-15 Method and device for customizing virtual machine operation

Publications (2)

Publication Number Publication Date
CN107102884A CN107102884A (en) 2017-08-29
CN107102884B true CN107102884B (en) 2021-06-22

Family

ID=59675700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710154607.9A Active CN107102884B (en) 2017-03-15 2017-03-15 Method and device for customizing virtual machine operation

Country Status (1)

Country Link
CN (1) CN107102884B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086122A (en) * 2018-08-16 2018-12-25 郑州云海信息技术有限公司 A kind of monitoring method of virtual machine, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013120243A1 (en) * 2012-02-13 2013-08-22 华为技术有限公司 System and method for processing virtual machine in cloud platform
CN103677858A (en) * 2012-08-30 2014-03-26 中兴通讯股份有限公司 Method, system and device for managing virtual machine software in cloud environment
CN105589734A (en) * 2015-12-15 2016-05-18 国云科技股份有限公司 Method for creating applications through self-defined templates

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013120243A1 (en) * 2012-02-13 2013-08-22 华为技术有限公司 System and method for processing virtual machine in cloud platform
CN103677858A (en) * 2012-08-30 2014-03-26 中兴通讯股份有限公司 Method, system and device for managing virtual machine software in cloud environment
CN105589734A (en) * 2015-12-15 2016-05-18 国云科技股份有限公司 Method for creating applications through self-defined templates

Also Published As

Publication number Publication date
CN107102884A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
CN108108297B (en) Method and device for automatic testing
CN112559133A (en) Cloud-edge coordination system and cloud-edge coordination method based on native container technology
CN108769112B (en) Non-invasive RPC interface monitoring method and system
EP3035644B1 (en) Determined configuration update for edge components
US11704616B2 (en) Systems and methods for distributed business processmanagement
KR20120085436A (en) Heterogeneous Virtual Server Consolidation System and Method
CN107908488B (en) Message request interface interaction method and device, computer equipment and storage medium
CN110943851B (en) Alarm processing method and device based on micro-service and electronic equipment
US9519537B2 (en) Apparatus, system and method for application log data processing
CN111324599B (en) Block chain experiment system and management method
CN113422692A (en) Method, device and storage medium for detecting and processing node faults in K8s cluster
CN111782534A (en) Business process monitoring method, device and system
CN110932918A (en) Log data acquisition method and device and storage medium
CN112134754A (en) Pressure testing method and device, network equipment and storage medium
CN108399095B (en) Method, system, device and storage medium for supporting dynamic management of timed tasks
CN117130730A (en) Metadata management method for federal Kubernetes cluster
CN111769979A (en) Cloud resource arranging method, system, terminal and storage medium
CN101826985B (en) Plugin-based centralized signaling tracing method and system
CN115001967A (en) Data acquisition method and device, electronic equipment and storage medium
CN107102884B (en) Method and device for customizing virtual machine operation
US10073689B2 (en) Managing application lifecycles within a federation of distributed software applications
CN117724803A (en) Cloud service deployment method, device and platform
CN113282308A (en) Mirror image construction method and device, storage medium and electronic device
CN109947576A (en) A kind of method of virtual machine internal broker program management
CN104618474B (en) Facility information store method and device

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
TA01 Transfer of patent application right

Effective date of registration: 20210226

Address after: 514799 Room 301, building 2, Shanshui pearl, No.6 Jianying Avenue, Meixian District, Meizhou City, Guangdong Province

Applicant after: Lai Hongyuan

Address before: 518055 13 / F, building C3, Nanshan wisdom garden, 1001 Xueyuan Avenue, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN SHENCLOUD TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210602

Address after: 214000 188-1220 Guangyi Road, Liangxi District, Wuxi City, Jiangsu Province

Applicant after: Wuxi century century Polytron Technologies Inc.

Address before: 514799 Room 301, building 2, Shanshui pearl, No.6 Jianying Avenue, Meixian District, Meizhou City, Guangdong Province

Applicant before: Lai Hongyuan

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method and device for customizing virtual machine operation

Effective date of registration: 20220225

Granted publication date: 20210622

Pledgee: Bank of Jiangsu Limited by Share Ltd. Wuxi branch

Pledgor: Wuxi century century Polytron Technologies Inc.

Registration number: Y2022990000101

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Granted publication date: 20210622

Pledgee: Bank of Jiangsu Limited by Share Ltd. Wuxi branch

Pledgor: Wuxi century century Polytron Technologies Inc.

Registration number: Y2022990000101

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Methods and Devices for Customizing Virtual Machine Operations

Granted publication date: 20210622

Pledgee: Bank of Jiangsu Limited by Share Ltd. Wuxi branch

Pledgor: Wuxi century century Polytron Technologies Inc.

Registration number: Y2024980025086

PE01 Entry into force of the registration of the contract for pledge of patent right