CN113553143B - Heterogeneous method of virtualized resource pool, readable storage medium and virtualization platform - Google Patents

Heterogeneous method of virtualized resource pool, readable storage medium and virtualization platform Download PDF

Info

Publication number
CN113553143B
CN113553143B CN202111095776.2A CN202111095776A CN113553143B CN 113553143 B CN113553143 B CN 113553143B CN 202111095776 A CN202111095776 A CN 202111095776A CN 113553143 B CN113553143 B CN 113553143B
Authority
CN
China
Prior art keywords
cpu
characteristic
resource pool
host
virtual machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111095776.2A
Other languages
Chinese (zh)
Other versions
CN113553143A (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.)
Winhong Information Technology Co ltd
Original Assignee
Winhong 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 Winhong Information Technology Co ltd filed Critical Winhong Information Technology Co ltd
Priority to CN202111095776.2A priority Critical patent/CN113553143B/en
Publication of CN113553143A publication Critical patent/CN113553143A/en
Application granted granted Critical
Publication of CN113553143B publication Critical patent/CN113553143B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the field of cloud computing, in particular to a heterogeneous method of a virtualized resource pool, which comprises the following steps: a characteristic value obtaining step, namely obtaining the cpu characteristic value of each host by using a cpu id instruction; a characteristic instruction set acquisition step, namely calculating the intersection of each field of all acquired host cpu characteristic values and recording the intersection as a characteristic instruction set; and a virtual machine characteristic configuration step, namely configuring the characteristic instruction set as the virtual machine characteristic cpufeatureset to all the virtual machines in the resource pool. The heterogeneous method is equivalent to shielding partial functions of a cpu host of a high version, and the virtual machines operated by each host keep the same virtual machine characteristic cpu feature, that is to say, the virtual machines are operated on any host in a peer-to-peer manner, and a plurality of sets of management systems are not required to be constructed to manage all the virtual machines and the hosts operated by the virtual machines.

Description

Heterogeneous method of virtualized resource pool, readable storage medium and virtualization platform
Technical Field
The invention relates to the field of cloud computing, in particular to a heterogeneous method of a virtualized resource pool, a virtualization platform and a computer-readable storage medium.
Background
The advent of cloud computing brought a completely new IT infrastructure construction, use and delivery model. The cloud server provider obtains the virtual machine through a server virtualization technology and provides the virtual machine as a service server for a user to use, and therefore finer-grained resource utilization can be achieved. Compared with the traditional physical machine, the virtual machine is more convenient and faster to deploy, can be migrated among different physical machines, and improves the flexibility of resource scheduling.
In the construction process of the private cloud, some resource pools have high requirements on hardware and need to run on a physical server with high performance, and because the resource pools have high dependency on the hardware, the resource pools are inconvenient to uniformly manage.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a heterogeneous method for virtualizing a resource pool, a computer readable storage medium storing a computer program which implements the method when executed, and a virtualization platform including the storage medium, wherein the method can implement resource pool heterogeneous.
A heterogeneous method for virtualizing a resource pool is provided, which comprises the following steps:
a characteristic value obtaining step, namely obtaining the cpu characteristic value of each host by using a cpu id instruction;
a characteristic instruction set acquisition step, namely calculating the intersection of each field of all acquired host cpu characteristic values and recording the intersection as a characteristic instruction set;
and a virtual machine characteristic configuration step, namely configuring the characteristic instruction set as the virtual machine characteristic cpufeatureset to all the virtual machines in the resource pool.
Preferably, the method comprises the following steps of: acquiring new host information applied to enter a pool, extracting a cpu characteristic value of the new host according to a features field in the acquired information, calculating an intersection of the cpu characteristic value of the new host and a characteristic instruction set, and distributing the intersection obtained by calculation to each virtual machine as a new characteristic instruction set.
Preferably, a pre-check step is included, performed before the new host pooling step: and acquiring a cpu characteristic value of a new host currently applied to the pool, judging whether the acquired cpu characteristic value deviates from a characteristic instruction set of the resource pool to a preset degree, and if so, sending a prompt.
Preferably, in the pre-checking step, if the judgment result is that the upward deviation reaches the preset degree, it is judged whether the total amount of the resources occupying the resource pool by the current resource pool resource usage reaches the preset degree, and if the judgment result is yes, the pre-checking step does not issue a prompt.
Preferably, a configuration detection step is included, performed before the cpu characteristic values are acquired: and judging whether the BIOS configuration of the host has closed cpu characteristics, and if so, sending a prompt.
Preferably, the method comprises the following hardware identification steps: and judging whether the hardware configuration of the host newly applying for adding the resource pool deviates from the preset standard configuration to a preset degree, and if so, sending a prompt.
Preferably, the hardware configuration refers to the number of network cards and/or the HBA card rate.
Preferably, in the characteristic value obtaining step, obtaining the cpu characteristic value of each host specifically includes: and acquiring the features field of the host, and extracting the characteristic value of the host recorded by the field.
A computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, is capable of implementing the above-described heterogeneous method of virtualizing a resource pool.
There is also provided a virtualization platform for enabling a user to,
the virtualization platform comprises a plurality of virtual machines and a processor, wherein the processor acquires resource information of the virtual machines and adjusts parameters of the virtual machines, the processor is stored with the computer readable storage medium in advance, and a computer program on the computer readable storage medium can be executed by the processor.
Has the advantages that: when the resource pool is constructed, the intersection of each field of cpu characteristic values of all hosts, namely a characteristic instruction set, is calculated, and then the characteristic instruction set obtained by calculation is configured to all virtual machines in the resource pool as virtual machine characteristic cpufatureset, which is equivalent to shielding partial functions of high-version cpu hosts, and the virtual machines operated by all hosts keep the same virtual machine characteristic cpufatureset, namely the virtual machines are operated on any host in a peer-to-peer manner, so that all virtual machines on the heterogeneous resource pool can realize online smooth migration from one host to another without execution operation difference among different hosts, and a plurality of sets of management systems are not required to be constructed to manage all the virtual machines and the hosts on which the virtual machines operate.
Detailed Description
The invention is described in further detail below with reference to specific embodiments.
The virtualization platform is composed of a plurality of virtual machines built on a plurality of hosts, and manages the virtual machines by a heterogeneous method of virtualizing a resource pool.
The steps of performing the heterogeneous method of virtualizing a resource pool when building the heterogeneous resource pool are as follows.
And a characteristic value obtaining step: the cpu characteristic value of each host is acquired using the cpu id instruction.
A characteristic instruction set acquisition step: and calculating the intersection of each field of all the acquired host cpu characteristic values, and recording the intersection as a characteristic instruction set.
A virtual machine characteristic configuration step: the property instruction set is configured as a virtual machine property cpufeatureset to all virtual machines in the resource pool.
The heterogeneous method for virtualizing the resource pool, which is realized by the above steps, is equivalent to shielding partial functions of a cpu host of a high version when the resource pool is built, and the virtual machines run by each host keep the same virtual machine characteristic cpu feature, that is, the virtual machines run on any host are all equal, so that all the virtual machines on the heterogeneous resource pool can be migrated from one host to another smoothly without execution and running differences among different hosts, and a plurality of sets of management systems are not required to be built to manage all the virtual machines and the hosts on which the virtual machines work.
The virtual machine platform executes the heterogeneous method of the virtualized resource pool, and controls all virtual machines in a mode of automatically calculating cpu characteristic instruction sets of the virtual machines, and the specific steps are detailed as follows.
Firstly, a characteristic value acquisition step is executed, and a cpu characteristic value of a host running each virtual machine is acquired by using a cpu id instruction. The specific steps for obtaining the cpu characteristic values of the hosts are as follows: the feature fields in the xe host-cpu-info of the host are obtained through the cpu id instruction, and the feature values of the host recorded by the feature fields are extracted.
The cpu id instruction obtains input parameters from the eax register, and then outputs the output parameters to the registers eax, ebx, ecx and edx. The cpu feature values (cpu features) of all hosts obtained using the cpu id instruction are returned to the eax, ebx, ecx, and edx registers, as are the cpu feature values: 17cbfbff-95ba2223-2993 fbff-00000003-.
Take the cpu eigenvalue obtained above as an example.
A first stage: the input parameter eax is 0x1, ecx is cleared, and the output parameter edx// cpu features;
and a second stage: the input parameter eax is 0x1, ecx is cleared, and the output parameter ecx// cpu features;
a third stage: the input parameter eax is 0x80000001, ecx is cleared, and the output parameter edx// cpu extra features;
a fourth stage: the input parameter eax is 0x80000001, ecx is cleared, and the output parameter ecx// cpu extra features;
a fifth stage: input parameters eax is 0xd, ecx is 1, output parameters eax// The size in bytes of The XSAVE area connecting all enabled by XCRO | IA32_ XSS;
a sixth stage: the input parameter eax is 0x7, ecx is 0, and the output parameter ebx// Structured Extended features Flags and execution Leaf;
a seventh stage: the input parameter eax is 0x7, ecx is 0, and the output parameter ecx// Structured Extended features Flags and execution Leaf;
an eighth stage: the input parameter eax is 0x80000007, ecx is cleared, and the output parameter edx// Bit 08 is Invariant TSC available if 1;
a ninth stage: the input parameter eax is 0x80000008, ecx is cleared, and the output parameter ebx// 0.
And performing union operation on all the return values executed by the cpu 0x1 and the cpu 0x80000001 of the physical cpu of the host according to the same register value, wherein the obtained union is used as a cpu instruction set of the host.
And then executing a characteristic instruction set acquisition step, calculating the intersection of each field of all the acquired host cpu characteristic values, specifically, identifying the same field in each host cpu instruction set, and recording all the identified same fields as the characteristic instruction set of the resource pool.
In the case of different models of cpus or the same model of cpu in different configurations, there will be a difference in the obtained feature values, such as the following two cpu values:
17c9cbf5-f6f83203-2191cbf5-00000123-00000007-018c0b39-00000000-00000000-00000000(1);
17cbfbff-f7fa3223-2d93fbff-00000123-0000000f-019c4fbb-00000008-00000000-00000000(2);
if the two cpus are combined into a resource pool, the intersection of each field of the two cpus is calculated to obtain the intersection
17c9cbf5-f6f83203-2191cbf 5-00000123-.
And finally, executing a virtual machine characteristic configuration step, calling a characteristic instruction set stored in the Hypervisor to serve as the virtual machine characteristic cpufeatureset to be configured to all virtual machines in the resource pool. When the cpu id instruction vmexit executed inside the virtual machine exits to the Hypervisor, the Hypervisor simulates the execution of the cpu id of the virtual machine, and when the virtual machine queries the cpu features, the cpu id return value of the actual physical cpu and the calculated corresponding field are subjected to and operation, and the result is used as the return value of the cpu id of the virtual machine.
When the resource pool is constructed, the intersection of each field of cpu characteristic values of all hosts, namely a characteristic instruction set, is calculated, and then the characteristic instruction set obtained by calculation is configured to all virtual machines in the resource pool as virtual machine characteristic cpufatureset, which is equivalent to shielding partial functions of high-version cpu hosts, and the virtual machines operated by all hosts keep the same virtual machine characteristic cpufatureset, namely the virtual machines are operated on any host in a peer-to-peer manner, so that all virtual machines on the heterogeneous resource pool can realize online smooth migration from one host to another without execution operation difference among different hosts, and a plurality of sets of management systems are not required to be constructed to manage all the virtual machines and the hosts on which the virtual machines operate.
The virtual platform executes the above-mentioned heterogeneous method for virtualizing the resource pool under the following three conditions: a new host applies for adding into the resource pool; a host exits the resource pool; and the host in the resource pool is reconnected after the host in the resource pool is restarted.
Under the condition that a new host applies for adding into a resource pool, executing the step of adding the new host into the pool firstly: acquiring information of a new host applied to the pool, extracting a cpu characteristic value of the new host according to a feature field in the xehost-cpu-info in the acquired information, calculating an intersection of the cpu characteristic value of the new host and a characteristic instruction set, and distributing the calculated intersection to each virtual machine as a new characteristic instruction set.
In addition, a pre-check step is executed before the new host pooling step: and acquiring a cpu characteristic value of a new host currently applied to the pool, judging whether the acquired cpu characteristic value deviates (deviates upwards or downwards) from a characteristic instruction set of the resource pool to a preset degree, and if so, sending a prompt.
In the pre-checking step, if the downward deviation reaches the preset degree as a result of the judgment, it indicates that the new host version is lower and the feature value difference with the host in the resource pool is too large, and after the cpu host of the lower version is added into the resource pool and enters the cpu host resource pool of the higher version, the cpu host may not be started after being shut down
In the pre-checking step, if the judgment result is that the upward deviation reaches the preset degree, it indicates that the new host version is higher and the feature value difference with the host in the resource pool is too large, and the cpu host of the higher version is added into the resource pool to the cpu resource pool of the lower version, so that the new characteristic of the cpu host of the higher version cannot be exerted, and the new host is not suitable for being added into the resource pool. However, in order to avoid that the current resource pool urgently needs the resources of the new host, it is necessary to determine whether the total amount of the resources of the resource pool occupied by the resource usage of the current resource pool reaches a preset degree, and if the determination result is yes, the pre-checking step does not send a prompt, but adds the new host into the resource pool.
The hardware identification step is executed before the step of entering the new host into the pool is executed, whether the hardware configuration (such as the number of network cards and the HBA card speed) of the host newly applying for adding into the resource pool deviates from the preset standard configuration to reach the preset degree (such as lower than 70 percent of the standard configuration) is judged, and if the judgment result is yes, a prompt is sent. The standard configuration is the average of the hardware configurations of all hosts already in the resource pool.
Wherein, in the step of obtaining the characteristic value and the step of entering the pool by the new host, the method further comprises a step of detecting the configuration executed before obtaining the cpu characteristic value: judging whether closed cpu characteristics exist in the BIOS configuration of the host, if so, adding the host into the resource pool, which may result in that virtual machines running on all hosts of the whole resource pool cannot use these cpu characteristics, and if the host is turned off and vt-x is closed, then all hosts in the resource pool cannot run full virtual machines, so the virtualization platform sends a prompt to prompt an administrator/user to check whether the cpu characteristics currently in the closed state can be opened.
The hosts added into the resource pool all adopt CPUs of the same manufacturer, the situation that the CPUs of Intel and AMD are used in a mixed mode cannot occur, the same virtualization management center version is installed on all the hosts, and meanwhile the patch of each host is kept consistent.
The above embodiments are only embodiments of the present invention, and the scope of protection is not limited thereto. The insubstantial changes or substitutions will now be made by those skilled in the art based on the teachings of the present invention, which fall within the scope of the claims.

Claims (10)

1. The heterogeneous method of the virtual resource pool is characterized by comprising the following steps:
a characteristic value obtaining step, namely obtaining the cpu characteristic value of each host by using a cpu id instruction;
a characteristic instruction set acquisition step, namely calculating the intersection of each field of all acquired host cpu characteristic values and recording the intersection as a characteristic instruction set;
and a virtual machine characteristic configuration step, wherein a characteristic instruction set is configured to all virtual machines in the resource pool as a virtual machine characteristic cpu featureset, the characteristic instruction set is stored in the Hypervisor of each virtual machine, when the cpu id instruction executed inside the virtual machine exits to the Hypervisor, the Hypervisor simulates the execution of the cpu id of the virtual machine, and when the virtual machine queries the cpu features, the result of AND operation between the cpu id return value of the physical cpu which actually responds to the query by the virtual machine and the characteristic instruction set is used as the return value of the cpu id of the virtual machine.
2. The heterogeneous method of virtualizing a resource pool according to claim 1, comprising the step of entering a new host into the pool: acquiring new host information applied to enter a pool, extracting a cpu characteristic value of the new host according to a features field in the acquired information, calculating an intersection of the cpu characteristic value of the new host and a characteristic instruction set, and distributing the intersection obtained by calculation to each virtual machine as a new characteristic instruction set.
3. The heterogeneous method of virtualizing a resource pool of claim 2, including a pre-check step performed prior to said new host pooling step: and acquiring a cpu characteristic value of a new host currently applied to the pool, judging whether the acquired cpu characteristic value deviates from a characteristic instruction set of the resource pool to a preset degree, and if so, sending a prompt.
4. The heterogeneous method of the virtualized resource pool according to claim 3, wherein in the pre-inspection step, if the upward deviation is a predetermined degree, it is determined whether the total amount of the resources occupied by the current resource pool reaches the predetermined degree, and if so, the pre-inspection step does not issue a prompt.
5. The heterogeneous method of virtualizing a resource pool according to claim 1 or 2, comprising a configuration detection step, performed before obtaining the cpu eigenvalues: and judging whether the BIOS configuration of the host has closed cpu characteristics, and if so, sending a prompt.
6. The heterogeneous method of virtualizing a resource pool according to claim 1, comprising the step of hardware identification: and judging whether the hardware configuration of the host newly applying for adding the resource pool deviates from the preset standard configuration to a preset degree, and if so, sending a prompt.
7. The heterogeneous method of virtualizing a resource pool according to claim 6, wherein said hardware configuration is an index number of network cards and/or an HBA card rate.
8. The heterogeneous method of the virtualized resource pool according to claim 1, wherein, in the step of obtaining the feature value, obtaining the cpu feature value of each host specifically comprises: and acquiring the features field of the host, and extracting the characteristic value of the host recorded by the field.
9. Computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is able to carry out a method for heterogeneous virtualization of a resource pool according to one of claims 1 to 8.
10. Virtualization platform comprising a plurality of virtual machines and a processor, the processor acquiring resource information of the virtual machines and adjusting parameters of the virtual machines, characterized in that a computer readable storage medium according to claim 9 is pre-stored in the processor, and a computer program on the computer readable storage medium is executable by the processor.
CN202111095776.2A 2021-09-18 2021-09-18 Heterogeneous method of virtualized resource pool, readable storage medium and virtualization platform Active CN113553143B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111095776.2A CN113553143B (en) 2021-09-18 2021-09-18 Heterogeneous method of virtualized resource pool, readable storage medium and virtualization platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111095776.2A CN113553143B (en) 2021-09-18 2021-09-18 Heterogeneous method of virtualized resource pool, readable storage medium and virtualization platform

Publications (2)

Publication Number Publication Date
CN113553143A CN113553143A (en) 2021-10-26
CN113553143B true CN113553143B (en) 2022-01-07

Family

ID=78134419

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111095776.2A Active CN113553143B (en) 2021-09-18 2021-09-18 Heterogeneous method of virtualized resource pool, readable storage medium and virtualization platform

Country Status (1)

Country Link
CN (1) CN113553143B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104111867A (en) * 2013-04-19 2014-10-22 杭州迪普科技有限公司 Virtual machine transfer device and method
CN106648826A (en) * 2016-09-09 2017-05-10 北京百度网讯科技有限公司 Method and device for live migration of virtual machine
CN107220103A (en) * 2017-05-27 2017-09-29 郑州云海信息技术有限公司 A kind of CPU accelerating method and devices of host's physical machine
CN109324871A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 A kind of virtual machine hardware configuration method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9727355B2 (en) * 2013-08-23 2017-08-08 Vmware, Inc. Virtual Hadoop manager
CN108255570B (en) * 2016-12-28 2021-06-15 华为技术有限公司 Virtual machine migration method, device and system between heterogeneous virtual machine monitor platforms
CN107621970B (en) * 2017-10-16 2021-02-05 郑州云海信息技术有限公司 Virtual machine migration method and device for heterogeneous CPU

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104111867A (en) * 2013-04-19 2014-10-22 杭州迪普科技有限公司 Virtual machine transfer device and method
CN106648826A (en) * 2016-09-09 2017-05-10 北京百度网讯科技有限公司 Method and device for live migration of virtual machine
CN107220103A (en) * 2017-05-27 2017-09-29 郑州云海信息技术有限公司 A kind of CPU accelerating method and devices of host's physical machine
CN109324871A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 A kind of virtual machine hardware configuration method and system

Also Published As

Publication number Publication date
CN113553143A (en) 2021-10-26

Similar Documents

Publication Publication Date Title
US11061712B2 (en) Hot-plugging of virtual functions in a virtualized environment
US9996384B2 (en) Virtual machine homogenization to enable migration across heterogeneous computers
US9710304B2 (en) Methods and apparatus to select virtualization environments for migration
US9858095B2 (en) Dynamic virtual machine resizing in a cloud computing infrastructure
US10678581B2 (en) Methods and apparatus to select virtualization environments during deployment
CN102262557B (en) Method for constructing virtual machine monitor by bus architecture and performance service framework
US9223623B2 (en) Dynamic service resource control
CN101488173B (en) Method for measuring completeness of credible virtual field start-up files supporting non-delaying machine
US20120054740A1 (en) Techniques For Selectively Enabling Or Disabling Virtual Devices In Virtual Environments
US20130086583A1 (en) Method and Computer for Controlling Virtual Machine
US11924117B2 (en) Automated local scaling of compute instances
US20080104586A1 (en) Allowing Virtual Machine to Discover Virtual Status Thereof
US9928098B2 (en) Identifying application usage roles for devices provided to virtual machines
US9690612B2 (en) Dynamically managing a serial port interface of virtualization software on host device wherein execution is performed not during boot sequence
WO2015032201A1 (en) Virtual machine placing method and device
US11658868B2 (en) Mixed mode management
US10198220B2 (en) Storage resource provisioning for a test framework
US10467173B2 (en) Hot plugging of virtual bridges in a virtual PCI system
CN113553143B (en) Heterogeneous method of virtualized resource pool, readable storage medium and virtualization platform
US20120124355A1 (en) Single volume image file extraction
CN107741868B (en) Setting method and device for Basic Input Output System (BIOS)
CN109189556B (en) Affinity rule conflict monitoring method and device based on load balancing
WO2016141305A1 (en) Methods and apparatus to select virtualization environments for migration
WO2016141309A1 (en) Methods and apparatus to select virtualization environments during deployment
US11182184B2 (en) Implementing high-performance virtual machines for bare metal simulation

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