CN111143026A - Method for modifying internal configuration of virtual machine on line - Google Patents

Method for modifying internal configuration of virtual machine on line Download PDF

Info

Publication number
CN111143026A
CN111143026A CN201911193576.3A CN201911193576A CN111143026A CN 111143026 A CN111143026 A CN 111143026A CN 201911193576 A CN201911193576 A CN 201911193576A CN 111143026 A CN111143026 A CN 111143026A
Authority
CN
China
Prior art keywords
virtual machine
physical host
command
client
client virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911193576.3A
Other languages
Chinese (zh)
Inventor
周江福
卫宁
张哲�
李国兵
陈卓
刘毅枫
王晔
毛可绪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CSSC Systems Engineering Research Institute
Original Assignee
CSSC Systems Engineering Research Institute
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 CSSC Systems Engineering Research Institute filed Critical CSSC Systems Engineering Research Institute
Priority to CN201911193576.3A priority Critical patent/CN111143026A/en
Publication of CN111143026A publication Critical patent/CN111143026A/en
Pending legal-status Critical Current

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
    • 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/45583Memory management, e.g. access or allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

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)

Abstract

A method for modifying internal configuration of virtual machine on line includes confirming communication rule between physical host and client virtual machine, loading serial port device on each client virtual machine to realize IO of each client virtual machine and physical host user space, controlling physical host to forward command of each client virtual machine to corresponding client virtual machine, obtaining command or parameter data by analyzing command or parameter data according to communication rule after command or parameter data is received by corresponding serial port device when command or parameter data is found out by virtual machine, executing and sending execution result to physical host through corresponding serial port device to complete internal configuration of virtual machine on line. Compared with the prior art, the method and the device have the advantages that the configuration files of the virtual machines can be modified in batch without logging in the virtual machines, the working efficiency is improved, and the working time is saved.

Description

Method for modifying internal configuration of virtual machine on line
Technical Field
The invention relates to a method for modifying the internal configuration of a virtual machine on line.
Background
In recent years, management in the field of virtualization is becoming more important, including storage virtualization management, network virtualization management, memory virtualization management, and virtual machine configuration management, wherein the importance of virtual machine configuration management is also becoming more important due to a closer relationship with users.
Virtual machine configuration management can be divided into the following categories:
the external configuration management mainly refers to the configuration of virtual machine hardware, including virtual machine options, configuration video and sound card settings, and moving the virtual machine to other host systems or other locations of the same host system, and specifically includes: 1. changing the name of the virtual machine, displaying the name of the virtual machine in a title bar when the virtual machine is operated, and naming the directory for storing the file of the virtual machine by using the original name of the virtual machine; 2. changing a guest operating system of the virtual machine, a guest operating system installed in the virtual machine, or specifying an incorrect operating system version when the virtual machine is created, wherein the type of the guest operating system configured by the virtual machine needs to be changed; 3. changing a work directory of the virtual machine, changing the work directory to improve performance, for example, creating a paging file on a high-capacity fast disk, but storing a virtual disk and a configuration file on other disks, changing the work directory, and placing the virtual disk and the configuration file on the fast disk; 4. changing the memory allocation of the virtual machine, and adjusting the memory amount allocated to the virtual machine; 5. configuring video and sound, requiring adjustment of the color settings of the host and client operating systems for best color and graphical display; 6. moving the virtual machine created in the creation to other host systems or other positions of the same host system, and connecting the virtual machine through a VNC client; 7. deleting the virtual machine, namely deleting one virtual machine and all files thereof from the host file system; 8. and checking a message log of the virtual machine.
The internal configuration management refers to management inside a virtual machine, and specifically includes the following steps: 1. managing ip of the virtual machine; 2. displaying the CPU/memory information of the virtual machine; 3. virtual machine user name password management; 4. other management inside the virtual machine.
The external configuration management can be managed by a system administrator, the internal configuration management can be managed only by users, the administrator cannot perform unified management, or the administrator performs individual manual management under the condition of knowing the user password.
The external configuration management of the virtual machine can meet the requirement of basic virtualization management, but with the application of the system in actual services, new requirements are provided, including internal management requirements of the virtual machine, such as directly modifying the ip of the virtual machine, the system configuration of the virtual machine and the like, but the functions of the internal configuration are not provided, and at present, the modification of the internal configuration of the virtual machine is that a user logs in the system to modify, such as modifying the user password of the virtual machine, and only can be one by one.
In summary, the defects managed by the existing virtual machine configuration include: 1. the system information cannot be accurately acquired, and the system information can be acquired only by entering the system; 2. the efficiency is low, and the manual login system is time-consuming and labor-consuming to operate one by one. Therefore, a method for modifying the internal configuration of the virtual machine online by using a virtualized program architecture and combining the current situation of the virtual machine system is needed to be developed.
Disclosure of Invention
The technical problem solved by the invention is as follows: the method for modifying the internal configuration of the virtual machine on line is used for realizing the message transmission between the virtual machine and the host by utilizing the serial port equipment of the virtual machine, and realizing the functions of modifying the internal configuration of the virtual machine on line and acquiring the internal information of the virtual machine on the basis.
The technical solution of the invention is as follows: a method for modifying the internal configuration of a virtual machine online comprises the following steps:
(1) determining communication rules between the physical host and the guest virtual machines; wherein, a plurality of guest virtual machines can run on the physical host;
(2) loading serial port equipment on each client virtual machine respectively to realize IO of each client virtual machine and a user space of a physical host, wherein each client virtual machine polls the serial port equipment in real time to monitor whether a command or parameter data sent by the physical host exists;
(3) controlling the physical host to forward the command of each client virtual machine to the corresponding client virtual machine;
(4) when the virtual machine finds that the command or the parameter data exist, the command or the parameter data are obtained through analysis according to the communication rule after being received by the corresponding serial port equipment, execution is carried out, the execution result is sent to the physical host through the corresponding serial port equipment, and the internal configuration of the virtual machine is modified on line.
The communication rule between the physical host and the client virtual machine stipulates commands and parameter value ranges required by communication between the physical host and the client virtual machine, and the commands comprise the steps of obtaining network information of the client virtual machine, setting the network information of the client virtual machine and controlling the communication between the client virtual machine and the physical host.
In the step (3), the physical host forwards the command of each client virtual machine to the corresponding client virtual machine by using a multithreading technology, wherein each client virtual machine corresponds to one thread.
The client virtual machine avoids respective login to realize operation by executing commands or parameters sent by the physical host.
An architecture for online modification of internal configuration of a virtual machine comprises a management end, a host end and a virtual machine end, wherein:
the management end displays the data information of the operation and the execution command of the physical host in the host end and the client virtual machine in the virtual machine end in real time and initiates the command execution action of the client virtual machine;
the host side comprises a physical host, analyzes the content sent by the management side, and forwards the analyzed command or parameter data to the virtual machine side;
the virtual machine end comprises a client virtual machine, executes corresponding commands according to the forwarded commands and parameter data, and returns the results to the host end.
Compared with the prior art, the invention has the advantages that:
(1) compared with the prior art, the internal configuration files of the virtual machines can be modified in batches, the virtual machines do not need to be logged in, and the modification of the configuration files of the virtual machines in batches can be realized;
(2) compared with the prior art, the method and the device can accurately acquire the information inside the virtual machine, such as system information and user information, and can accurately acquire the CPU/memory utilization rate of the system, the type of the operating system and the like.
Drawings
FIG. 1 is a communication diagram of a method for online modification of internal configuration of a virtual machine according to the present invention;
FIG. 2 is a sequence diagram of a method for online modification of internal configuration of a virtual machine according to the present invention.
Detailed Description
The invention provides a method for modifying the internal configuration of a virtual machine on line aiming at the defects of the prior art, which realizes the communication with a host by utilizing the serial port equipment of the virtual machine and realizes the function of modifying the configuration of the virtual machine on line by programming in the virtual machine. The method of the present invention will be explained and explained in more detail with reference to the accompanying drawings, wherein fig. 1 is a communication mode diagram of a method for online modification of internal configuration of a virtual machine according to the present invention, and fig. 2 is a sequence diagram of a method for online modification of internal configuration of a virtual machine according to the present invention. The method specifically comprises the following steps:
first, the communication rule is defined
The communication rule embodies the communication between a physical host and a guest virtual machine, wherein the physical host runs a plurality of guest virtual machines, and the communication rule is as follows:
{type:{key:value,key:value,......}}
the Type is the information Type, such as get-ip, the network information of the client virtual machine is obtained, and set-ip is the network information of the client virtual machine is set;
value is the value of the key and its key, such as:
name:nic1
ip:192.168.1.2
mask netmask 255.255.255.0
Gateway 192.168.1.254
After the communication rule agreement is completed, the client virtual machine executes the corresponding method according to the communication rule, so that the communication rule is the logic basis of the communication of the two parties.
Second, customer virtual machine loading serial port equipment
The serial device is a physical basis for communication between the physical host and the client virtual machine, the current single-port virti-console device (the virti-console device is a virtual serial device and plays a role in connecting the physical host and the client virtual machine) is changed into a device running on qemu and kvm (namely, loaded on the client virtual machine) by the characteristics of the serial device, and the serial device is loaded on the client virtual machine. It exposes multiple ports to guest virtual machines in the form of simple char devices for simple IO between the guest virtual machines and the physical host user space. It also allows a plurality of such devices to be disclosed, eliminating the current limitations of a single device, in the form of:
Figure BDA0002294177660000051
displaying in the virtual machine: /dev/vportNpn.
Thirdly, the host computer carries out command forwarding operation
The host acts as a forwarding layer and, to provide efficiency, multi-threading is used, with each virtual machine corresponding to a thread, so that each virtual machine operates within a single thread.
The step is mainly to package and forward commands and parameters according to data of the interface, for example, when ip information is obtained, a get-ip command is sent to a serial port, and a result of the returned command is returned to a called interface, wherein one serial port corresponds to one virtual machine.
Fourthly, the virtual machine carries out command execution operation
The guest agent process in the virtual machine polls the serial port device, when finding information, the guest agent process receives the information, analyzes the information according to the agreed communication rule, analyzes the command to be executed, corresponds to a corresponding function according to the command, such as a set-ip command, and acquires parameters corresponding to the command, such as ip:192.168.1.2, netmask ═ 255.255.255.0, gateway ═ 192.168.1.254,
then, the method corresponding to the command is executed according to the command parameters, and the execution result of the command is returned after the execution is finished.
In summary, the key points of the method of the present invention specifically include:
1. serial port communication between the host and the virtual machine is utilized:
the whole framework is divided into a management end, a host end and a virtual machine end, wherein the management end is responsible for displaying information and is a place where actions are initiated, the host end is a forwarding function and is used for analyzing according to the content sent by the management platform to obtain corresponding commands and parameters, and the virtual machine end is responsible for executing corresponding methods according to the commands and parameters of the host and returning results to the host end. The process can be discussed in such a way that firstly, a communication rule is defined, the communication rule specifies the rule of a command and a parameter, the specific meaning of the command is specified, the actual meaning of the parameter is clear, then the virtual machine loads a serial port device, the serial port device is a channel for communication between the host and the virtual machine, the channel can send data and receive data, and finally, the inside of the virtual machine executes a specific method and specific actions according to the actions specified by the communication rule.
2. Multi-process cooperation:
the host side is provided with a server process, receives the information of the management platform process, and the process in the virtual machine executes specific actions according to the server process of the host.
Taking a typical example, modifying the ip of the virtual machine online is a very common function, namely modifying the ip address of the virtual machine without logging in the virtual machine, and this function is mainly directed to an administrator, because the administrator does not know the password of the user of the virtual machine, and specific example codes are as follows:
Figure BDA0002294177660000061
Figure BDA0002294177660000071
Figure BDA0002294177660000081
those skilled in the art will appreciate that those matters not described in detail in the present specification are well known in the art.

Claims (5)

1. A method for modifying the internal configuration of a virtual machine on line is characterized by comprising the following steps:
(1) determining communication rules between the physical host and the guest virtual machines; wherein, a plurality of guest virtual machines can run on the physical host;
(2) loading serial port equipment on each client virtual machine respectively to realize IO of each client virtual machine and a user space of a physical host, wherein each client virtual machine polls the serial port equipment in real time to monitor whether a command or parameter data sent by the physical host exists;
(3) controlling the physical host to forward the command of each client virtual machine to the corresponding client virtual machine;
(4) when the virtual machine finds that the command or the parameter data exist, the command or the parameter data are obtained through analysis according to the communication rule after being received by the corresponding serial port equipment, execution is carried out, the execution result is sent to the physical host through the corresponding serial port equipment, and the internal configuration of the virtual machine is modified on line.
2. The method of claim 1, wherein the method comprises the following steps: the communication rule between the physical host and the client virtual machine stipulates commands and parameter value ranges required by communication between the physical host and the client virtual machine, and the commands comprise the steps of obtaining network information of the client virtual machine, setting the network information of the client virtual machine and controlling the communication between the client virtual machine and the physical host.
3. The method of claim 2, wherein the method comprises the following steps: in the step (3), the physical host forwards the command of each client virtual machine to the corresponding client virtual machine by using a multithreading technology, wherein each client virtual machine corresponds to one thread.
4. The method of claim 3, wherein the method comprises the following steps: the client virtual machine avoids respective login to realize operation by executing commands or parameters sent by the physical host.
5. An architecture for online modification of internal configuration of a virtual machine is characterized by comprising a management end, a host end and a virtual machine end, wherein:
the management end displays the data information of the operation and the execution command of the physical host in the host end and the client virtual machine in the virtual machine end in real time and initiates the command execution action of the client virtual machine;
the host side comprises a physical host, analyzes the content sent by the management side, and forwards the analyzed command or parameter data to the virtual machine side;
the virtual machine end comprises a client virtual machine, executes corresponding commands according to the forwarded commands and parameter data, and returns the results to the host end.
CN201911193576.3A 2019-11-28 2019-11-28 Method for modifying internal configuration of virtual machine on line Pending CN111143026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911193576.3A CN111143026A (en) 2019-11-28 2019-11-28 Method for modifying internal configuration of virtual machine on line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911193576.3A CN111143026A (en) 2019-11-28 2019-11-28 Method for modifying internal configuration of virtual machine on line

Publications (1)

Publication Number Publication Date
CN111143026A true CN111143026A (en) 2020-05-12

Family

ID=70517329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911193576.3A Pending CN111143026A (en) 2019-11-28 2019-11-28 Method for modifying internal configuration of virtual machine on line

Country Status (1)

Country Link
CN (1) CN111143026A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111740822A (en) * 2020-06-17 2020-10-02 中国银行股份有限公司 Batch updating method and device for user passwords of distributed system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622245A (en) * 2012-02-24 2012-08-01 中国人民解放军国防科学技术大学 Virtual machine automatic-starting control method under sun4v architecture
US20180329857A1 (en) * 2017-05-10 2018-11-15 Qualcomm Incorporated Hardware event priority sensitive programmable transmit wait-window for virtual gpio finite state machine
CN109933411A (en) * 2019-03-31 2019-06-25 山东超越数控电子股份有限公司 A kind of online modification virtual machine internal configuration system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622245A (en) * 2012-02-24 2012-08-01 中国人民解放军国防科学技术大学 Virtual machine automatic-starting control method under sun4v architecture
US20180329857A1 (en) * 2017-05-10 2018-11-15 Qualcomm Incorporated Hardware event priority sensitive programmable transmit wait-window for virtual gpio finite state machine
CN109933411A (en) * 2019-03-31 2019-06-25 山东超越数控电子股份有限公司 A kind of online modification virtual machine internal configuration system and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111740822A (en) * 2020-06-17 2020-10-02 中国银行股份有限公司 Batch updating method and device for user passwords of distributed system

Similar Documents

Publication Publication Date Title
US8924592B2 (en) Synchronization of server-side cookies with client-side cookies
US20130239106A1 (en) Offline provisioning of virtual machines
WO2020231914A1 (en) Systems and methods for using a call chain to identify dependencies among a plurality of microservices
EP3970321B1 (en) Service graph highlights missing nodes and links
US20090300180A1 (en) Systems and methods for remote management of networked systems using secure modular platform
CN107222320A (en) The method and apparatus that Cloud Server cluster sets up High Availabitity connection
CN105183674B (en) USB virtualizes network mapping method, apparatus and usb hub
US10270650B2 (en) Data defined infrastructure
WO2018218977A1 (en) Method for orchestrating software defined network, and sdn controller
CN107707622A (en) A kind of method, apparatus and desktop cloud controller for accessing desktop cloud virtual machine
US11843674B2 (en) Virtual workspace experience visualization and optimization
CN112738230B (en) Automatic network gate testing system and working method thereof
CN106648838B (en) Resource pool management configuration method and device
CN109714208B (en) Method for bringing equipment into network management, storage medium and electronic equipment
US20190205156A1 (en) Container access method and apparatus
CN111143026A (en) Method for modifying internal configuration of virtual machine on line
CN113918174A (en) Bare metal server deployment method, deployment controller and server cluster
CN107247618B (en) Disk redirection method based on instruction external acquisition architecture
CN109933411B (en) System and method for modifying internal configuration of virtual machine on line
US10771430B1 (en) Dynamic resource configuration system and method for distributed computing environments
US9092295B2 (en) Managing software package updates using communication pipes
CN112003726B (en) High-availability configuration method for rapidly deploying Beegfs management service nodes
CN111769992B (en) Network data management method, cloud platform and storage medium
US10949441B1 (en) Data center information retrieval system and method of operating the same
US10324771B1 (en) Methods and apparatus for a storage system having storage automation with integrated drivers

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200512

RJ01 Rejection of invention patent application after publication