CN113806021A - Method and system for transparent transmission of physical equipment by virtual machine - Google Patents

Method and system for transparent transmission of physical equipment by virtual machine Download PDF

Info

Publication number
CN113806021A
CN113806021A CN202111115586.2A CN202111115586A CN113806021A CN 113806021 A CN113806021 A CN 113806021A CN 202111115586 A CN202111115586 A CN 202111115586A CN 113806021 A CN113806021 A CN 113806021A
Authority
CN
China
Prior art keywords
slot position
physical equipment
physical
virtual machine
slot
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.)
Granted
Application number
CN202111115586.2A
Other languages
Chinese (zh)
Other versions
CN113806021B (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.)
Shanghai Datatom Information Technology Co ltd
Original Assignee
Shanghai Datatom Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Datatom Information Technology Co ltd filed Critical Shanghai Datatom Information Technology Co ltd
Priority to CN202111115586.2A priority Critical patent/CN113806021B/en
Publication of CN113806021A publication Critical patent/CN113806021A/en
Application granted granted Critical
Publication of CN113806021B publication Critical patent/CN113806021B/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/4557Distribution of virtual machine instances; Migration and load balancing
    • 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/45579I/O management, e.g. providing access to device drivers or storage
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a method and a system for transparent transmission of physical equipment by a virtual machine, wherein the method comprises the following steps: acquiring physical equipment information data of physical equipment; selecting a slot position which is matched with the physical equipment and is not used from the slot position pool; writing the physical equipment information data and the slot position into a slot position list; the virtual machine acquires physical equipment information data from the slot position list and transparently transmits the physical equipment after the slot position; the system comprises physical equipment, a slot position management module, a slot position pool, a slot position list and a virtual machine; the slot position management module is used for acquiring physical equipment information data of the physical equipment, selecting unused slot positions matched with the physical equipment from the slot position pool according to the physical equipment information data, and transmitting the physical equipment information data and the slot positions to the slot position list; the slot position list is used for receiving and storing the physical equipment information data and the slot positions and transmitting the physical equipment information data and the slot positions to the virtual machine; and the virtual machine transparently transmits the physical equipment.

Description

Method and system for transparent transmission of physical equipment by virtual machine
Technical Field
The invention relates to the field of virtual machine transparent transmission physical equipment, in particular to a method and a system for virtual machine transparent transmission physical equipment.
Background
In the field of cloud computing, a virtual machine can use physical equipment, the behavior is called transparent transmission, the transparent transmission of the physical equipment is a common method for improving the performance of the virtual machine, but an effective management means is lacked, the virtual machine does not have good expansibility and universality, and as the virtual machine has a plurality of chip sets (typical representatives: i440fx and q35), the virtual machine of each chip set has a transparent transmission mode, and the transparent transmission of the physical equipment is more difficult to manage;
at present, when a virtual machine transparently transmits physical equipment, different transparent transmission modes can be selected according to different equipment and different virtual machines, most of the virtual machines are manually completed and lack of effective management means, and after the virtual machine transparently transmits the physical equipment, the operations such as migration and the like can become abnormal and complicated;
the transparent transmission of the physical device by the virtual machine usually needs to indicate the target position of the transparent transmission, the source position of the physical device and the special configuration of the transparent transmission, so that a virtual machine transparent transmission physical device management method which can provide a good and universal management mode and is suitable for various transparent transmission physical devices and virtual machines of different chip sets is needed, the virtual machine is supported to be capable of still migrating after the transparent transmission of the device, and the information of the device for restarting and transparent transmission of the virtual machine is ensured to be still unchanged.
Disclosure of Invention
The invention aims to solve the technical problems that different transparent transmission modes can be selected according to different equipment and different virtual machines when the virtual machine transparently transmits physical equipment at present, most of the transparent transmission modes are manually completed, an effective management means is lacked, and the virtual machine is abnormally complex when the virtual machine transparently transmits the physical equipment and is subjected to operations such as migration and the like.
In order to solve the technical problems, the invention provides the following technical scheme:
in a first aspect, a method for transparently transmitting physical devices by a virtual machine includes the following steps:
step 1: acquiring physical equipment information data of physical equipment;
step 2: selecting a slot position which is matched with the physical equipment and is not used from the slot position pool according to the information data of the physical equipment, for example, if the hot-pluggable property of the physical equipment needs the slot position of the pci, the type of the slot position is pci, the slot position pool needs to be initialized before operation, and the unused slot position is the slot position in the slot position pool minus the slot position used in the slot position list;
and step 3: writing the physical equipment information data and the slot position into a slot position list, wherein the process is a persistent slot position, the used slot position cannot be deleted from the slot position list, and a file is established in the slot position list, so that the maintenance of a slot position pool is simple and only initialization is needed;
and 4, step 4: and the virtual machine acquires the physical equipment information data of the physical equipment from the slot position list and transparently transmits the physical equipment after the slot position.
The method for transparently transmitting the physical device by the virtual machine includes that the device information data includes device slot position type data and configuration information data;
slot position type data and slot position address data are stored in the slot positions;
the slot address data is typically a pci address, such as "0000: 01: 02.01";
the slot position type data indicates the slot type of the slot position, such as a pci slot position type and a pcie slot position type;
selecting a slot position which is matched with the physical equipment and is not used from the slot position pool according to the equipment slot position type data in the step 2;
in step 4, the virtual machine acquires the information of the physical equipment according to the configuration information data and then transparently transmits the information to the physical equipment;
the slot position pool stores slot positions which can be used by the virtual machine;
and the slot position list is used for storing slot positions used by the virtual machine.
In the method for transparently transmitting physical devices by using a virtual machine, the configuration information data includes physical device identification data, physical device type data, and physical device matching information;
the physical device identification data includes a serial number (serial), a uuid, etc. of the physical device, and is usually a unique identification of the physical device, and identifies the physical device at the slot position;
the physical device type data comprises type data of physical devices, such as an sriov type network card, a pfiov type network card, a raid type physical hard disk, an hdd type physical hard disk, an ssd type physical hard disk, an mdev type display card and the like, and indicates the specific types of the physical devices, and a proper transparent transmission mode can be automatically selected according to the types of the physical devices during transparent transmission;
the physical device matching information is typically a set of matching rules, such as physical device type: the virtual machine management system comprises a network card, a display card, a hard disk, a physical equipment manufacturer, a physical equipment model and the like, and is used for automatically matching proper physical equipment for transparent transmission according to matching information when the virtual machine needs to be migrated (migration refers to running the virtual machine on another physical machine and needing to transparent transmitting the physical equipment again);
the configuration information data also includes some special configurations that need to be performed during transparent transmission, such as the vlan number and mac address configuration supported by the network card in sriov mode.
The method for transparently transmitting the physical device by the virtual machine includes that a plurality of slot pools (slots) of the following different types are stored in the slot pool: the introduction of the groove positions can realize the unified transparent transmission management of virtual machines of different chip sets and different physical devices;
the slot pool is a set of one or more types of slot positions, which indicates that a certain type of slot position set can be used by the virtual machine, one virtual machine may have a plurality of slot positions, different slot positions pools can be initialized for virtual machines of different chip sets, and when a slot position is obtained, an appropriate slot position can be returned only by the type of the slot position;
the slot position refers to a slot in which the transparent transmission physical equipment is located for the virtual machine, the transparent transmission position and the configuration information of the physical equipment are indicated, and the slot position comprises a physical equipment identifier so as to support the consistency of the slot position and the equipment when the virtual machine is restarted or regenerated; the slot position also comprises some special configurations during transparent transmission, such as different drive options, hot-plug configuration, vlan number, mac address and the like; and matching information of the equipment, so that the same equipment can be transparently transmitted and the configuration is kept unchanged when the virtual machine is migrated and other operations are supported.
In a second aspect, a system for transparently transmitting physical equipment by using a virtual machine includes the physical equipment, a slot position management module, a slot position pool, a slot position list and the virtual machine, wherein a plurality of slot positions are stored in the slot position pool, and a plurality of physical equipment and a plurality of virtual machines are arranged;
the slot position management module is used for acquiring physical equipment information data of the physical equipment, selecting a slot position which is matched with the physical equipment and is not used from the slot position pool according to the physical equipment information data, and transmitting the physical equipment information data and the slot position to the slot position list;
the slot position list is used for receiving and storing the physical equipment information data and the slot position, and is also used for transmitting the physical equipment information data and the slot position to the virtual machine;
and the virtual machine transparently transmits the physical equipment according to the physical equipment information data and the slot position.
In the system for transparently transmitting physical equipment by using a virtual machine, the equipment information data includes equipment slot position type data and configuration information data;
slot position type data and slot position address data are stored in the slot positions;
the slot address data is typically a pci address, such as "0000: 01: 02.01";
the slot position type data indicates the slot type of the slot position, such as a pci slot position type and a pcie slot position type;
the slot position management module selects a slot position which is matched with the physical equipment and is not used from the slot position pool according to the equipment slot position type data;
the virtual machine acquires the information of the physical equipment according to the configuration information data and then transparently transmits the information to the physical equipment;
the slot position pool stores slot positions which can be used by the virtual machine;
and the slot position list is used for storing slot positions used by the virtual machine.
In the system for transparently transmitting physical devices by using a virtual machine, the configuration information data includes physical device identification data, physical device type data, and physical device matching information;
the physical device identification data includes a serial number (serial), a uuid, etc. of the physical device, and is usually a unique identification of the physical device, and identifies the physical device at the slot position;
the physical device type data comprises type data of physical devices, such as an sriov type network card, a pfiov type network card, a raid type physical hard disk, an hdd type physical hard disk, an ssd type physical hard disk, an mdev type display card and the like, and indicates the specific types of the physical devices, and a proper transparent transmission mode can be automatically selected according to the types of the physical devices during transparent transmission;
the physical device matching information is typically a set of matching rules, such as physical device type: the virtual machine management system comprises a network card, a display card, a hard disk, a physical equipment manufacturer, a physical equipment model and the like, and is used for automatically matching proper physical equipment for transparent transmission according to matching information when the virtual machine needs to be migrated (migration refers to running the virtual machine on another physical machine and needing to transparent transmitting the physical equipment again);
the configuration information data also includes some special configurations that need to be performed during transparent transmission, such as the vlan number and mac address configuration supported by the network card in sriov mode.
The system for transparently transmitting physical equipment by using a virtual machine is characterized in that a plurality of slots (slots) of the following different types are stored in the slot pool: the introduction of the groove positions can realize the unified transparent transmission management of virtual machines of different chip sets and different physical devices;
the slot pool is a set of one or more types of slot positions, which indicates that a certain type of slot position set can be used by the virtual machine, one virtual machine may have a plurality of slot positions, different slot positions pools can be initialized for virtual machines of different chip sets, and when a slot position is obtained, an appropriate slot position can be returned only by the type of the slot position;
the slot position refers to a slot in which the transparent transmission physical equipment is located for the virtual machine, the transparent transmission position and the configuration information of the physical equipment are indicated, and the slot position comprises a physical equipment identifier so as to support the consistency of the slot position and the equipment when the virtual machine is restarted or regenerated; the slot position also comprises some special configurations during transparent transmission, such as different drive options, hot-plug configuration, vlan number, mac address and the like; and matching information of the equipment, so that the same equipment can be transparently transmitted and the configuration is kept unchanged when the virtual machine is migrated and other operations are supported.
In a third aspect, a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, which computer program, when executed by a processor, performs the steps of the method according to any of the first aspect.
According to the technical scheme provided by the method and the system for the virtual machine to transparently transmit the physical equipment, the invention has the following technical effects:
the method and the system for realizing the transparent transmission of the physical equipment by the virtual machine provide a good and universal management mode, are suitable for various transparent transmission physical equipment and virtual machines of different chip sets, support the virtual machine to still migrate after the transparent transmission of the equipment, and still keep the information of the equipment which is restarted and transparent transmitted by the virtual machine unchanged.
Drawings
FIG. 1 is a flowchart of a method for transparent transmission of physical devices by a virtual machine according to the present invention;
fig. 2 is a schematic structural diagram of a system for transparently transmitting physical devices by using a virtual machine according to the present invention.
Wherein the reference numbers are as follows:
physical device 101, slot management module 102, slot pool 103, slot list 104, virtual machine 105.
Detailed Description
In order to make the technical means, the inventive features, the objectives and the effects of the invention easily understood and appreciated, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the specific drawings, and it is obvious that the described embodiments are a part of the embodiments of the present invention, but not all of the embodiments.
All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be understood that the structures, ratios, sizes, and the like shown in the drawings and described in the specification are only used for matching with the disclosure of the specification, so as to be understood and read by those skilled in the art, and are not used to limit the conditions under which the present invention can be implemented, so that the present invention has no technical significance, and any structural modification, ratio relationship change, or size adjustment should still fall within the scope of the present invention without affecting the efficacy and the achievable purpose of the present invention.
In addition, the terms "upper", "lower", "left", "right", "middle" and "one" used in the present specification are for clarity of description, and are not intended to limit the scope of the present invention, and the relative relationship between the terms and the terms is not to be construed as a scope of the present invention.
The first embodiment of the present invention provides a method for transparently transmitting physical devices by a virtual machine, and aims to provide a good and universal management manner, which is suitable for multiple types of transparently transmitted physical devices and virtual machines of different chip sets, and can support the virtual machine to still perform migration after transparently transmitting the devices, and the device information of the virtual machine, which is restarted and transparently transmitted, can still remain unchanged.
As shown in fig. 1, in a first aspect, a first embodiment, a method for transparently transmitting a physical device by a virtual machine, includes the following steps:
step 1: acquiring physical device information data of the physical device 101;
step 2: selecting a slot position which is matched with the physical device 101 and is not used from the slot position pool 103 according to the physical device information data, for example, if the hot-pluggable slot position of the physical device 101 needs a pcie slot position, the type of the slot position is pcie, the slot position pool 103 needs to be initialized before operation, and the unused slot position is the slot position in the slot position pool 103 minus the slot position used in the slot position list 104;
and step 3: physical equipment information data and slot positions are written into the slot position list 104, the process is a persistent slot position, the used slot positions are not deleted from the slot position list 104, files are built in the slot position list 104, maintenance of the slot position pool 103 is enabled to be simple, and only initialization is needed;
and 4, step 4: the virtual machine 105 obtains the physical device information data of the physical device 101 and the slot position from the slot position list 104, and then transparently transfers the physical device 101.
The method for transparently transmitting the physical device by the virtual machine includes that device information data includes device slot position type data and configuration information data;
slot position type data and slot position address data are stored in the slot positions;
the slot address data is typically a pci address, such as "0000: 01: 02.01";
the slot position type data indicates the slot type of the slot position, such as the pci slot position type and the pci slot position type;
in step 2, selecting an unused slot position matched with the physical equipment 101 from the slot position pool 103 according to the equipment slot position type data;
in step 4, the virtual machine 105 obtains the information of the physical device 101 according to the configuration information data and then transparently transmits the information to the physical device 101;
the slot pool 103 stores slot positions which can be used by the virtual machine 105;
the slot list 104 stores slots that are being used by the virtual machine 105.
In the method for transparently transmitting physical equipment by using a virtual machine, the configuration information data includes physical equipment identification data, physical equipment type data, and physical equipment matching information;
the physical device identification data includes a serial number (serial), a uuid, and the like of the physical device 101, and is usually a unique identifier of the physical device 101, and identifies the physical device 101 at the slot position;
the physical device type data includes type data of the physical device 101, such as an sriov type network card, a pfiov type network card, a raid type physical hard disk, an hdd type physical hard disk, an ssd type physical hard disk, an mdev type video card, and the like, which indicate the specific type of the physical device 101, and a suitable transparent transmission mode is automatically selected according to the type of the physical device 101 during transparent transmission;
the physical device matching information is typically a set of matching rules, such as the type of physical device 101: the virtual machine 105 is used for automatically matching the proper physical equipment 101 for transparent transmission according to the matching information when the virtual machine 105 needs to be migrated (the migration refers to the operation of the virtual machine 105 on another physical machine and the need of transparent transmission of the physical equipment 101 again);
the configuration information data also contains some special configurations required during transparent transmission, such as the vlan number and mac address configuration supported by the network card in sriov mode.
The method for transparently transmitting the physical device by the virtual machine includes that a plurality of slot (slots) of the following different types are stored in the slot pool 103: the unified transparent transmission management of the virtual machines 105 of different chipsets and different physical devices 101 can be realized by introducing the pci slot position, the pci slot position and the slot position;
the slot pool 103 is a set of one or several types of slot positions, which indicates that a certain type of slot position set can be used by the virtual machine 105, one virtual machine 105 may have a plurality of slot pools 103, for the virtual machines 105 of different chip sets, different slot pools 103 may be initialized, and when a slot position is obtained, an appropriate slot position can be returned only by the type of the slot position;
the slot position refers to a slot in which the transparent transmission physical device 101 is located for the virtual machine 105, which indicates the transparent transmission position and configuration information of the physical device 101, and includes a physical device identifier, so as to support the virtual machine 105 to maintain the consistency between the slot position and the device when restarting or regenerating; the slot position also comprises some special configurations during transparent transmission, such as different drive options, hot-plug configuration, vlan number, mac address and the like; and matching information of the devices to support operations such as migration of the virtual machine 105, the same devices can be transparently transferred and the configuration is kept unchanged.
As shown in fig. 2, a second aspect and a second embodiment of the present invention provide a system for virtual machine transparent transmission of physical devices, where the system includes a physical device 101, a slot management module 102, a slot pool 103, a slot list 104, and a virtual machine 105, where a plurality of slots are stored in the slot pool 103, and the physical device 101 and the virtual machine 105 are both provided in plurality;
the slot position management module 102 is configured to obtain physical device information data of the physical device 101, select a slot position that is matched with the physical device 101 and is not used from the slot position pool 103 according to the physical device information data, and transmit the physical device information data and the slot position to the slot position list 104;
the slot position list 104 is used for receiving and storing the physical device information data and the slot position, and also used for transmitting the physical device information data and the slot position to the virtual machine 105;
the virtual machine 105 transparently transfers the physical device 101 according to the physical device information data and the slot position.
In the system for transparently transmitting physical equipment by using a virtual machine, the equipment information data includes equipment slot position type data and configuration information data;
slot position type data and slot position address data are stored in the slot positions;
the slot address data is typically a pci address, such as "0000: 01: 02.01";
the slot position type data indicates the slot type of the slot position, such as the pci slot position type and the pci slot position type;
the slot position management module 102 selects a slot position which is matched with the physical equipment 101 and is not used from the slot position pool 103 according to the equipment slot position type data;
the virtual machine 105 obtains the information of the physical device 101 according to the configuration information data and then transparently transmits the information to the physical device 101;
the slot pool 103 stores slot positions which can be used by the virtual machine 105;
the slot list 104 stores slots that are being used by the virtual machine 105.
In the system for transparently transmitting physical devices by using a virtual machine, the configuration information data includes physical device identification data, physical device type data, and physical device matching information;
the physical device identification data includes a serial number (serial), a uuid, and the like of the physical device 101, and is usually a unique identifier of the physical device 101, and identifies the physical device 101 at the slot position;
the physical device type data includes type data of the physical device 101, such as an sriov type network card, a pfiov type network card, a raid type physical hard disk, an hdd type physical hard disk, an ssd type physical hard disk, an mdev type video card, and the like, which indicate the specific type of the physical device 101, and a suitable transparent transmission mode can be automatically selected according to the type of the physical device 101 during transparent transmission;
the physical device matching information is typically a set of matching rules, such as the type of physical device 101: the virtual machine 105 is used for automatically matching the proper physical equipment 101 for transparent transmission according to the matching information when the virtual machine 105 needs to be migrated (the migration refers to the operation of the virtual machine 105 on another physical machine and the need of transparent transmission of the physical equipment 101 again);
the configuration information data also contains some special configurations required during transparent transmission, such as the vlan number and mac address configuration supported by the network card in sriov mode.
In the system for transparently transmitting physical devices by using a virtual machine, a plurality of following different types (slots) are stored in the slot pool 103: the unified transparent transmission management of the virtual machines 105 of different chipsets and different physical devices 101 can be realized by introducing the pci slot position, the pci slot position and the slot position;
the slot pool 103 is a set of one or several types of slot positions, which indicates that a certain type of slot position set can be used by the virtual machine 105, one virtual machine 105 may have a plurality of slot pools 103, for the virtual machines 105 of different chip sets, different slot pools 103 may be initialized, and when a slot position is obtained, an appropriate slot position can be returned only by the type of the slot position;
the slot position refers to a slot where the transparent transmission physical device 101 is located for the virtual machine 105, which indicates the transparent transmission position and configuration information of the physical device 101, and includes the physical device 101 identifier, so as to support the virtual machine 105 to maintain the consistency between the slot position and the device when restarting or regenerating; the slot position also comprises some special configurations during transparent transmission, such as different drive options, hot-plug configuration, vlan number, mac address and the like; and matching information of the devices to support operations such as migration of the virtual machine 105, the same devices can be transparently transferred and the configuration is kept unchanged.
In a third aspect, a computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any one of the first aspect.
For example, the memory may include random access memory, flash memory, read only memory, programmable read only memory, non-volatile memory or registers, or the like;
the processor may be a Central Processing Unit (CPU) or the like, or a Graphics Processing Unit (GPU) memory may store executable instructions;
the processor may execute execution instructions stored in the memory to implement the various processes described herein.
It will be appreciated that the memory in this embodiment can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory;
the non-volatile memory may be a ROM (Read-only memory), a PROM (programmable Read-only memory), an EPROM (erasable programmable Read-only memory), an EEPROM (electrically erasable programmable Read-only memory), or a flash memory.
The volatile memory may be a RAM (random access memory) which functions as an external cache;
by way of illustration and not limitation, many forms of RAM are available, such as SRAM (staticaram, static random access memory), DRAM (dynamic RAM, dynamic random access memory), SDRAM (synchronous DRAM ), DDRSDRAM (double data rate SDRAM, double data rate synchronous DRAM), ESDRAM (Enhanced SDRAM, Enhanced synchronous DRAM), SLDRAM (synchlink DRAM, synchronous link DRAM), and DRRAM (directrrambus RAM, direct memory random access memory). The memory 205 described herein is intended to comprise, without being limited to, these and any other suitable types of memory 205.
In some embodiments, the memory stores elements, upgrade packages, executable units, or data structures, or a subset thereof, or an extended set thereof: operating systems and applications;
the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks;
the application programs comprise various application programs and are used for realizing various application services. The program for implementing the method of the embodiment of the present invention may be included in the application program.
Those of skill in the art would understand that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of software and electronic hardware;
whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution;
skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments of the present application, the disclosed system, apparatus and method may be implemented in other ways;
for example, the division of a unit or a module is only one logic function division, and there may be another division manner in actual implementation;
for example, a plurality of units or modules or components may be combined or may be integrated into another system;
in addition, functional units or modules in the embodiments of the present application may be integrated into one processing unit or module, or may exist separately and physically.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a machine-readable storage medium;
therefore, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a machine-readable storage medium and may include several instructions to cause an electronic device to execute all or part of the processes of the technical solution described in the embodiments of the present application;
the storage medium may include various media that can store program codes, such as ROM, RAM, a removable disk, a hard disk, a magnetic disk, or an optical disk.
In summary, the method and system for transparently transmitting physical devices by using a virtual machine of the present invention provide a good and universal management manner, are suitable for various transparently transmitted physical devices and virtual machines of different chipsets, support the virtual machine to still perform migration after transparently transmitting the devices, and still keep the device information of the virtual machine that is restarted and transparently transmitted unchanged.
Specific embodiments of the invention have been described above. It is to be understood that the invention is not limited to the particular embodiments described above, in that devices and structures not described in detail are understood to be implemented in a manner common in the art; various changes or modifications may be made by one skilled in the art within the scope of the claims without departing from the spirit of the invention, and without affecting the spirit of the invention.

Claims (9)

1. A method for transparently transmitting physical equipment by a virtual machine is characterized by comprising the following steps:
step 1: acquiring physical equipment information data of physical equipment;
step 2: selecting a slot position which is matched with the physical equipment and is not used from the slot position pool according to the information data of the physical equipment;
and step 3: writing the physical equipment information data and the slot position into a slot position list;
and 4, step 4: and the virtual machine acquires the physical equipment information data of the physical equipment from the slot position list and transparently transmits the physical equipment after the slot position.
2. The method for transparent transmission of physical devices by a virtual machine according to claim 1, wherein the device information data includes device slot type data, configuration information data;
slot position type data and slot position address data are stored in the slot positions;
selecting a slot position which is matched with the physical equipment and is not used from the slot position pool according to the equipment slot position type data in the step 2;
and 4, the virtual machine acquires the information of the physical equipment according to the configuration information data and then transparently transmits the information to the physical equipment.
3. The method for virtual machine transparent transmission of physical devices according to claim 2, wherein the configuration information data includes physical device identification data, physical device type data, and physical device matching information.
4. The method for transparently transmitting physical equipment by using virtual machine according to any one of claims 1-3, wherein a plurality of following different types of slots are stored in the slot pool: a pci slot position and a pcie slot position.
5. A system for virtual machine to pass through physical equipment is characterized by comprising the physical equipment, a slot position management module, a slot position pool, a slot position list and a virtual machine, wherein a plurality of slot positions are stored in the slot position pool, and the physical equipment and the virtual machine are provided in plurality;
the slot position management module is used for acquiring physical equipment information data of the physical equipment, selecting a slot position which is matched with the physical equipment and is not used from the slot position pool according to the physical equipment information data, and transmitting the physical equipment information data and the slot position to the slot position list;
the slot position list is used for receiving and storing the physical equipment information data and the slot position, and is also used for transmitting the physical equipment information data and the slot position to the virtual machine;
and the virtual machine transparently transmits the physical equipment according to the physical equipment information data and the slot position.
6. The system for transparent transmission of physical devices by virtual machines according to claim 5, wherein the device information data includes device slot type data, configuration information data;
slot position type data and slot position address data are stored in the slot positions;
the slot position management module selects a slot position which is matched with the physical equipment and is not used from the slot position pool according to the equipment slot position type data;
and the virtual machine acquires the information of the physical equipment according to the configuration information data and then transparently transmits the information to the physical equipment.
7. The system for virtual machine transparent transmission of physical devices of claim 6, wherein the configuration information data comprises physical device identification data, physical device type data, physical device matching information.
8. The system of virtual machine pass-through physical devices of any one of claims 5-7, wherein a plurality of slots of the following different types are stored in the slot pool: a pci slot position and a pcie slot position.
9. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1-4.
CN202111115586.2A 2021-09-23 2021-09-23 Method and system for transmitting physical equipment through virtual machine Active CN113806021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111115586.2A CN113806021B (en) 2021-09-23 2021-09-23 Method and system for transmitting physical equipment through virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111115586.2A CN113806021B (en) 2021-09-23 2021-09-23 Method and system for transmitting physical equipment through virtual machine

Publications (2)

Publication Number Publication Date
CN113806021A true CN113806021A (en) 2021-12-17
CN113806021B CN113806021B (en) 2023-12-15

Family

ID=78940370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111115586.2A Active CN113806021B (en) 2021-09-23 2021-09-23 Method and system for transmitting physical equipment through virtual machine

Country Status (1)

Country Link
CN (1) CN113806021B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080028402A1 (en) * 2006-07-27 2008-01-31 Nec Corporation Method of setting operation environment and computer system
CN107547253A (en) * 2017-06-30 2018-01-05 新华三技术有限公司 A kind of collocation method and device
CN109086099A (en) * 2018-07-25 2018-12-25 浪潮(北京)电子信息产业有限公司 A kind of method, apparatus, equipment and storage medium starting virtual machine
US20200167181A1 (en) * 2018-11-28 2020-05-28 Red Hat, Inc. Managing related devices for virtual machines utilizing shared device data
CN111866209A (en) * 2020-07-07 2020-10-30 上海云轴信息科技有限公司 Method and equipment for distributing network card for cloud host
CN113326105A (en) * 2021-08-04 2021-08-31 深圳市科力锐科技有限公司 Hardware equipment configuration method, device and equipment based on host migration

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080028402A1 (en) * 2006-07-27 2008-01-31 Nec Corporation Method of setting operation environment and computer system
CN107547253A (en) * 2017-06-30 2018-01-05 新华三技术有限公司 A kind of collocation method and device
CN109086099A (en) * 2018-07-25 2018-12-25 浪潮(北京)电子信息产业有限公司 A kind of method, apparatus, equipment and storage medium starting virtual machine
US20200167181A1 (en) * 2018-11-28 2020-05-28 Red Hat, Inc. Managing related devices for virtual machines utilizing shared device data
CN111866209A (en) * 2020-07-07 2020-10-30 上海云轴信息科技有限公司 Method and equipment for distributing network card for cloud host
CN113326105A (en) * 2021-08-04 2021-08-31 深圳市科力锐科技有限公司 Hardware equipment configuration method, device and equipment based on host migration

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JOEL KOSHY; RAJU PANDEY; INGWAR WIRJAWAN: "Optimizing Embedded Virtual Machines", 2009 INTERNATIONAL CONFERENCE ON COMPUTATIONAL SCIENCE AND ENGINEERING *
李宁: "基于服务等级目标精确保障的虚拟机存储性能优化技术", 中国学位论文全文数据库 *

Also Published As

Publication number Publication date
CN113806021B (en) 2023-12-15

Similar Documents

Publication Publication Date Title
JP4811489B2 (en) Server system, collective server device, and MAC address management method
EP2840495B1 (en) Container-based processing method and apparatus
US10133504B2 (en) Dynamic partitioning of processing hardware
CN114651229A (en) Baseboard management controller firmware update
US20200356357A1 (en) Firmware update architecture with os-bios communication
US9495172B2 (en) Method of controlling computer system and computer system
US9916215B2 (en) System and method for selectively utilizing memory available in a redundant host in a cluster for virtual machines
US9875057B2 (en) Method of live migration
US10956189B2 (en) Methods for managing virtualized remote direct memory access devices
CN105612498A (en) Virtual machine live migration method, virtual machine memory data processing method, server, and virtual machine system
JP2023036774A (en) Access control method of shared memory, access control device of shared memory, electronic apparatus, and autonomous vehicle
US10788997B2 (en) Method and device for storage management with metadata stored in disk extents in an extent pool
US11824929B2 (en) Using maintenance mode to upgrade a distributed system
CN104216771A (en) Restarting method and device for software program
US20070061613A1 (en) Restart method for operating system
WO2018059565A1 (en) Method and system for backing up flash memory data
CN113806021A (en) Method and system for transparent transmission of physical equipment by virtual machine
CN112204521A (en) Processor feature ID response for virtualization
CN111506389A (en) Virtual machine starting method and device
CN109032522B (en) Data reading method of solid state disk and solid state disk
CN113950673A (en) Non-volatile storage partition identifier
EP2613254A2 (en) Apparatus and method for partitioning memory area for application preloading in a wireless terminal
US6314482B1 (en) Method and system for indexing adapters within a data processing system
JP7355876B2 (en) Program startup method, equipment, and storage medium
US11947501B2 (en) Two-hierarchy file system

Legal Events

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