Method and System for a Virtual Machine to Obtain a Data Source in a Cloud Scenario
By using Virtio-Serial devices and virtual machine management service components in cloud scenarios, virtual machines can obtain dynamic data sources at high speed without using network protocol stacks, solving the network dependency problem when virtual machines acquire dynamic data sources in the prior art.
Patent Information
- Application Number
- CN202210791998.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-07
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-07-07
AI Technical Summary
In cloud scenarios, it is difficult for the existing technology to obtain dynamic data sources at high speed without using the network protocol stack, especially when the virtual machine does not have a network card or the network is not connected.
By deploying the data source proxy service component on the physical machine node where the virtual machine is located, using Virtio-Serial devices to communicate with the virtual machine management service component, the virtual machine UUID and data source service can be matched, and dynamic data sources can be obtained.
It realizes that without relying on the network protocol stack, virtual machines can obtain dynamic data sources at high speed, avoiding the problems of network traffic occupation and network dependence, and not occupying traditional ttySX serial port equipment.
Smart Images

Figure CN115202813B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud computing, and in particular to a method and system for a virtual machine to obtain a data source in a cloud scenario. Background Art
[0002] As more and more cloud vendors provide cloud services, there are more and more ways to create cloud servers and perform initial configuration on cloud platforms, such as cloud-init, cloudbase-init, and cloud assistants provided by cloud vendors. Regardless of the tools used, initial configuration of cloud servers requires obtaining a data source, which contains the parameters that need to be configured when each virtual machine is started, generally including the virtual machine name, password, network information, etc.
[0003] Commonly used data sources are divided into dynamic data sources and static data sources according to whether the data can be updated. Dynamic data sources can obtain updated configurations based on the configuration changes of the virtual machine. The provision of this type of data source requires the platform to run a proxy service for the data source. Static data sources are determined when the virtual machine is created or started, and generally cannot update data after the virtual machine is started or running.
[0004] Dynamic data sources mainly use network and serial port methods. The network method is to initiate an access request to the network data source for the specified IP address in the virtual machine. The platform side processes the data packet of the network card, analyzes the virtual machine where the data packet comes from, and provides data source services for the virtual machine. Therefore, from this method:
[0005] 1) This process will generate network traffic and occupy a small part of the network bandwidth;
[0006] 2) The whole process depends on the network protocol stack. When the virtual machine created by the user does not require a network card or the network is not accessible, access to the data source will be blocked.
[0007] Using the serial port will occupy ttySX, where X is a number, usually ttyS1. The virtual machine's request for the data source is implemented by reading and writing the ttyS1 device. Traditional serial port devices have. Using a static data source cannot meet the dynamic data source update requirements.
[0008] Therefore, how to obtain dynamic data sources at high speed without using a network protocol stack is a technical problem that needs to be solved urgently. Summary of the invention
[0009] The technical task of the present invention is to provide a method and system for a virtual machine to obtain a data source in a cloud scenario, so as to solve the problem of how to obtain a dynamic data source at a high speed without using a network protocol stack.
[0010] The technical task of the present invention is achieved in the following way: a method for a virtual machine to obtain a data source in a cloud scenario, the method is as follows:
[0011] Deploy the data source proxy service component on the physical machine node (i.e., computing node) where the virtual machine is located;
[0012] The data source proxy service component connects to the Unix Socket at the specified address and reads and writes the file descriptor of the Socket;
[0013] The data source proxy service component matches the UUID of the virtual machine through the virtual machine management service component Hypervisor according to the Socket address, and initiates a request to the data source service component according to the UUID of the virtual machine, obtains the data source data of the virtual machine, and writes it into the Socket corresponding to the virtual machine;
[0014] When creating a virtual machine, create one or more Virtio-Serial devices for the virtual machine, specify the Channel type as Unix Socket, and set the Unix Socket address;
[0015] Install the virtual machine initialization software in the virtual machine image, and add a new virtual serial port read-write communication module in the virtual machine initialization software. The virtual serial port read-write communication module is used to communicate with the Virtio-Serial device. The write operation corresponds to the control channel, and the read operation corresponds to the data channel.
[0016] Add data source list items and a data source request component within the virtual machine based on the virtual serial port read-write communication module in the virtual machine initialization software. The data source request component within the virtual machine initiates a request for the specified data source address, calls the virtual serial port read-write communication module to initiate the data source request, and obtains the data content of the data source after the request.
[0017] As a preferred embodiment, the data source proxy service components are as follows:
[0018] The data source proxy service component obtains the Channel device of the virtual machine Virtio-Serial driver and the Unix Socket address corresponding to the device by querying the virtual machine management service component, and obtains the UUID of the virtual machine. The Channel device is used as a two-in-one control and data channel or is split into a control channel and a data channel.
[0019] The data source proxy service component receives the data source address request initiated by the virtual machine from the Channel device control channel, and initiates a data source acquisition request to the data source service based on the request address and the UUID of the virtual machine;
[0020] After the data source proxy service component obtains the return data from the data source service component, it writes the data into the data channel of the Channel device of the virtual machine.
[0021] Preferably, when the data source proxy service component receives input of specified information or specified mode from the Channel device data channel, it writes specified content to the data channel to complete the authentication process, ensuring that the virtual machine correctly identifies that the Channel device connected is the data source proxy service component.
[0022] As a preferred option, the virtual machine creation is as follows:
[0023] When creating a virtual machine, configure the Channel device of the Virtio-Serial device driver;
[0024] The Channel device specifies the device type as Unix, that is, Unix Socket;
[0025] Specify the socket address for device communication based on the virtual machine management service component and the computing node service configuration;
[0026] Configure the Channel device used for data source acquisition of each virtual machine as a two-in-one control and data channel or split it into two channels: a control channel and a data channel.
[0027] As a preferred embodiment, the data source request component in the virtual machine is as follows:
[0028] The data source request component in the virtual machine calls the virtual serial port read-write communication module for initialization. During initialization, the virtual serial port read-write communication module writes a specified string or string pattern to the control channel of the vport device in the virtual machine, and reads the return data from the data channel to complete the authentication;
[0029] The data source request component in the virtual machine generates a data source acquisition request address and calls the virtual serial port read-write communication module to write the request into the control channel;
[0030] The data source request component in the virtual machine monitors the data channel and reads the data source data after the control channel sends the request address
[0031] The data source request component in the virtual machine parses and processes the received data source data, and returns it to the caller in the format or object received by the virtual machine initialization software to obtain the data source.
[0032] Preferably, the virtual machine management service component also has the following functions:
[0033] According to the virtual machine definition when the virtual machine is created, a control channel and a data channel with a Channel device type of Unix Socket are created for the virtual machine;
[0034] Provides virtual machine definition query for the data source proxy service component to match the correspondence between Unix Socket address and virtual machine UUID.
[0035] A system for a virtual machine to obtain a data source in a cloud scenario, the system comprising a data source service component, a data source proxy service component, a virtual machine management service component and a data source request component within the virtual machine;
[0036] The data source service component is used to provide APIs requested by the tenant side, and the data source proxy service component on the platform side obtains the virtual machine data source information through remote calls;
[0037] The data source proxy service is deployed on the physical machine node (i.e., computing node) where the virtual machine is located. It is used to read and write the socket address of the virtual machine's Virtio-Serial device, and matches the virtual machine's UUID through the virtual machine management service component based on the socket address, and initiates a data source service request to obtain the data source;
[0038] The virtual machine management service component runs on the computing node where the virtual machine is located and is used for virtual machine creation, virtual machine status management, and virtual machine device management;
[0039] The data source request component in the virtual machine is installed inside the virtual machine initialization software and is used to read and cache data of various data source types.
[0040] As a preferred embodiment, the data source request component in the virtual machine is also used to add a new virtual serial port read and write communication module in the virtual machine initialization software, and the virtual serial port read and write communication module is used to communicate with the Virtio-Serial device, and request the data source and read the data through the vport device;
[0041] The data source request component in the virtual machine includes a vport type data source reading module and a vport read-write module. The vport type data source reading module is used to read the data source of the Virtio-Serial device. The vport type data source reading module calls the vport read-write module to complete data source acquisition and communication.
[0042] An electronic device comprising: a memory and at least one processor;
[0043] Wherein, the memory stores a computer program;
[0044] The at least one processor executes the computer program stored in the memory, so that the at least one processor executes the method for a virtual machine to obtain a data source in a cloud scenario as described above.
[0045] A computer-readable storage medium stores a computer program, which can be executed by a processor to implement the method for a virtual machine to obtain a data source in a cloud scenario as described above.
[0046] The method and system for a virtual machine to obtain a data source in a cloud scenario of the present invention have the following advantages:
[0047] (1) In the cloud scenario, the virtual machine obtains the data source by communicating with the computing node metadata service through Virtio-Serial, so that the dynamic data source can be obtained at high speed without the virtual machine using the network protocol stack;
[0048] (ii) The present invention realizes the need for tenant-side virtual machines to access the data source of management-side virtual machines, is non-invasive to platform network traffic, does not use a network protocol stack, and can be used when the virtual machine has no network card or when the network fails;
[0049] (iii) Compared with static data sources, the present invention does not increase additional storage space;
[0050] (iv) The present invention does not occupy the traditional ttySX serial port device;
[0051] (V) Compared with the traditional use of the network or the traditional ttySX device, the present invention uses the Virtio-Serial device to read and write faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The present invention is further described below in conjunction with the accompanying drawings.
[0053] Attached Figure 1 A schematic diagram of a method for a virtual machine to obtain a data source in a cloud scenario. DETAILED DESCRIPTION
[0054] The method and system for a virtual machine to obtain a data source in a cloud scenario of the present invention are described in detail below with reference to the accompanying drawings and specific embodiments of the specification.
[0055] Embodiment 1:
[0056] As attached Figure 1 As shown, this embodiment provides a method for a virtual machine to obtain a data source in a cloud scenario, and the method is specifically as follows:
[0057] S1. Deploy the data source proxy service component on the physical machine node (i.e., computing node) where the virtual machine is located;
[0058] S2, the data source proxy service component connects to the Unix Socket at the specified address and reads and writes the file descriptor of the Socket;
[0059] S3, the data source proxy service component matches the UUID of the virtual machine through the virtual machine management service component Hypervisor according to the Socket address, and initiates a request to the data source service component according to the UUID of the virtual machine, obtains the data source data of the virtual machine, and writes it into the Socket corresponding to the virtual machine;
[0060] S4. When creating a virtual machine, create one or more Virtio-Serial devices for the virtual machine, specify the Channel type as Unix Socket, and set the Unix Socket address;
[0061] S5. Install the virtual machine initialization software in the virtual machine image, and add a new virtual serial port read-write communication module in the virtual machine initialization software. The virtual serial port read-write communication module is used to communicate with the Virtio-Serial device. The write operation corresponds to the control channel, and the read operation corresponds to the data channel.
[0062] S6. Add a data source list item and an in-virtual machine data source request component based on the virtual serial port read-write communication module in the virtual machine initialization software. The in-virtual machine data source request component initiates a request for the specified data source address, calls the virtual serial port read-write communication module to initiate the data source request, and obtains the data content of the data source after the request.
[0063] The data source proxy service components in this embodiment are as follows:
[0064] (1) The data source proxy service component obtains the Channel device of the virtual machine Virtio-Serial driver and the Unix Socket address corresponding to the device by querying the virtual machine management service component, and obtains the UUID of the virtual machine. The Channel device is used as a control and data two-in-one channel or is split into a control channel and a data channel.
[0065] (2) The data source proxy service component receives the data source address request initiated by the virtual machine from the Channel device control channel, and initiates a data source acquisition request to the data source service based on the request address and the UUID of the virtual machine;
[0066] (3) After the data source proxy service component obtains the return data from the data source service component, it writes the data into the data channel of the Channel device of the virtual machine.
[0067] In this embodiment, when the data source proxy service component receives input of specified information or specified mode from the Channel device data channel, it writes specified content to the data channel to complete the authentication process, ensuring that the virtual machine correctly identifies that the Channel device connected is the data source proxy service component.
[0068] The virtual machine creation in step S4 of this embodiment is specifically as follows:
[0069] S401, generating an XML file according to the configuration list, and the virtual machine management service component uses the XML to create a virtual machine;
[0070] S402. When creating a virtual machine, configure the Channel device of the Virtio-Serial device driver;
[0071] S403, the device type of the Channel device is specified as Unix, that is, Unix Socket;
[0072] S404, specifying the socket address for device communication according to the virtual machine management service component and the computing node service configuration;
[0073] S405: Configure the Channel device for data source acquisition of each virtual machine as a control and data two-in-one channel or split it into two channels: a control channel and a data channel.
[0074] The data source request component in the virtual machine in this embodiment is as follows:
[0075] (1) The data source request component in the virtual machine calls the virtual serial port read-write communication module for initialization. During initialization, the virtual serial port read-write communication module writes a specified string or string pattern to the control channel of the vport device in the virtual machine, and reads the return data from the data channel to complete the authentication;
[0076] (2) The data source request component in the virtual machine generates a data source acquisition request address and calls the virtual serial port read-write communication module to write the request into the control channel;
[0077] (3) The data source request component in the virtual machine monitors the data channel and reads the data source data after the control channel sends the request address.
[0078] (4) The data source request component in the virtual machine parses and processes the received data source data, and returns it to the caller in the format or object received by the virtual machine initialization software to obtain the data source.
[0079] The virtual machine management service component in this embodiment also has the following functions:
[0080] According to the virtual machine definition when the virtual machine is created, a control channel and a data channel with a Channel device type of Unix Socket are created for the virtual machine;
[0081] Provides virtual machine definition query for the data source proxy service component to match the correspondence between Unix Socket address and virtual machine UUID.
[0082] Embodiment 2:
[0083] As attached Figure 1 As shown, this embodiment provides a system for a virtual machine to obtain a data source in a cloud scenario, the system comprising a data source service component, a data source proxy service component, a virtual machine management service component and a data source request component in the virtual machine;
[0084] The data source service component is used to provide APIs requested by the tenant side, and the data source proxy service component on the platform side obtains the virtual machine data source information through remote calls;
[0085] The data source proxy service is deployed on the physical machine node (i.e., computing node) where the virtual machine is located. It is used to read and write the socket address of the virtual machine's Virtio-Serial device, and matches the virtual machine's UUID through the virtual machine management service component based on the socket address, and initiates a data source service request to obtain the data source;
[0086] The virtual machine management service component runs on the computing node where the virtual machine is located and is used for virtual machine creation, virtual machine status management, and virtual machine device management;
[0087] The data source request component in the virtual machine is installed inside the virtual machine initialization software and is used to read and cache data of various data source types.
[0088] The data source request component in the virtual machine in this embodiment is also used to add a new virtual serial port read-write communication module in the virtual machine initialization software. The virtual serial port read-write communication module is used to communicate with the Virtio-Serial device and perform data source requests and data reading through the vport device.
[0089] The data source request component in the virtual machine in this embodiment includes a vport type data source reading module and a vport read-write module. The vport type data source reading module is used to read the data source of the Virtio-Serial device. The vport type data source reading module calls the vport read-write module to complete data source acquisition and communication.
[0090] The working process of the data source proxy service component in this embodiment is as follows:
[0091] (1) The data source proxy service component obtains the Channel device of the virtual machine Virtio-Serial driver and the Unix Socket address corresponding to the device by querying the virtual machine management service component, and obtains the UUID of the virtual machine. The Channel device is used as a control and data two-in-one channel or is split into a control channel and a data channel.
[0092] (2) The data source proxy service component receives the data source address request initiated by the virtual machine from the Channel device control channel, and initiates a data source acquisition request to the data source service based on the request address and the UUID of the virtual machine;
[0093] (3) After the data source proxy service component obtains the return data from the data source service component, it writes the data into the data channel of the Channel device of the virtual machine.
[0094] In this embodiment, when the data source proxy service component receives input of specified information or specified mode from the Channel device data channel, it writes specified content to the data channel to complete the authentication process, ensuring that the virtual machine correctly identifies that the Channel device connected is the data source proxy service component.
[0095] The working process of the data source request component in the virtual machine in this embodiment is as follows:
[0096] (1) The data source request component in the virtual machine calls the virtual serial port read-write communication module for initialization. During initialization, the virtual serial port read-write communication module writes a specified string or string pattern to the control channel of the vport device in the virtual machine, and reads the return data from the data channel to complete the authentication;
[0097] (2) The data source request component in the virtual machine generates a data source acquisition request address and calls the virtual serial port read-write communication module to write the request into the control channel;
[0098] (3) The data source request component in the virtual machine monitors the data channel and reads the data source data after the control channel sends the request address.
[0099] (4) The data source request component in the virtual machine parses and processes the received data source data, and returns it to the caller in the format or object received by the virtual machine initialization software to obtain the data source.
[0100] Embodiment 3:
[0101] This embodiment also provides an electronic device, including: a memory and a processor;
[0102] Wherein, the memory stores computer-executable instructions;
[0103] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method for a virtual machine to obtain a data source in a cloud scenario in any embodiment of the present invention.
[0104] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor may be a microprocessor or any conventional processor, etc.
[0105] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can also include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, at least one disk storage period, a flash memory device, or other volatile solid-state storage devices.
[0106] Embodiment 4:
[0107] This embodiment also provides a computer-readable storage medium, which stores a plurality of instructions, which are loaded by a processor to enable the processor to execute the method for a virtual machine to obtain a data source in a cloud scenario in any embodiment of the present invention. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code that implements the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.
[0108] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0109] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0110] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0111] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for a virtual machine to obtain a data source in a cloud scenario. It is characterized in that The method is as follows: Deploy the data source proxy service component on the physical machine node where the virtual machine is located; The data source proxy service component connects to the Unix Socket at the specified address and reads and writes the file descriptor of the Socket; The data source proxy service component matches the UUID of the virtual machine through the virtual machine management service component Hypervisor according to the Socket address, and initiates a request to the data source service component according to the UUID of the virtual machine, obtains the data source data of the virtual machine, and writes it into the Socket corresponding to the virtual machine; When creating a virtual machine, create one or more Virtio-Serial devices for the virtual machine, specify the Channel type as UnixSocket, and set the Unix Socket address; Install the virtual machine initialization software in the virtual machine image, and add a new virtual serial port read-write communication module in the virtual machine initialization software. The virtual serial port read-write communication module is used to communicate with the Virtio-Serial device. The write operation corresponds to the control channel, and the read operation corresponds to the data channel. Add data source list items and a data source request component within the virtual machine based on the virtual serial port read-write communication module in the virtual machine initialization software. The data source request component within the virtual machine initiates a request for the specified data source address, calls the virtual serial port read-write communication module to initiate the data source request, and obtains the data content of the data source after the request.
2. The method for obtaining a data source by a virtual machine in a cloud scenario according to claim 1, It is characterized in that The data source proxy service components are as follows: The data source proxy service component obtains the Channel device of the virtual machine Virtio-Serial driver and the Unix Socket address corresponding to the device by querying the virtual machine management service component, and obtains the UUID of the virtual machine. The Channel device is used as a control and data two-in-one channel or is split into a control channel and a data channel. The data source proxy service component receives the data source address request initiated by the virtual machine from the Channel device control channel, and initiates a data source acquisition request to the data source service based on the request address and the UUID of the virtual machine; After the data source proxy service component obtains the return data from the data source service component, it writes the data into the data channel of the Channel device of the virtual machine.
3. The method for obtaining a data source by a virtual machine in a cloud scenario according to claim 2, It is characterized in that When the data source proxy service component receives the specified information or input of the specified mode from the Channel device data channel, it writes the specified content to the data channel to complete the authentication process, ensuring that the virtual machine correctly identifies that the Channel device connected is the data source proxy service component.
4. The method for obtaining a data source by a virtual machine in a cloud scenario according to claim 1, It is characterized in that The virtual machine creation is as follows: When creating a virtual machine, configure the Channel device of the Virtio-Serial device driver; The Channel device designates the device type as Unix, i.e., Unix Socket; According to the virtual machine management service component and the computing node service configuration, designate the Socket address for device communication; Configure the Channel device for each virtual machine used for data source acquisition as a combined control and data channel or split it into two channels: a control channel and a data channel.
5. The method for a virtual machine to obtain a data source in a cloud scenario according to claim 1, wherein, the data source request component within the virtual machine is as follows: The data source request component within the virtual machine calls the virtual serial port read / write communication module for initialization. During initialization, the virtual serial port read / write communication module writes a specified string or string pattern to the control channel of the vport device within the virtual machine and reads the returned data from the data channel to complete authentication; The data source request component within the virtual machine generates a data source acquisition request address and calls the virtual serial port read / write communication module to write the request to the control channel; The data source request component within the virtual machine listens to the data channel and reads the data source data after the request address is sent by the control channel The data source request component within the virtual machine parses and processes the received data source data and returns it to the calling party in the format or object received by the virtual machine initialization software to obtain the data source.
6. The method for a virtual machine to obtain a data source in a cloud scenario according to claim 4, wherein, the virtual machine management service component also has the following functions: According to the virtual machine definition at the time of virtual machine creation, create a control channel and a data channel with the Channel device type of Unix Socket for the virtual machine; Provide virtual machine definition query for the data source proxy service component to match the corresponding relationship between the Unix Socket address and the virtual machine UUID.
7. A system for a virtual machine to obtain a data source in a cloud scenario, wherein, the system includes a data source service component, a data source proxy service component, a virtual machine management service component, and a data source request component within the virtual machine; The data source service component is used to provide the API requested by the tenant side, and the data source proxy service component on the platform side obtains the virtual machine data source information through remote call; The data source proxy service is deployed on the physical machine node where the virtual machine is located, used to read and write the Socket address of the Virtio-Serial device of the virtual machine, and initiate a data source service request to obtain the data source according to the Socket address by matching the UUID of the virtual machine through the virtual machine management service component; The virtual machine management service component runs on the computing node where the virtual machine is located, used for the creation of virtual machines, the status management of virtual machines, and the device management of virtual machines; The data source request component within the virtual machine is installed inside the virtual machine initialization software and is used to read and cache data of various data source types.
8. The system for a virtual machine to obtain a data source in a cloud scenario according to claim 7, wherein, the data source request component within the virtual machine is also used to add a new virtual serial port read / write communication module to the virtual machine initialization software. The virtual serial port read / write communication module is used to communicate with the Virtio-Serial device and request the data source and read the data through the vport device. The data source request component within the virtual machine includes a data source reading module of the vport type and a vport reading and writing module. The data source reading module of the vport type is used to read the data source of the Virtio-Serial device, and the data source reading module of the vport type calls the vport reading and writing module to complete data source acquisition and communication.
9. An electronic device, characterized in that, it includes: a memory and at least one processor; wherein, a computer program is stored on the memory; the at least one processor executes the computer program stored in the memory, so that the at least one processor executes the method for a virtual machine to obtain a data source in a cloud scenario as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, a computer program is stored in the computer-readable storage medium, and the computer program can be executed by a processor to implement the method for a virtual machine to obtain a data source in a cloud scenario as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Campus cloud platform system and method based on distributed virtual service technology
CN104144173A
A virtual socket communication method and system under a Docker clust multi-tenant
CN109542590A