WO2022100534A1 - 虚拟实例设置方法及装置 - Google Patents

虚拟实例设置方法及装置 Download PDF

Info

Publication number
WO2022100534A1
WO2022100534A1 PCT/CN2021/129172 CN2021129172W WO2022100534A1 WO 2022100534 A1 WO2022100534 A1 WO 2022100534A1 CN 2021129172 W CN2021129172 W CN 2021129172W WO 2022100534 A1 WO2022100534 A1 WO 2022100534A1
Authority
WO
WIPO (PCT)
Prior art keywords
instance
virtual instance
tenant
qos
virtual
Prior art date
Application number
PCT/CN2021/129172
Other languages
English (en)
French (fr)
Inventor
张振中
Original Assignee
华为云计算技术有限公司
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 华为云计算技术有限公司 filed Critical 华为云计算技术有限公司
Publication of WO2022100534A1 publication Critical patent/WO2022100534A1/zh

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
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0645Rental transactions; Leasing transactions
    • 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

Definitions

  • the present application relates to the technical field of cloud computing, and in particular, to a method and device for setting a virtual instance, and a cloud platform.
  • Cloud computing is favored by more and more enterprises because of its characteristics of elastic scaling, flexible deployment, high reliability, high security and high cost performance, and its ecological structure is also constantly expanding and enriching.
  • virtual instances are a mainstream offering from cloud vendors.
  • Virtual instances launched by various cloud vendors usually have instance specifications.
  • Instance specifications include computing resources, network resources, and storage resources.
  • Computing resources include processor cores and memory resources, network resources include bandwidth resources, and storage resources include storage bandwidth.
  • the quality of service (QoS) corresponding to each instance specification is fixed by the cloud vendor. As long as a tenant selects a specific instance specification to create a virtual instance, the QoS corresponding to the specific instance specification is the QoS of the virtual instance.
  • QoS quality of service
  • QoS is bound to the instance specification. After a tenant selects an instance specification to create a virtual instance, the QoS of the virtual instance cannot be changed. In some cases, after a tenant selects a specific instance specification to create a virtual instance, the QoS will not be able to meet tenants' needs well, resulting in poor utilization of resources provided by cloud vendors.
  • the present application provides a virtual instance setting method and device, a cloud platform, and a storage medium.
  • the present application can realize on-demand creation of virtual instances.
  • the technical solutions provided by this application are as follows:
  • the present application provides a virtual instance setting method, the method is applied to a cloud platform, and the method includes: obtaining instance configuration information input by a tenant to confirm the instance specification and service quality QoS requirements of the virtual instance that the tenant needs to create, The QoS requirement is used to indicate the quality of service required by the tenant for the virtual instance; the selling price of the virtual instance is determined according to the instance specification and QoS requirements; the instance creation instruction entered by the tenant according to the selling price is obtained to create a virtual instance that meets the instance specification and QoS requirements .
  • the instance configuration information entered by the tenant to confirm the instance specification and QoS requirements of the virtual instance to be created by the tenant, determine the selling price of the virtual instance according to the instance specification and QoS requirements, and obtain the instance creation instruction entered by the tenant according to the selling price to create A virtual instance that meets the instance specifications and QoS requirements, so that virtual instances can be created according to the instance specifications and QoS requirements entered by the tenant, so that the created virtual instance can reflect the real needs of the tenant in a finer-grained manner, so that the creation of the tenant can be based on the instance configuration information.
  • Virtual instances can better meet the needs of tenants, realize on-demand purchase of cloud resources, reduce the cost of using cloud resources for tenants, and effectively improve the utilization of resources provided by cloud vendors, enabling cloud vendors to utilize limited resources. Cloud resources serve more tenants.
  • the virtual instance QoS can be decoupled from the physical server, reducing the impact of subsequent physical server evolution, utilization and replacement on instance specifications and performance.
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements of computing resources; when the basic QoS requirements of computing resources are configured with computing resources indicated by the instance specifications, the virtual instance uses the computing resources The minimum QoS requirement that can be achieved; the upper limit QoS requirement of computing performance is used to indicate the highest QoS requirement that the virtual instance can achieve for the usage of computing resources when the virtual instance is configured with computing resources indicated by the instance specification.
  • the method further includes: providing a selection range of basic QoS requirements of computing resources; confirming the basic QoS requirements of computing resources according to the value selected by the tenant in the selection range of basic QoS requirements of computing resources; providing an upper limit QoS of computing resources The required selection range; confirm the upper limit QoS requirements of computing resources according to the value selected by the tenant in the selection range of the upper limit QoS requirements of computing resources.
  • the computing resources include processor cores and/or memory.
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements of network resources; when the basic QoS requirements of network resources are configured with network resources indicated by the instance specification, the virtual instance uses the network resources The minimum QoS requirement that can be achieved; the upper limit QoS requirement of the network transmission performance is used to indicate the highest QoS requirement that the virtual instance can achieve for the usage of network resources when the virtual instance is configured with the network resources indicated by the instance specification.
  • the method further includes: providing a selection range of basic QoS requirements of network resources; confirming basic QoS requirements of network resources according to a value selected by the tenant in the selection range of basic QoS requirements of network resources; providing an upper limit QoS of network resources Required selection range; confirm the upper limit QoS requirement of network resources according to the value selected by the tenant in the selection range of the upper limit QoS requirement of network resources.
  • the network resources include network bandwidth or the number of packets sent per second (PPS).
  • PPS packets sent per second
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements for storage resources; when the basic QoS requirements for storage resources are configured with storage resources indicated by the instance specifications, the virtual instance uses the storage resources The minimum QoS requirement that can be achieved; the upper limit QoS requirement of storage performance When the virtual instance is configured with the storage resources indicated by the instance specification, the maximum QoS requirement that the virtual instance can achieve for the usage of storage resources.
  • the method further includes: providing a selection range of basic QoS requirements of storage resources; confirming the basic QoS requirements of storage resources according to the value selected by the tenant in the selection range of basic QoS requirements of storage resources; providing upper limit QoS of storage resources The required selection range; confirm the upper limit QoS requirement of the storage resource according to the value selected by the tenant in the selection range of the upper limit QoS requirement of the storage resource.
  • the storage resources include storage bandwidth and/or IOPS of read/write operations per second.
  • obtaining the instance creation instruction input by the tenant according to the selling price to create a virtual instance that meets the instance specifications and QoS requirements includes: selecting a first physical server from a plurality of physical servers in the cloud data center, the idle hardware of the first physical server The resources can provide instance specifications and meet QoS requirements; a virtual instance is created on the first physical server, wherein predetermined hardware resources in the idle hardware resources of the first physical server are allocated to the virtual instance, and the predetermined hardware resources meet the instance specifications and QoS requirements.
  • the first physical server satisfies at least the following conditions: Condition 1: Any hardware resource of the first physical server can simultaneously satisfy the basic QoS requirements of all created virtual instances and the to-be-created virtual instances on the first physical server. Basic QoS requirements for virtual instances.
  • Condition 2 For any hardware resource of the first physical server, the sum of the upper limit QoS requirements of all created virtual instances on the first physical server and the upper limit QoS requirements of the virtual instance to be created is less than or equal to that on other alternative physical servers. The sum of the upper limit QoS requirement of the created virtual instance and the upper limit QoS requirement of the virtual instance to be created.
  • the physical server By selecting a physical server according to this condition, it can be ensured that when all virtual instances on the physical server compete for resources, the physical server can ensure the basic performance of all virtual instances on the physical server and the service level agreement of the virtual instances.
  • the load balance of the physical servers can be achieved on the premise of ensuring the basic performance, the probability of competing for resources on each physical server can be controlled to be as even as possible, and the physical server can be reduced as much as possible.
  • the probability of competing for resources between virtual instances in the cloud so that each virtual instance has the highest possible probability to meet the upper limit QoS requirements, which can ensure the full utilization of cloud computing environment resources and improve the utilization of cluster resources.
  • the method further includes: acquiring the updated QoS requirement input by the tenant, wherein the updated QoS requirement is used to indicate the updated quality of service required by the tenant for the virtual instance; and selecting a second physical server from a plurality of physical servers in the cloud data center.
  • the server, the idle hardware resources of the second physical server can provide instance specifications and meet the update QoS requirements; the virtual instance is migrated from the first physical server to the second physical server.
  • the virtual instance After the virtual instance is created, by updating the QoS requirements of the virtual instance according to the business requirements, and migrating the virtual instance according to the updated QoS requirements, resources can be allocated to the virtual instance according to the business requirements, making full use of the resources of the physical server, and saving tenants using the cloud. cost of resources.
  • the method further includes: providing a first option, where the first option is used to instruct the tenant to select the virtual instance to restart when the QoS is updated; if the tenant selects to restart the virtual instance when the QoS is updated, Stop running the virtual instance on the first physical server, migrate the virtual instance from the first physical server to the second physical server, and run the virtual instance on the second physical server.
  • the method further includes: providing a second option, where the second option is used to instruct the tenant to choose not to restart the virtual instance when updating the QoS; when the tenant chooses to not restart the virtual instance when updating the QoS In this case, the virtual instance is migrated online from the first physical server to the second physical server.
  • the method further includes: deducting the account of the tenant for logging in to the cloud platform according to the selling price.
  • the cloud platform can deduct fees according to the selling price after the virtual instance is created. Or, when requesting to create a virtual instance, a fee will be charged according to the selling price.
  • the present application provides a virtual instance setting device, the device includes: an acquisition module, configured to acquire instance configuration information input by a tenant to confirm the instance specification and service quality QoS requirements of the virtual instance to be created by the tenant, wherein the QoS The requirement is used to indicate the quality of service required by the tenant for the virtual instance; the determination module is used to determine the selling price of the virtual instance according to the instance specifications and QoS requirements; the creation module is used to obtain the instance creation instruction entered by the tenant according to the selling price to create a Virtual instance with instance specifications and QoS requirements.
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements for computing resources; the basic QoS requirements for computing resources When a virtual instance is configured with computing resources indicated by the instance specification, the virtual instance can achieve the lowest usage of computing resources.
  • QoS requirement; the upper limit QoS requirement of computing performance is used to indicate the highest QoS requirement that the virtual instance can meet for the usage of computing resources when the virtual instance is configured with computing resources indicated by the instance specification.
  • the device further includes: a providing module for providing a selection range of basic QoS requirements of computing resources; an obtaining module for confirming the value of the computing resources according to the value selected by the tenant in the selection range of basic QoS requirements of computing resources.
  • Basic QoS requirements providing module for providing the selection range of the upper limit QoS requirements of computing resources; obtaining module for confirming the upper limit QoS requirements of computing resources according to the value selected by the tenant in the selection range of the upper limit QoS requirements of computing resources.
  • the computing resources include processor cores and/or memory.
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements for network resources; basic QoS requirements for network resources When a virtual instance is configured with network resources indicated by the instance specification, the virtual instance can achieve the lowest usage of network resources.
  • QoS requirement; the upper limit QoS requirement of network transmission performance is used to indicate the highest QoS requirement that the virtual instance can meet for the usage of network resources when the virtual instance is configured with the network resources indicated by the instance specification.
  • the device further includes: a providing module for providing a selection range of basic QoS requirements of network resources; an obtaining module for confirming the network resource according to the value selected by the tenant in the selection range of basic QoS requirements of network resources.
  • Basic QoS requirements providing module for providing the selection range of the upper limit QoS requirements of network resources; obtaining module for confirming the upper limit QoS requirements of network resources according to the value selected by the tenant in the selection range of the upper limit QoS requirements of network resources.
  • the network resources include network bandwidth or the number of packets sent per second (PPS).
  • PPS packets sent per second
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements for storage resources; the basic QoS requirements for storage resources When the virtual instance is configured with the storage resources indicated by the instance specification, the virtual instance can achieve the lowest usage of the storage resources.
  • QoS requirement the upper limit QoS requirement of storage performance When the virtual instance is configured with the storage resources indicated by the instance specification, the highest QoS requirement that the virtual instance can meet for the usage of storage resources.
  • the device further includes: a providing module for providing a selection range of basic QoS requirements of the storage resource; an acquisition module for confirming the value of the storage resource according to the value selected by the tenant in the selection range of the basic QoS requirements of the storage resource.
  • Basic QoS requirements providing module for providing the selection range of upper limit QoS requirements of storage resources; obtaining module for confirming the upper limit QoS requirements of storage resources according to the value selected by the tenant in the selection range of upper limit QoS requirements of storage resources.
  • the storage resources include storage bandwidth and/or IOPS of read/write operations per second.
  • create a module which is specifically used to: select a first physical server from multiple physical servers in the cloud data center, and the idle hardware resources of the first physical server can provide instance specifications and meet QoS requirements;
  • a virtual instance is created, wherein predetermined hardware resources among the idle hardware resources of the first physical server are allocated to the virtual instance, and the predetermined hardware resources meet the instance specifications and QoS requirements.
  • the device further includes: an acquisition module for acquiring the updated QoS requirement input by the tenant, wherein the updated QoS requirement is used to indicate the updated quality of service required by the tenant for the virtual instance;
  • the second physical server is selected from the plurality of physical servers, and the idle hardware resources of the second physical server can provide instance specifications and meet the update QoS requirements;
  • the migration module is used for migrating the virtual instance from the first physical server to the second physical server.
  • the device further includes: a providing module for providing a first option, where the first option is used to instruct the tenant to choose to restart the virtual instance when When the instance is restarted, stop running the virtual instance on the first physical server, migrate the virtual instance from the first physical server to the second physical server, and run the virtual instance on the second physical server.
  • a providing module for providing a first option, where the first option is used to instruct the tenant to choose to restart the virtual instance when When the instance is restarted, stop running the virtual instance on the first physical server, migrate the virtual instance from the first physical server to the second physical server, and run the virtual instance on the second physical server.
  • the device further includes: a providing module for providing a second option, where the second option is used to instruct the tenant to choose not to restart the virtual instance when updating the QoS; a migration module, which is specifically used for when the tenant chooses to update the QoS The virtual instance is migrated online from the first physical server to the second physical server without restarting the virtual instance.
  • a providing module for providing a second option, where the second option is used to instruct the tenant to choose not to restart the virtual instance when updating the QoS
  • a migration module which is specifically used for when the tenant chooses to update the QoS The virtual instance is migrated online from the first physical server to the second physical server without restarting the virtual instance.
  • the device further includes: an operation and maintenance module, configured to deduct fees from the account of the tenant logging in to the cloud platform according to the selling price.
  • an operation and maintenance module configured to deduct fees from the account of the tenant logging in to the cloud platform according to the selling price.
  • the present application provides a cloud platform, including a memory and a processor, the memory stores program instructions, and the processor executes the program instructions to execute the method provided in the first aspect of the present application and any possible implementation manner thereof .
  • the present application provides a computer-readable storage medium
  • the computer-readable storage medium is a non-volatile computer-readable storage medium
  • the computer-readable storage medium includes program instructions, when the program instructions are stored on a computer device When running, the computer device is caused to execute the method provided in the first aspect of the present application and any of its possible implementation manners.
  • the present application provides a computer program product comprising instructions, when the computer program product runs on a computer, the computer causes the computer to execute the method provided in the first aspect of the present application and any possible implementation manners thereof.
  • FIG. 1 is a schematic diagram of an application scenario involved in a method for setting a virtual instance provided by an embodiment of the present application
  • FIG. 2 is a flowchart of a method for setting a virtual instance provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a selection instance specification provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a selection QoS requirement provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of a method for creating a virtual instance provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a principle for selecting a first physical server provided by an embodiment of the present application.
  • FIG. 7 is a flowchart of a method for migrating a virtual instance provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a principle of migrating a virtual instance provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another principle of migrating a virtual instance provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a virtual instance setting device provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of another virtual instance setting device provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of a cloud platform provided by an embodiment of the present application.
  • Virtual instance The virtual instance runs on the operating system of the physical server, and the virtual instance itself is provided with an operating system, and the operating system of the virtual instance also runs applications.
  • the virtual instance can use the hardware resources of the physical server, and different virtual instances communicate with each other.
  • the application instance is, for example, a virtual machine or a container.
  • Basic performance It is the performance that virtual instances can achieve at any time, and is the minimum guarantee for virtual instance performance.
  • the basic network bandwidth of a virtual instance is the bandwidth reserved by a host (host) for the virtual instance, and the network bandwidth that can be used by the virtual instance can reach the basic network bandwidth at any time.
  • Maximum performance is the burst upper limit of the performance that the virtual instance can achieve.
  • the resources used to provide the unoccupied basic performance can be shared by other virtual instances, so that the performance of the virtual instances can be higher than that of the virtual instances.
  • Basic performance the upper limit that the performance higher than the basic performance can achieve is the maximum performance of the virtual instance. Since each virtual instance does not maintain a high load all the time, the resources of the physical server will be relatively idle, making it possible for the performance of the virtual instance to reach the maximum performance. However, the maximum performance cannot be guaranteed all the time. Once the load of other virtual instances competes, the host will give priority to ensuring the basic performance of each virtual instance, and the maximum performance of the virtual instance cannot be guaranteed at this time.
  • QoS Quality of service
  • the basic quality of service and the upper limit of service quality The basic quality of service and the upper limit of service quality.
  • Basic quality of service virtual instances run on physical servers, and physical servers can allocate resources to virtual instances of a specific instance size. For example, a virtual instance with a 4U instance size can allocate 4 The server does not guarantee that the virtual instance can occupy the 4 processor cores 100% at any time. Only when the basic QOS for computing resources is 100%, the physical server can guarantee that the virtual instance can occupy 100% of the processor cores under any circumstances. 4 processor cores.
  • the physical server can only guarantee that the virtual instance can occupy the four processor cores at this time. 50% of the computing power of each processor core.
  • Upper limit quality of service virtual instances run on physical servers, and physical servers can allocate resources to virtual instances of specific instance specifications. When some virtual instances in the physical server do not occupy the resources indicated by their own basic service quality, other virtual instances The instance can use the unoccupied resources, so that the service quality of the other virtual instance can exceed the basic service quality, and the upper limit of the quality of service that can exceed the basic service quality is the upper limit service quality of the virtual instance. For example, for a virtual instance with an instance specification of 4U, the physical server can allocate 4 processor cores to the virtual instance. When the basic QOS of the virtual instance for computing resources is 50%, the physical server can occupy 50% of the virtual instance in any case.
  • the upper limit QOS of the virtual instance for computing resources is 100%
  • the computing resources that the virtual instance can occupy exceeds 50% of the computing power of each of the four processor cores
  • the upper limit of the computing resources that the virtual instance can occupy is each of the four processor cores. 100% of the computing power of each processor core.
  • the above description takes the instance specification as the computing resource as an example, and the instance specification may also include network resources and storage resources.
  • the basic QOS usage of network resources and storage resources is similar to the above, and will not be repeated here.
  • each cloud vendor When defining basic performance for virtual instances, each cloud vendor needs to ensure that the sum of the basic performance of all virtual instances on the physical server under the same performance does not exceed the maximum capability of the performance that the physical server can provide, so as to ensure that the basic performance of each virtual instance is within can be achieved at any time. Vendors usually determine the basic performance of each virtual processor based on the number of available virtual processors (vcpu) on the physical server, and determine the basic performance of each virtual instance based on the number of virtual processors included in each virtual instance .
  • vcpu virtual processors
  • the maximum network bandwidth of a physical server is 20 gigabits per second (Gbps)
  • the total number of virtual processors that can be issued is 40
  • the maximum performance of a virtual instance is generally defined according to the competitiveness of each vendor, which cannot exceed the maximum performance that a physical server can provide.
  • the maximum network bandwidth of a virtual instance is usually 1-3 times the basic network bandwidth
  • the network bandwidth of a physical server is at least 1-3 times the network bandwidth
  • the maximum storage bandwidth of a virtual instance is usually 2-10 times the basic storage bandwidth.
  • the storage bandwidth of the physical server is at least 2-10 times the storage bandwidth.
  • virtual instances launched by various cloud vendors usually have certain specifications.
  • the specifications are divided according to the computing performance, network transmission performance, and storage performance capabilities of physical servers.
  • Virtual instances of different specifications can achieve different QoS capabilities.
  • When a tenant needs to use a virtual instance directly select a virtual instance that meets the tenant's needs from the virtual instances planned by the cloud vendor.
  • the embodiment of the present application provides a method for setting a virtual instance, by obtaining the instance configuration information input by the tenant to confirm the instance specification and service quality QoS requirements of the virtual instance to be created by the tenant, and determining the selling price of the virtual instance according to the instance specification and QoS requirements , obtain the instance creation instruction entered by the tenant according to the selling price to create a virtual instance that meets the instance specifications and QoS requirements, so that a virtual instance can be created according to the instance specifications and QoS requirements input by the tenant, so that the created virtual instance can reflect the tenant in a finer-grained manner It can realize on-demand purchase of cloud resources, reduce the cost of using cloud resources for tenants, and effectively improve the utilization rate of resources provided by cloud vendors, enabling cloud vendors to utilize limited cloud resources for more tenants Serve.
  • the QoS requirement is used to indicate the quality of service required by the tenant for the virtual instance.
  • FIG. 1 is a schematic diagram of an implementation scenario involved in a method for setting a virtual instance provided by an embodiment of the present application.
  • the implementation scenario includes: a cloud data center 10 and a terminal 20 .
  • the cloud data center 10 and the terminal 20 can communicate.
  • the cloud data center 10 includes cloud resources and cloud platforms.
  • Cloud resources include a large number of basic resources owned by cloud service providers.
  • Basic resources can be computing resources, storage resources, and network resources.
  • the computing resources can be a large number of computing devices (eg, servers).
  • the cloud platform can utilize the deployed basic resources or virtualized resources based on the basic resources to implement the tenant's business and provide the tenant with cloud services.
  • the tenant's business includes software application business and the like created according to the tenant's business requirements.
  • the tenant's business includes language recognition services, video review services, or image rendering services created according to the tenant's business needs.
  • the cloud platform may be a cloud platform of a central cloud, a cloud platform of an edge cloud, or a cloud platform including a central cloud and an edge cloud, which is not specifically limited in this embodiment of the present application.
  • the tenant can access the cloud data center 10 through the terminal 20 and perform related processing on cloud resources through the cloud data center 10 .
  • the cloud platform can provide the tenant with a configuration interface, and the tenant can input the instance configuration information for the virtual instance through the terminal 20 in the configuration interface, and the cloud platform can confirm the instance specification and service of the virtual instance to be created by the tenant according to the instance configuration information.
  • Quality QoS requirements and create virtual instances for tenants that meet instance specifications and QoS requirements. Among them, the QoS requirement is used to indicate the quality of service required by the tenant for the virtual instance.
  • Cloud platforms can be implemented through software or hardware.
  • the cloud platform may be implemented by means of hardware such as physical servers.
  • the cloud platform can be implemented by a physical server, a physical server cluster composed of several physical servers, or a cloud computing service center.
  • the cloud platform may be implemented by software deployed on computing resources, where the software is used to implement the virtual instance setting method provided by the embodiment of the present application.
  • a cloud platform can be implemented by virtual machines or containers simulated by software on basic resources.
  • the cloud platform can be implemented by independently deployed resources, or can be implemented by distributed deployed resources.
  • the software for implementing the cloud platform can be independently deployed on servers, virtual machines or containers in the cloud platform, or the software for implementing the cloud platform can be distributed on multiple servers in the cloud platform, Alternatively, the software for implementing the cloud platform may be deployed on multiple virtual machines in the cloud platform in a distributed manner, or the software for implementing the cloud platform may be distributed in multiple containers in the cloud platform, and then Alternatively, the software used to implement the cloud platform can be distributed in multiple servers, multiple virtual machines, and multiple containers in the cloud platform.
  • the terminal 20 may be a desktop computer, a laptop computer, a mobile phone, a smart phone, a tablet computer, a multimedia player, a smart home appliance, an artificial intelligence device, a smart wearable device, an e-reader, a smart vehicle-mounted device, or an Internet of Things device.
  • the implementation process of the virtual instance setting method may include the following steps:
  • Step 201 The cloud platform provides a configuration interface for the tenant to input instance configuration information.
  • the instance configuration information is used to indicate the instance specification and QoS requirement of the virtual instance, wherein the QoS requirement is used to indicate the QoS required by the tenant for the virtual instance.
  • Instance specifications include the specifications of various resources required by the virtual instance.
  • the resources required by the virtual instance include one or more of the following: computing resources, network resources, and storage resources.
  • the computing resources include processor cores and/or memory.
  • Network resources include network bandwidth, packets per second (PPS), and/or the total number of links between a virtual instance and other virtual instances.
  • Storage resources include storage bandwidth and/or the number of read/write operations performed per second (input/output operation per second, IOPS).
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements of various resources required by the virtual instance.
  • the QoS requirements include one or more of the following: basic QoS requirements for computing resources, upper QoS requirements for computing resources, basic QoS requirements for network resources, upper QoS requirements for network resources, basic QoS requirements for storage resources, and QoS requirements for storage resources Upper limit QoS requirement.
  • Basic QoS requirements for computing resources When a virtual instance is configured with computing resources indicated by the instance specification, the minimum QoS requirements that the virtual instance can meet for the usage of computing resources.
  • the upper limit QoS requirement of computing performance is used to indicate the highest QoS requirement that the virtual instance can meet for the usage of computing resources when the virtual instance is configured with computing resources indicated by the instance specification.
  • Basic QoS requirements for network resources When the virtual instance is configured with network resources indicated by the instance specification, the minimum QoS requirements that the virtual instance can meet for the usage of network resources.
  • the upper limit QoS requirement of network transmission performance is used to indicate the highest QoS requirement that the virtual instance can meet for the usage of network resources when the virtual instance is configured with the network resources indicated by the instance specification.
  • the minimum QoS requirements that the virtual instance can meet for the usage of storage resources When a virtual instance is configured with the storage resources indicated by the instance specification, the minimum QoS requirements that the virtual instance can meet for the usage of storage resources.
  • the upper limit of storage performance QoS requirements When the virtual instance is configured with the storage resources indicated by the instance specification, the virtual instance can meet the highest QoS requirements for the usage of storage resources.
  • the usage of resources can be represented by the usage rate of resources by virtual instances.
  • the configuration interface provided by the cloud platform may include: the cloud platform provides a configuration interface for tenants to input the specified instance specifications, and the cloud platform provides a configuration interface for tenants to input the specified QoS requirements configuration interface.
  • the cloud platform may provide a configuration interface in various ways.
  • the cloud platform may provide a configuration interface through an application programming interface (API), an interaction template, and a configuration interface.
  • API application programming interface
  • the interaction template is a template provided by the cloud platform to the tenant for implementing different functions.
  • the tenant can download a template for implementing the function, add the relevant information of the tenant to the template, and then feed back the template with the relevant information of the tenant added to the cloud platform.
  • the cloud platform After receiving the template to which the relevant information of the tenant is added, the function to be implemented by the template can be obtained, and the function can be customized according to the information of the tenant.
  • the configuration interface refers to a tenant that can operate in the configuration interface to indicate the functions that the tenant needs to implement.
  • the cloud platform provides a configuration interface for tenants to input and indicate instance specifications
  • the cloud platform provides a configuration interface for tenants to input and indicate QoS requirements, which can be displayed through two-level pages.
  • the primary page is used to provide a configuration interface for tenants to input and indicate instance specifications
  • the secondary page is used to provide a configuration interface for tenants to input and indicate QoS requirements.
  • the secondary page is displayed after the tenant selects the instance type on the primary page, and the secondary page displays the QoS requirements corresponding to the instance type selected on the primary page.
  • the instance specification can be bound to the basic QoS capability and upper QoS capability, and the basic QoS capability and upper QoS capability corresponding to each instance specification can float within a certain range, that is, when the user selects an instance specification, the selection range of the basic QoS requirements and the selection range of the upper limit QoS requirements of the resources required by the virtual instance are determined. Therefore, the cloud platform provides a configuration interface for tenants to input and indicate QoS requirements, including: a selection range of basic QoS requirements for providing various resources required by virtual instances and a selection range for providing upper limit QoS requirements for various resources required by virtual instances.
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements of computing resources
  • provide a configuration interface for setting QoS requirements including: providing the selection range of basic QoS requirements for computing resources and providing upper limit QoS requirements for computing resources Choose a range.
  • the QoS requirements include: the basic QoS requirements and the upper limit QoS requirements of network resources
  • a configuration interface for setting QoS requirements is provided, including: providing the selection range of the basic QoS requirements of network resources and the selection scope of providing the upper limit QoS requirements of network resources.
  • a configuration interface for setting QoS requirements including: providing the selection range of basic QoS requirements of storage resources and the selection range of providing upper limit QoS requirements of storage resources.
  • FIG. 3 is a schematic diagram of selecting an instance specification in the primary page
  • FIG. 4 is a secondary page when the tenant has selected the instance specification of 4 virtual processors and 8GB memory capacity in FIG. 3
  • the instance specifications entered by the tenant include: 4 virtual processors and a memory capacity of 8 gigabits (GB).
  • tenants can also select the name of the virtual instance and the model of the processor it needs through the configuration interface. As shown in Figure 3, the name of the virtual instance selected by the tenant through the configuration interface is "T7.xlarge".
  • the selection ranges of the basic QoS capability and the upper limit QoS capability corresponding to the instance specifications are: the basic CPU performance is the utilization rate of 4 virtual processors, the selection range is [5%, 100%], the maximum CPU performance The selection range is [5%, 100%] for the utilization of 4 virtual processors, the selection range for the base network bandwidth is [1 gigabyte per second (GB/S), 5GB/S], the selection for the maximum network bandwidth The range is [3GB/S, 11GB/S], the selection range of basic PPS is [200,000 (W), 60W], the selection range of maximum PPS is [40W, 90W], and the selection range of basic IOPS is [20W, 60W] ], the maximum IOPS selection range is [40W, 90W], the basic storage bandwidth selection range is [20W, 60W], and the maximum storage bandwidth selection range is [40W, 90W].
  • the value can be selected in the selection range by dragging the drag bar in Figure 4, or, through the figure
  • the plus and minus buttons in 4 adjust the value to indicate the virtual instance's basic QoS requirements and upper limit QoS requirements for resources through the values selected by the tenant.
  • Step 202 The cloud platform obtains the instance configuration information input by the tenant to confirm the instance specification and QoS requirements of the virtual instance that the tenant needs to create.
  • the cloud platform can determine the instance specification and service of the virtual instance that the tenant needs to create according to the tenant's selection. Quality QoS requirements.
  • obtaining the basic QoS requirements of computing resources of virtual instances that the tenant needs to create includes: according to the basic QoS requirements of computing resources by the tenant The value selected in the required selection range confirms the basic QoS requirements of computing resources; obtains the upper limit QoS requirements of computing resources of the virtual instance that the tenant needs to create, including: according to the value selected by the tenant in the selection range of the upper limit QoS requirements of computing resources , to confirm the upper limit QoS requirements of computing resources.
  • the QoS requirements include: the basic QoS requirements and the upper limit QoS requirements of network resources
  • obtain the basic QoS requirements of the network resources of the virtual instance that the tenant needs to create including: according to the value selected by the tenant in the selection range of the basic QoS requirements of network resources , confirm the basic QoS requirements of network resources; obtain the upper limit QoS requirements of network resources of the virtual instance that the tenant needs to create, including: confirming the upper limit QoS requirements of network resources according to the value selected by the tenant in the selection range of the upper limit QoS requirements of network resources .
  • the QoS requirements include: the basic QoS requirements and the upper limit QoS requirements of storage resources
  • obtain the basic QoS requirements of the storage resources of the virtual instance that the tenant needs to create including: according to the value selected by the tenant in the selection range of the basic QoS requirements of the storage resources , confirm the basic QoS requirements of the storage resources; obtain the upper limit QoS requirements of the storage resources of the virtual instances that the tenant needs to create, including: confirming the upper limit QoS requirements of the storage resources according to the value selected by the tenant in the selection range of the upper limit QoS requirements of the storage resources .
  • the value selected by the tenant in the selection range of utilization of basic CPU performance is 5%
  • the value selected in the selection range of utilization of maximum CPU performance is 5%
  • the selection range of basic network bandwidth is 5%.
  • the value selected in the selection range is 1GB/S
  • the value selected in the selection range of the maximum network bandwidth is 3GB/S
  • the value selected in the selection range of the basic PPS is 20W
  • the value selected in the selection range of the maximum PPS is 40W
  • the value selected in the selection range of basic IOPS is 20W
  • the value selected in the selection range of maximum IOPS is 40W
  • the value selected in the selection range of basic storage bandwidth is 20W
  • the value selected in the selection range of maximum storage bandwidth is 20W.
  • the value chosen is 40W.
  • the "concentric circle" icon in Fig. 4 is used to identify the value selected by the tenant in the selection range.
  • the QoS requirements of the virtual instance that the tenant needs to create include: the basic QoS requirement for computing resources is 4 virtual processors.
  • the utilization rate is 5%
  • the upper limit QoS of computing resources is required to be 5% for the utilization rate of 4 virtual processors
  • the basic network bandwidth of the network resources is 1GB/S
  • the maximum network bandwidth is 3GB/S
  • the basic PPS is 20W
  • the maximum network bandwidth is 20W.
  • the PPS is 40W
  • the basic IOPS in the storage resource is 20W
  • the maximum IOPS is 40W
  • the basic storage bandwidth is 20W
  • the maximum storage bandwidth is 40W.
  • Step 203 The cloud platform determines the selling price of the virtual instance according to the instance specification and QoS requirements.
  • the cloud platform can determine the selling price of virtual instances based on the instance specifications and QoS requirements.
  • the tenant can input the instance specification and QoS requirements of the virtual instance to be created according to their application requirements.
  • the instance specification and QoS requirements can represent the tenant's real demand for cloud computing resources.
  • on-demand billing of cloud computing resources can be implemented.
  • tenants can also input their desired payment method through the configuration interface. As shown in Figure 3, when the tenant enters the expectation to pay on demand through the configuration interface, the cloud platform determines the selling price of the virtual instance according to the instance specification and QoS requirements.
  • the selling price of the virtual instance is positively correlated with the QoS requirement of the virtual instance in addition to the instance specification.
  • the selling price of the virtual instance will change accordingly.
  • the relationship between the selling price of virtual instances, instance specifications and QoS requirements can satisfy the following formula:
  • P(total) is the selling price of the virtual instance
  • P(Base) is the basic price baseline of the instance specification
  • S (basic cpu performance) is the price coefficient of the basic cpu performance
  • C(base) is the basic cpu performance selected by the tenant
  • S (maximum cpu performance) is the price coefficient of the maximum cpu performance
  • C (max) is the maximum cpu performance selected by the tenant
  • S (basic network bandwidth) is the price coefficient of the basic network bandwidth
  • B (basic network bandwidth) is the tenant's choice basic network bandwidth
  • S (maximum network bandwidth) is the price coefficient of the maximum network bandwidth
  • B (maximum network bandwidth) is the maximum network bandwidth selected by the tenant
  • S (basic PPS) is the price coefficient of the basic PPS
  • P (basic PPS) The basic PPS selected for the tenant
  • S(Max PPS) is the price coefficient of the maximum PPS
  • P(Max PPS) is the maximum PPS selected by the tenant
  • the tenant can define the instance specifications and QoS requirements of the virtual instance created by Xu according to the actual needs, and when the sales price of the virtual instance is determined according to the actual demand, on the one hand, it can realize the on-demand purchase of cloud resources, On the other hand, it can reduce the cost of using cloud resources for tenants.
  • the basic network bandwidth of the cloud vendor's fixed configuration is 1Gbps for the combination of 2 virtual processors and 4GB of memory (that is, 2u4g)
  • the tenant needs to use the basic network bandwidth of 2Gbps, in the related art, the tenant needs to purchase 4 A virtual machine with a combination of a virtual processor and 8GB of memory (that is, 4U8G) costs twice the cost of 2u4g.
  • the virtual instance setting method provided in the embodiment of the present application when the tenant needs to use the basic network bandwidth of 2 Gbps, it only needs to increase the basic network bandwidth on the basis of 2u4g, so that the cost borne by the tenant is 2u4g 1.5 times the cost, as shown in Figure 4, the selling price of the virtual instance is 547 yuan/month. It can be seen that, by using the virtual instance setting method provided by the embodiment of the present application, on-demand purchase of cloud resources can be realized, and the cost of using cloud resources by a tenant can be effectively reduced.
  • Step 204 The cloud platform obtains the instance creation instruction input by the tenant according to the selling price.
  • the configuration interface of the instance configuration information is further provided with an icon for instructing to create an instance, and when the tenant clicks the icon, an instance creation instruction can be triggered.
  • the "create" button is set in Figure 4.
  • the cloud platform can obtain the instance creation instruction.
  • Step 205 The cloud platform creates a virtual instance that meets the instance specification and QoS requirements according to the instance creation instruction.
  • the implementation process of this step 205 includes:
  • Step 2051 The cloud platform selects a first physical server from a plurality of physical servers in the cloud data center, and the idle hardware resources of the first physical server can provide instance specifications and meet QoS requirements.
  • the cloud platform After the cloud platform obtains the instance specifications and QoS requirements of the virtual instance, it can select the first physical server among multiple physical servers in the cloud data center according to the instance specifications and QoS requirements, so as to create a tenant on the first physical server.
  • the virtual instance to be created.
  • the first physical server In order to ensure the QoS capability of the created virtual instance, it is necessary to ensure that the idle hardware resources of the first physical server can provide the instance specifications required by the virtual instance and meet the QoS requirements of the virtual instance.
  • the first physical server at least satisfies the following conditions:
  • Condition 1 Any hardware resource of the first physical server can simultaneously satisfy the basic QoS requirements of all created virtual instances and the basic QoS requirements of the virtual instance to be created on the first physical server.
  • Condition 2 For any hardware resource of the first physical server, the sum of the upper limit QoS requirements of all created virtual instances on the first physical server and the upper limit QoS requirements of the virtual instance to be created is less than or equal to that on other alternative physical servers. The sum of the upper limit QoS requirement of the created virtual instance and the upper limit QoS requirement of the virtual instance to be created.
  • the physical server can meet the basic performance requirements of the basic QoS requirements of the virtual instance created on the physical server and the basic QoS requirements of the virtual instance to be created at the same time
  • the required basic performance the sum of the basic performance required by the basic QoS requirements of the virtual instance created on the physical server and the basic performance required by the basic QoS requirements of the virtual instance to be created will not exceed this
  • the sum of the basic network bandwidth required by the basic QoS requirements of the virtual instance created on the physical server and the basic network bandwidth required by the basic QoS requirements of the virtual instance does not exceed the maximum physical network bandwidth of the physical server.
  • the sum of the basic computing performance required by the basic QoS requirements of the created virtual instance and the basic computing performance required by the basic QoS requirements of the virtual instance does not exceed the sum of the maximum computing performance that can be provided by all processors on the physical server.
  • the physical server is determined as an alternate physical server.
  • the physical server can ensure the basic performance of all virtual instances on the physical server, and ensure the service level agreement (service level) of the virtual instances. agreement, SLA).
  • condition 2 for the performance provided by any hardware resource, when a physical server is selected from the multiple candidate physical servers that satisfy condition 1, it is necessary to obtain the upper limit QoS requirement of the virtual instance to be created and the alternative physical server respectively.
  • the sum of the maximum performance required by the upper limit QoS requirements of all created virtual instances on the server, and the candidate physical server corresponding to the minimum upper limit QoS requirements is determined as the first physical server.
  • the upper limit QoS requirements of the multiple performances required by the QoS requirements of the virtual instance to be created and the performance requirements of the various candidate physical servers can be calculated respectively.
  • the sum (or the average of the sums) of the upper limit QoS requirements of multiple performances required by the QoS requirements of all created virtual instances, and then the candidate physical server corresponding to the minimum sum (or the average of the sums) is determined as the first physical server server.
  • the load balance of the physical servers can be achieved on the premise of ensuring the basic performance, the probability of competing for resources on each physical server can be controlled to be as even as possible, and the physical server can be reduced as much as possible.
  • the probability of competing for resources between virtual instances in the cloud so that each virtual instance has the highest possible probability to meet the upper limit QoS requirements, which can ensure the full utilization of cloud computing environment resources and improve the utilization of cluster resources.
  • Step 2052 The cloud platform creates a virtual instance on the first physical server, wherein predetermined hardware resources in the idle hardware resources of the first physical server are allocated to the virtual instance, and the predetermined hardware resources meet the instance specifications and QoS requirements.
  • the virtual instance can be created on the first physical server according to the instance specification and QoS requirements of the virtual instance to be created.
  • a predetermined hardware resource that meets the instance specifications and QoS requirements may be determined from the idle hardware resources of the first physical server, and then the predetermined hardware resource is allocated to the virtual instance to complete the virtual instance creation.
  • the creation of the virtual instance in the first physical server may be implemented by a virtual machine manager in the first physical server.
  • a cloud platform and cloud resources are deployed in the cloud data center, and the cloud resources include multiple physical servers.
  • the cloud platform is used to obtain the resource usage of multiple physical servers in cloud resources according to the instance specifications and QoS requirements entered by the tenant, determine the sum of the QoS requirements of each physical server according to the resource usage of each physical server, and calculate The sum of the instance specifications and QoS requirements input by the tenant, determine the physical server that satisfies the two conditions proposed in the above step 2051 among the multiple physical servers, determine the physical server that satisfies the above two conditions as the first physical server, and instruct the physical server to
  • the virtual machine manager in the first physical server creates a virtual instance by using the resources in the hardware layer of the first physical server according to the instance specification and QoS requirements input by the tenant.
  • the virtual machine manager runs in the operating system of the physical server, and the resources in the hardware layer include computing resources, network resources, and storage resources.
  • the height of the black filling pattern in the box in Figure 6 represents the sum of the basic QoS requirements allocated to the created instance in the resources indicated by the box.
  • the basic QoS requirements of the computing resources of the physical server 2 are The sum, the sum of basic QoS requirements of storage resources and the sum of basic QoS requirements of network resources are all smaller than the corresponding sum of physical server 1. Therefore, physical server 2 is determined as the first physical server.
  • Step 206 The cloud platform migrates the virtual instance when the virtual instance meets the migration conditions.
  • step 206 includes:
  • Step 2061 The cloud platform selects a second physical server from a plurality of physical servers in the cloud data center.
  • the cloud platform can select a second physical server from the multiple physical servers in the palm of the Transportation Bureau according to the instance specifications and QoS requirements of the virtual instance, so as to facilitate the migration of the virtual instance to the second physical server.
  • the idle hardware resources of the second physical server can provide the instance specification of the virtual instance and satisfy its QoS requirements.
  • the migration condition may be obtained by being triggered by a tenant, or obtained by detection by a cloud platform.
  • This embodiment of the present application uses the following two implementation manners as examples to describe them:
  • the tenant may further adjust the QoS requirements of the virtual instance according to business requirements. For example, increase the QoS requirements of virtual instances according to business requirements, so that virtual instances can cope with higher loads, or lower the QoS requirements of virtual instances according to business requirements, so as to reduce the use of cloud by tenants on the premise of meeting business requirements cost of resources.
  • the virtual instance setting method provided by the embodiment of the present application further includes: the cloud platform obtains the update QoS requirement input by the tenant, wherein the update QoS requirement is used to indicate the update quality of service required by the tenant for the virtual instance.
  • the configuration interface receives the updated QoS requirement, it means that the tenant has updated the QoS requirement of the virtual instance, and the physical server selected when creating the virtual instance may not meet the updated QoS requirement, so the virtual instance needs to be migrated.
  • the virtual instance can be migrated to the physical server M.
  • the virtual instance After the virtual instance is created, by updating the QoS requirements of the virtual instance according to the business requirements, and migrating the virtual instance according to the updated QoS requirements, resources can be allocated to the virtual instances according to the business requirements, making full use of the resources of the physical server, and saving tenants from using the cloud. cost of resources.
  • the cloud platform may also provide the tenant with the first option and/or the second option.
  • the first option is used to instruct the tenant to choose to restart the virtual instance when the QoS is updated, that is, to migrate the virtual instance by cold migration.
  • the second option is used to instruct the tenant to choose not to restart the virtual instance when QoS is updated, that is, to migrate the virtual instance by means of live migration.
  • the second option and the first option cannot be selected at the same time.
  • the virtual instance setting method provided by the embodiment of the present application further includes: receiving the tenant's selection of the first option and/or the second option, and migrating the virtual instance from the first physical server to the second physical server according to the tenant's selection.
  • the cloud platform may stop running the virtual instance on the first physical server and migrate the virtual instance from the first physical server to the second physical server if the tenant chooses to restart the virtual instance when the QoS is updated. physical server, and run the virtual instance on the second physical server.
  • the cloud platform online migrates the virtual instance from the first physical server to the second physical server if the tenant chooses not to restart the virtual instance when updating the QoS.
  • the tenant when the tenant inputs QoS requirements through the configuration interface, the tenant can also select the first option of "adjust parameter restart".
  • the cloud platform adopts the cold migration method to perform virtual Instance migration.
  • a default migration method is set in the cloud platform, and when the tenant does not indicate the migration method, the default migration method can be used to migrate the virtual instance to the second physical server.
  • a scheduling system and a secondary scheduling system are deployed in the cloud platform.
  • the scheduling system is used to select the first physical machine when creating a virtual instance, and the secondary scheduling system selects the second physical machine when the virtual instance needs to be migrated.
  • the cloud platform can monitor the usage of hardware resources on the physical server, and determine whether to migrate the virtual instance according to the usage.
  • the migration condition includes: the utilization rate of any hardware resource on the physical server running the virtual instance reaches a reference threshold within a specified time period. When the utilization rate of the hardware resource reaches the reference threshold within the specified time period, it means that the virtual instance competes for the hardware resource.
  • virtual instance 0 and virtual instance 5 are deployed in physical server 1
  • virtual instance 3 is deployed in physical server 2
  • both physical server 1 and physical server 2 are provided with local agents
  • the local agent It is used to monitor the usage of hardware resources on the physical server where it is located, determine the load and resource utilization of the physical server according to the usage, and determine whether the hardware resources of the physical server have resource contention according to the load and resource utilization.
  • the load of physical server 1 is 90% and resource contention occurs, and the load of physical server 2 is 20% and there is no resource contention, it can be considered to migrate virtual instance 0 to physical server 2.
  • the physical server detects resource contention for its hardware resources, by migrating some virtual instances deployed on the physical server to other physical servers, the resource contention on the physical server can be eliminated and the cloud can be guaranteed as much as possible.
  • the load balancing of multiple physical servers managed by the platform enables the resources on each physical server to be fully utilized, and tries to ensure that the upper limit QoS requirements of virtual instances can be met.
  • resource contention occurs during the running of the virtual instance, when resource contention occurs, the virtual instance is usually migrated in a hot migration way, so as to reduce the risk of service interruption of the services provided by the virtual instance.
  • Step 2062 the cloud platform migrates the virtual instance from the first physical server to the second physical server.
  • the cloud platform can migrate the virtual instance to the second physical server. Moreover, when the tenant does not select the migration method, the cloud platform migrates the virtual instance to the second physical server according to the default migration method. When the user selects the migration method, the cloud platform uses the migration method indicated by the tenant to migrate the virtual instance to the second physical server.
  • Step 207 the cloud platform deducts fees from the account of the tenant logging in to the cloud platform according to the selling price of the virtual instance.
  • the cloud platform can deduct fees from the tenant's account that logs in to the cloud platform according to the selling price of the virtual instance that the tenant needs to create.
  • the deduction method of the cloud platform can be set according to application requirements.
  • the cloud platform can deduct fees according to the selling price after the virtual instance is created.
  • the fee is deducted according to the selling price, which is not specifically limited in the embodiment of the present application.
  • an embodiment of the present application provides a method for setting a virtual instance, by obtaining the instance configuration information input by the tenant to confirm the instance specification and service quality QoS requirements of the virtual instance that the tenant needs to create, and determine according to the instance specification and QoS requirements
  • the selling price of the virtual instance obtain the instance creation instruction entered by the tenant according to the selling price to create a virtual instance that meets the instance specifications and QoS requirements, so that the virtual instance can be created according to the instance specifications and QoS requirements entered by the tenant, so that the created virtual instance can be more efficient.
  • the embodiment of the present application also provides an apparatus for setting a virtual instance.
  • the virtual instance setting apparatus 100 includes:
  • the obtaining module 1001 is configured to obtain the instance configuration information input by the tenant to confirm the instance specification and QoS requirement of the virtual instance to be created by the tenant, wherein the QoS requirement is used to indicate the QoS required by the tenant for the virtual instance. In an implementation manner, the obtaining module 1001 can be used to perform the above step 202 .
  • the determining module 1002 is configured to determine the selling price of the virtual instance according to the instance specification and QoS requirements. In an implementation manner, the determining module 1002 can be used to perform the above step 203 .
  • the creation module 1003 is configured to obtain an instance creation instruction input by the tenant according to the selling price to create a virtual instance that meets the instance specification and QoS requirements. In an implementation manner, the creation module 1003 can be used to perform the above steps 204 and 205 .
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements for computing resources; the basic QoS requirements for computing resources When a virtual instance is configured with computing resources indicated by the instance specification, the virtual instance can achieve the lowest usage of computing resources.
  • QoS requirement; the upper limit QoS requirement of computing performance is used to indicate the highest QoS requirement that the virtual instance can meet for the usage of computing resources when the virtual instance is configured with computing resources indicated by the instance specification.
  • the virtual instance setting apparatus 100 further includes:
  • a providing module 1004 is used to provide a selection range of basic QoS requirements for computing resources.
  • the obtaining module 1001 is configured to confirm the basic QoS requirement of the computing resource according to the value selected by the tenant in the selection range of the basic QoS requirement of the computing resource.
  • a providing module 1004 is used to provide a selection range of the upper limit QoS requirement of computing resources.
  • the obtaining module 1001 is configured to confirm the upper limit QoS requirement of the computing resource according to the value selected by the tenant in the selection range of the upper limit QoS requirement of the computing resource.
  • the providing module 1004 can be used to perform the above step 201 .
  • the computing resources include processor cores and/or memory.
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements for network resources; basic QoS requirements for network resources When a virtual instance is configured with network resources indicated by the instance specification, the virtual instance can achieve the lowest usage of network resources.
  • QoS requirement; the upper limit QoS requirement of network transmission performance is used to indicate the highest QoS requirement that the virtual instance can meet for the usage of network resources when the virtual instance is configured with the network resources indicated by the instance specification.
  • a providing module 1004 is configured to provide a selection range of basic QoS requirements of network resources.
  • the obtaining module 1001 is configured to confirm the basic QoS requirement of the network resource according to the value selected by the tenant in the selection range of the basic QoS requirement of the network resource.
  • a providing module 1004 is configured to provide a selection range of the upper limit QoS requirement of the network resources.
  • the obtaining module 1001 is configured to confirm the upper limit QoS requirement of the network resource according to the value selected by the tenant in the selection range of the upper limit QoS requirement of the network resource.
  • the network resources include network bandwidth or the number of packets sent per second (PPS).
  • PPS packets sent per second
  • the QoS requirements include: basic QoS requirements and upper limit QoS requirements for storage resources; the basic QoS requirements for storage resources When the virtual instance is configured with the storage resources indicated by the instance specification, the virtual instance can achieve the lowest usage of the storage resources.
  • QoS requirement the upper limit QoS requirement of storage performance When the virtual instance is configured with the storage resources indicated by the instance specification, the highest QoS requirement that the virtual instance can meet for the usage of storage resources.
  • a providing module 1004 is configured to provide a selection range of basic QoS requirements for storage resources.
  • the obtaining module 1001 is configured to confirm the basic QoS requirement of the storage resource according to the value selected by the tenant in the selection range of the basic QoS requirement of the storage resource.
  • a providing module 1004 is used to provide a selection range of the upper limit QoS requirement of the storage resource.
  • the obtaining module 1001 is configured to confirm the upper limit QoS requirement of the storage resource according to the value selected by the tenant in the selection range of the upper limit QoS requirement of the storage resource.
  • the storage resources include storage bandwidth and/or IOPS of read/write operations per second.
  • the creation module 1003 is specifically configured to: select a first physical server from multiple physical servers in the cloud data center, and the idle hardware resources of the first physical server can provide instance specifications and meet QoS requirements;
  • the server creates a virtual instance, wherein predetermined hardware resources among the idle hardware resources of the first physical server are allocated to the virtual instance, and the predetermined hardware resources meet the instance specifications and QoS requirements.
  • the virtual instance setting apparatus 100 further includes:
  • the obtaining module 1001 is configured to obtain the updated QoS requirement input by the tenant, wherein the updated QoS requirement is used to indicate the updated quality of service required by the tenant for the virtual instance.
  • the migration module 1005 is configured to select a second physical server from a plurality of physical servers in the cloud data center, and the idle hardware resources of the second physical server can provide instance specifications and meet the update QoS requirements.
  • the migration module 1005 is configured to migrate the virtual instance from the first physical server to the second physical server.
  • the migration module 1005 can be used to perform the above-mentioned step 206 .
  • the providing module 1004 is configured to provide a first option, where the first option is used to instruct the tenant to choose to restart the virtual instance when the QoS is updated.
  • the migration module 1005 is specifically configured to stop running the virtual instance on the first physical server and migrate the virtual instance from the first physical server to the second physical server when the tenant chooses to restart the virtual instance when updating the QoS, And run the virtual instance on the second physical server.
  • the providing module 1004 is used to provide a second option, and the second option is used to instruct the tenant to choose not to restart the virtual instance when updating the QoS.
  • the migration module 1005 is specifically used for when the tenant chooses to update the QoS. The virtual instance is migrated online from the first physical server to the second physical server without restarting the virtual instance.
  • the virtual instance setting apparatus 100 further includes: an operation and maintenance module 1006 for deducting the account of the tenant logging into the cloud platform according to the selling price.
  • the operation and maintenance module 1006 can be used to perform the above step 207 .
  • the embodiment of the present application provides a virtual instance setting device, which obtains the instance configuration information input by the tenant through the acquisition module to confirm the instance specification and service quality QoS requirements of the virtual instance to be created by the tenant, and determines the module according to the instance specification.
  • the creation module obtains the instance creation instruction entered by the tenant according to the sales price to create a virtual instance that meets the instance specifications and QoS requirements, so that virtual instances can be created according to the instance specifications and QoS requirements entered by the tenant, so that The created virtual instance can reflect the real needs of the tenant in a finer-grained manner, so that the virtual instance created for the tenant according to the instance configuration information can better meet the needs of the tenant, realize the on-demand purchase of cloud resources, and reduce the use of cloud resources by the tenant. It also effectively improves the utilization of resources provided by cloud vendors, enabling cloud vendors to use limited cloud resources to serve more tenants.
  • the virtual instance QoS can be decoupled from the physical server, reducing the impact of subsequent physical server evolution, utilization and replacement on instance specifications and performance.
  • FIG. 12 exemplarily provides a possible architecture diagram of the cloud platform.
  • the cloud platform 120 may include a processor 1201 , a memory 1202 , a communication interface 1203 and a bus 1204 .
  • the number of processors 1201 may be one or more, and FIG. 12 only illustrates one of the processors 1201 .
  • the processor 1201 may be a central processing unit (Central Processing Unit, CPU). If the cloud platform has multiple processors 1201, the types of the multiple processors 1201 may be different, or may be the same. Optionally, multiple processors of the cloud platform may also be integrated into multi-core processors.
  • CPU Central Processing Unit
  • the memory 1202 stores computer instructions and data, and the memory 1202 may store computer instructions and data required to implement the virtual instance setting method provided by this application.
  • the memory 1202 may be any one or any combination of the following storage media: non-volatile memory (such as read-only memory (Read-Only Memory, ROM), solid state disk (Solid State Disk, SSD), hard disk (Hard Disk) Drive, HDD), optical disc, etc., volatile memory.
  • non-volatile memory such as read-only memory (Read-Only Memory, ROM), solid state disk (Solid State Disk, SSD), hard disk (Hard Disk) Drive, HDD), optical disc, etc., volatile memory.
  • the communication interface 1203 may be any one or any combination of the following devices: a network interface (eg, an Ethernet interface), a wireless network card, and other devices with a network access function.
  • the communication interface 1203 is used for data communication between the cloud platform and other nodes or other cloud platforms.
  • FIG. 12 also exemplarily depicts bus 1204 .
  • the bus 1204 can connect the processor 1201 with the memory 1202 and the communication interface 1203 .
  • the processor 1201 can access the memory 1202, and can also use the communication interface 1203 to perform data interaction with other nodes or other cloud platforms.
  • the cloud platform executes the computer instructions in the memory 1202 to implement the virtual instance setting method provided in this application. For example, obtain the instance configuration information entered by the tenant to confirm the instance specification and QoS requirements of the virtual instance that the tenant needs to create, where the QoS requirement is used to indicate the quality of service required by the tenant for the virtual instance; determine the virtual instance according to the instance specification and QoS requirements The selling price of the instance; obtains the instance creation instruction entered by the tenant according to the selling price to create a virtual instance that meets the instance specifications and QoS requirements.
  • the cloud platform executes the steps of the virtual instance setting method provided by the present application by executing the computer instructions in the memory 1202, and may refer to the corresponding description in the above method embodiments.
  • Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium is a non-volatile computer-readable storage medium, and the computer-readable storage medium includes program instructions, and when the program instructions are executed on a computer device At the time, the computer device is made to execute the virtual instance setting method provided by the embodiment of the present application.
  • the computer-readable storage medium is a non-volatile computer-readable storage medium
  • the computer-readable storage medium includes program instructions, and when the program instructions are executed on a computer device At the time, the computer device is made to execute the virtual instance setting method provided by the embodiment of the present application.
  • the embodiments of the present application further provide a computer program product including instructions, when the computer program product runs on a computer, the computer program product enables the computer to execute the virtual instance setting method provided by the embodiments of the present application.
  • the terms “first”, “second” and “third” are only used for description purposes, and cannot be understood as indicating or implying relative importance.
  • the term “at least one” refers to one or more, and the term “plurality” refers to two or more, unless expressly limited otherwise.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Mathematical Physics (AREA)
  • Stored Programmes (AREA)

Abstract

本申请公开了一种虚拟实例设置方法及装置、云平台、存储介质,属于云计算技术领域。该方法包括:获取租户输入的实例配置信息以确认租户需创建的虚拟实例的实例规格和服务质量Qos要求,其中Qos要求用于指示租户对虚拟实例所要求的服务质量;根据实例规格和Qos要求确定虚拟实例的售卖价格;获取租户根据售卖价格输入的实例创建指令以创建满足实例规格和Qos要求的虚拟实例。本申请能够实现对云资源的按需购买,降低租户使用云资源的成本,且有效地提高了云厂商提供的资源的利用率。

Description

虚拟实例设置方法及装置 技术领域
本申请涉及云计算(cloud computing)技术领域,特别涉及一种虚拟实例设置方法及装置、云平台。
背景技术
云计算因其具有弹性伸缩、灵活部署、高可靠、高安全和高性价比的特点,获得了越来越多的企业青睐,其生态结构也在不断的扩展和丰富当中。
例如,虚拟实例是云厂商提供的一种主流产品。各个云厂商推出的虚拟实例通常都具有实例规格,实例规格包括计算资源、网络资源和存储资源,计算资源例如为处理器核、内存资源,网络资源例如为带宽资源,存储资源例如为存储带宽,每个实例规格对应的服务质量(quality of service,QoS)是由云厂商固定设置好的,只要租户选择特定实例规格来创建虚拟实例,则特定实例规格对应的QoS就是该虚拟实例的QoS。
现有技术中,QoS与实例规格绑定,租户在选择实例规格创建虚拟实例后,虚拟实例的QoS不可更改,一些情况下,租户在选择特定实例规格创建虚拟实例后,所创建的虚拟实例的QoS会无法较好地满足租户需求,导致云厂商提供的资源的利用率较差。
发明内容
本申请提供了一种虚拟实例设置方法及装置、云平台、存储介质。本申请能够实现虚拟实例的按需创建。本申请提供的技术方案如下:
第一方面,本申请提供了一种虚拟实例设置方法,该方法应用于云平台,该方法包括:获取租户输入的实例配置信息以确认租户需创建的虚拟实例的实例规格和服务质量Qos要求,其中Qos要求用于指示租户对虚拟实例所要求的服务质量;根据实例规格和Qos要求确定虚拟实例的售卖价格;获取租户根据售卖价格输入的实例创建指令以创建满足实例规格和Qos要求的虚拟实例。
通过获取租户输入的实例配置信息以确认租户需创建的虚拟实例的实例规格和服务质量Qos要求,根据实例规格和Qos要求确定虚拟实例的售卖价格,获取租户根据售卖价格输入的实例创建指令以创建满足实例规格和Qos要求的虚拟实例,从而能够根据租户输入的实例规格和Qos要求创建虚拟实例,使得创建的虚拟实例能够更细粒度地反映租户的真实需求,使得根据实例配置信息为租户的创建虚拟实例能够较好的满足租户的需求,能够实现对云资源的按需购买,降低租户使用云资源的成本,且有效地提高了云厂商提供的资源的利用率,使得云厂商能够利用有限的云资源为更多的 租户服务。并且,通过根据实例规格和服务质量Qos要求创建虚拟实例,能够实现虚拟实例Qos与物理服务器的解耦,减小了后续物理服务器的演进、利旧和替换对实例规格和性能造成的影响。
在一种可实现方式中,Qos要求包括:计算资源的基础Qos要求和上限Qos要求;计算资源的基础Qos要求为虚拟实例配置有实例规格指示的计算资源时,虚拟实例针对计算资源的使用情况能够达到的最低Qos要求;计算性能的上限Qos要求用于指示虚拟实例配置有实例规格指示的计算资源时,虚拟实例针对计算资源的使用情况能够达到的最高Qos要求。
可选的,该方法还包括:提供计算资源的基础Qos要求的选择范围;根据租户在计算资源的基础Qos要求的选择范围中选择的数值确认计算资源的基础Qos要求;提供计算资源的上限Qos要求的选择范围;根据租户在计算资源的上限Qos要求的选择范围中选择的数值确认计算资源的上限Qos要求。
可选的,计算资源包括处理器核和/或内存。
在一种可实现方式中,Qos要求包括:网络资源的基础Qos要求和上限Qos要求;网络资源的基础Qos要求为虚拟实例配置有实例规格指示的网络资源时,虚拟实例针对网络资源的使用情况能够达到的最低Qos要求;网络传输性能的上限Qos要求用于指示虚拟实例配置有实例规格指示的网络资源时,虚拟实例针对网络资源的使用情况能够达到的最高Qos要求。
可选的,该方法还包括:提供网络资源的基础Qos要求的选择范围;根据租户在网络资源的基础Qos要求的选择范围中选择的数值确认网络资源的基础Qos要求;提供网络资源的上限Qos要求的选择范围;根据租户在网络资源的上限Qos要求的选择范围中选择的数值确认网络资源的上限Qos要求。
可选的,网络资源包括网络带宽或每秒发包数量PPS。
在一种可实现方式中,Qos要求包括:存储资源的基础Qos要求和上限Qos要求;存储资源的基础Qos要求为虚拟实例配置有实例规格指示的存储资源时,虚拟实例针对存储资源的使用情况能够达到的最低Qos要求;存储性能的上限Qos要求为虚拟实例配置有实例规格指示的存储资源时,虚拟实例针对存储资源的使用情况能够达到的最高Qos要求。
可选的,该方法还包括:提供存储资源的基础Qos要求的选择范围;根据租户在存储资源的基础Qos要求的选择范围中选择的数值确认存储资源的基础Qos要求;提供存储资源的上限Qos要求的选择范围;根据租户在存储资源的上限Qos要求的选择范围中选择的数值确认存储资源的上限Qos要求。
可选的,存储资源包括存储带宽和/或每秒执行读/写操作次数IOPS。
其中,获取租户根据售卖价格输入的实例创建指令以创建满足实例规格和Qos要求的虚拟实例,包括:从云数据中心中的多个物理服务器中选择第一物理服务器,第一物理服务器的空闲硬件资源可提供实例规格并满足Qos要求;在第一物理服务器创建虚拟实例,其中第一物理服务器的空闲硬件资源中的预定硬件资源被分配至虚拟实例,预定硬件资源满足实例规格和Qos要求。
在一种可实现方式中,第一物理服务器至少满足以下条件:条件一:第一物理服 务器的任一硬件资源能够同时满足第一物理服务器上所有已创建虚拟实例的基础Qos要求和待创建的虚拟实例的基础Qos要求。条件二:对于第一物理服务器的任一硬件资源,第一物理服务器上所有已创建虚拟实例的上限Qos要求与待创建的虚拟实例的上限Qos要求之和,小于或等于其他备选物理服务器上已创建虚拟实例的上限Qos要求与待创建的虚拟实例的上限Qos要求的和。
通过根据该条件一选择物理服务器,能够保证物理服务器上所有虚拟实例在出现资源争抢时,物理服务器能够保证该物理服务器上的所有虚拟实例的基础性能,保证虚拟实例的服务等级协议。
通过根据该条件二选择第一物理服务器,能够在保证基础性能的前提下,实现物理服务器的负载均衡,能够控制每个物理服务器上争抢资源的概率尽量平均化,尽可能地减小物理服务器中虚拟实例之间争抢资源的概率,使得每个虚拟实例都有尽可能高地概率达到上限Qos要求,能够保证云计算环境资源的充分利用,提升集群资源利用率。
可选的,该方法还包括:获取租户输入的更新Qos要求,其中更新Qos要求用于指示租户对虚拟实例所要求的更新服务质量;从云数据中心中的多个物理服务器中选择第二物理服务器,第二物理服务器的空闲硬件资源可提供实例规格并满足更新Qos要求;将虚拟实例从第一物理服务器迁移到第二物理服务器。
在完成虚拟实例创建后,通过根据业务需求更新虚拟实例的Qos要求,并根据更新Qos要求对虚拟实例进行迁移,能够按照业务需求为虚拟实例分配资源,充分利用物理服务器的资源,节省租户使用云资源的成本。
在一种可实现方式中,该方法还包括:提供第一选项,第一选项用于指示租户选择在更新Qos时虚拟实例进行重启;在租户选择在更新Qos时虚拟实例进行重启的情况下,停止在第一物理服务器运行虚拟实例,将虚拟实例从第一物理服务器迁移到第二物理服务器,并在第二物理服务器运行虚拟实例。
在另一种可实现方式中,该方法还包括:提供第二选项,第二选项用于指示租户选择在更新Qos时虚拟实例不进行重启;在租户选择在更新Qos时虚拟实例进行不重启的情况下,将虚拟实例从第一物理服务器在线迁移到第二物理服务器。
可选的,该方法还包括:根据售卖价格对租户的登录到云平台的账号进行扣费。例如,云平台可以在虚拟实例被创建后,根据售卖价格进行扣费。或者,在请求创建虚拟实例时,按照售卖价格进行与扣费。
第二方面,本申请提供了一种虚拟实例设置装置,该装置包括:获取模块,用于获取租户输入的实例配置信息以确认租户需创建的虚拟实例的实例规格和服务质量Qos要求,其中Qos要求用于指示租户对虚拟实例所要求的服务质量;确定模块,用于根据实例规格和Qos要求确定虚拟实例的售卖价格;创建模块,用于获取租户根据售卖价格输入的实例创建指令以创建满足实例规格和Qos要求的虚拟实例。
可选的,Qos要求包括:计算资源的基础Qos要求和上限Qos要求;计算资源的基础Qos要求为虚拟实例配置有实例规格指示的计算资源时,虚拟实例针对计算资源的使用情况能够达到的最低Qos要求;计算性能的上限Qos要求用于指示虚拟实例配置有实例规格指示的计算资源时,虚拟实例针对计算资源的使用情况能够达到的最高 Qos要求。
可选的,该装置还包括:提供模块,用于提供计算资源的基础Qos要求的选择范围;获取模块,用于根据租户在计算资源的基础Qos要求的选择范围中选择的数值确认计算资源的基础Qos要求;提供模块,用于提供计算资源的上限Qos要求的选择范围;获取模块,用于根据租户在计算资源的上限Qos要求的选择范围中选择的数值确认计算资源的上限Qos要求。
可选的,计算资源包括处理器核和/或内存。
可选的,Qos要求包括:网络资源的基础Qos要求和上限Qos要求;网络资源的基础Qos要求为虚拟实例配置有实例规格指示的网络资源时,虚拟实例针对网络资源的使用情况能够达到的最低Qos要求;网络传输性能的上限Qos要求用于指示虚拟实例配置有实例规格指示的网络资源时,虚拟实例针对网络资源的使用情况能够达到的最高Qos要求。
可选的,该装置还包括:提供模块,用于提供网络资源的基础Qos要求的选择范围;获取模块,用于根据租户在网络资源的基础Qos要求的选择范围中选择的数值确认网络资源的基础Qos要求;提供模块,用于提供网络资源的上限Qos要求的选择范围;获取模块,用于根据租户在网络资源的上限Qos要求的选择范围中选择的数值确认网络资源的上限Qos要求。
可选的,网络资源包括网络带宽或每秒发包数量PPS。
可选的,Qos要求包括:存储资源的基础Qos要求和上限Qos要求;存储资源的基础Qos要求为虚拟实例配置有实例规格指示的存储资源时,虚拟实例针对存储资源的使用情况能够达到的最低Qos要求;存储性能的上限Qos要求为虚拟实例配置有实例规格指示的存储资源时,虚拟实例针对存储资源的使用情况能够达到的最高Qos要求。
可选的,该装置还包括:提供模块,用于提供存储资源的基础Qos要求的选择范围;获取模块,用于根据租户在存储资源的基础Qos要求的选择范围中选择的数值确认存储资源的基础Qos要求;提供模块,用于提供存储资源的上限Qos要求的选择范围;获取模块,用于根据租户在存储资源的上限Qos要求的选择范围中选择的数值确认存储资源的上限Qos要求。
可选的,存储资源包括存储带宽和/或每秒执行读/写操作次数IOPS。
可选的,创建模块,具体用于:从云数据中心中的多个物理服务器中选择第一物理服务器,第一物理服务器的空闲硬件资源可提供实例规格并满足Qos要求;在第一物理服务器创建虚拟实例,其中第一物理服务器的空闲硬件资源中的预定硬件资源被分配至虚拟实例,预定硬件资源满足实例规格和Qos要求。
可选的,该装置还包括:获取模块,用于获取租户输入的更新Qos要求,其中更新Qos要求用于指示租户对虚拟实例所要求的更新服务质量;迁移模块,用于从云数据中心中的多个物理服务器中选择第二物理服务器,第二物理服务器的空闲硬件资源可提供实例规格并满足更新Qos要求;迁移模块,用于将虚拟实例从第一物理服务器迁移到第二物理服务器。
可选的,该装置还包括:提供模块,用于提供第一选项,第一选项用于指示租户 选择在更新Qos时虚拟实例进行重启;迁移模块,具体用于在租户选择在更新Qos时虚拟实例进行重启的情况下,停止在第一物理服务器运行虚拟实例,将虚拟实例从第一物理服务器迁移到第二物理服务器,并在第二物理服务器运行虚拟实例。
可选的,该装置还包括:提供模块,用于提供第二选项,第二选项用于指示租户选择在更新Qos时虚拟实例不进行重启;迁移模块,具体用于在租户选择在更新Qos时虚拟实例进行不重启的情况下,将虚拟实例从第一物理服务器在线迁移到第二物理服务器。
可选的,该装置还包括:运维模块,用于根据售卖价格对租户的登录到云平台的账号进行扣费。
第三方面,本申请提供了一种云平台,包括存储器和处理器,存储器存储有程序指令,处理器运行程序指令以执行本申请第一方面以及其任一种可能的实现方式中提供的方法。
第四方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质为非易失性计算机可读存储介质,该计算机可读存储介质包括程序指令,当程序指令在计算机设备上运行时,使得计算机设备执行本申请第一方面以及其任一种可能的实现方式中提供的方法。
第五方面,本申请提供了一种包含指令的计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行本申请第一方面以及其任一种可能的实现方式中提供的方法。
附图说明
图1是本申请实施例提供的一种虚拟实例设置方法涉及的应用场景的示意图;
图2是本申请实施例提供的一种虚拟实例设置方法的流程图;
图3是本申请实施例提供的一种选择实例规格的示意图;
图4是本申请实施例提供的一种选择Qos要求的示意图;
图5是本申请实施例提供的一种创建虚拟实例的方法流程图;
图6是本申请实施例提供的一种选择第一物理服务器的原理示意图;
图7是本申请实施例提供的一种迁移虚拟实例的方法流程图;
图8是本申请实施例提供的一种迁移虚拟实例的原理示意图;
图9是本申请实施例提供的又一种迁移虚拟实例的原理示意图;
图10是本申请实施例提供的一种虚拟实例设置装置的结构示意图;
图11是本申请实施例提供的另一种虚拟实例设置装置的结构示意图;
图12是本申请实施例提供的一种云平台的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
为便于理解,下面先对本申请实施例中涉及的一些概念进行解释。
虚拟实例:虚拟实例运行在物理服务器的操作系统上,且虚拟实例自身设置有操 作系统,虚拟实例的操作系统也运行有应用程序,虚拟实例可使用物理服务器的硬件资源,不同虚拟实例之间相互隔离,应用实例具体例如为虚拟机或容器。
基础性能:是虚拟实例在任何时候都能够达到的性能,是虚拟实例性能的最低保证。例如,虚拟实例的基础网络带宽为主机(host)为该虚拟实例预留的带宽,该虚拟实例能使用的网络带宽在任何时候都能够达到该基础网络带宽。
最大性能:是虚拟实例能够达到的性能的突发上限。当部署有多个虚拟实例的主机上的部分虚拟实例未占用自身的基础性能时,用于提供未被占用的基础性能的资源能够被其他虚拟实例共享,通过共享使得虚拟实例的性能能够高于基础性能,该高于基础性能的性能能够达到的上限为虚拟实例的最大性能。由于每个虚拟实例不是时刻都保持较高负载,物理服务器的资源会出现相对空闲的情况,使得虚拟实例的性能有可能达到最大性能。但是,最大性能不是时刻都能得到保证的,一旦其他虚拟实例负载出现竞争,主机会优先保证每个虚拟实例的基础性能,此时就无法保证虚拟实例的最大性能。
服务质量(quality of service,QoS):基础服务质量和上限服务质量。
基础服务质量:虚拟实例在物理服务器中运行,物理服务器可分配资源给特定实例规格的虚拟实例,例如实例规格为4U的虚拟实例,物理服务器可分配4个处理器核给虚拟实例,但是,物理服务器并不保证虚拟实例能够在任何时候可以100%独占该4个处理器核,只有针对计算资源的基础QOS是100%的情况下,物理服务器才能保证在任何情况下虚拟实例能够100%占用该4个处理器核。
而当针对计算资源的基础QOS是50%的情况下,在物理服务器资源有限的情况下(如其他虚拟实例争抢资源),物理服务器只能保证此时虚拟实例能够占用该4个处理器核中每个处理器核的运算能力的50%。
上限服务质量:虚拟实例在物理服务器中运行,物理服务器可分配资源给特定实例规格的虚拟实例,当物理服务器中部分虚拟实例未占用自身的基础服务质量指示的资源时,物理服务器上的其他虚拟实例能够使用该未被占用的资源,使得该其他虚拟实例的服务质量能够超过基础服务质量,且能够超过基础服务质量的上限为虚拟实例的上限服务质量。例如实例规格为4U的虚拟实例,物理服务器可分配4个处理器核给虚拟实例,该虚拟实例针对计算资源的基础QOS是50%的情况下,物理服务器在任何情况下虚拟实例能够50%占用该4个处理器核,假设虚拟实例针对计算资源的上限QOS是100%的情况下,当物理服务器中部分虚拟实例未占用自身的基础服务质量指示的计算资源时,通过占用该未占用的计算资源,该虚拟实例能够占用的计算资源超过该4个处理器核中每个处理器核的运算能力的50%,且该虚拟实例能够占用的计算资源的上限为该4个处理器核中每个处理器核的运算能力的100%。
上述以实例规格为计算资源为例进行说明,而实例规格还可以包括网络资源和存储资源,网络资源和存储资源的基础QOS用法也上述类似,于此不作赘述。
各云厂商为虚拟实例定义基础性能时,需要保证物理服务器上所有虚拟实例的同一性能下的基础性能总和不超过物理服务器能够提供的该性能的最大能力,从而保证每个虚拟实例的基础性能在任何时候都能达到。各厂商通常根据物理服务器上可用虚拟处理器(vcpu) 的份数,确定每个虚拟处理器的基础性能,并根据每个虚拟实例包括的虚拟处理器的数量,确定每个虚拟实例的基础性能。例如,某物理服务器最大网络带宽为20吉比特每秒(Gbps),可发放虚拟处理器的总数为40个,则每虚拟处理器的基准网络带宽为20Gbps/40=0.5Gbps,则具有4个虚拟处理器的虚拟实例的基准网络带宽为4×0.5=2Gbps,具有16个虚拟处理器的虚拟实例的基准网络带宽为16×0.5=8Gbps。虚拟实例的最大性能一般根据各厂商的竞争力来定义,其不能超过物理服务器能够提供的最大性能。例如,虚拟实例的最大网络带宽通常为基础网络带宽的1-3倍,物理服务器的网络带宽至少为该1-3倍的网络带宽,虚拟实例的最大存储带宽通常为基础存储带宽的2-10倍,物理服务器的存储带宽至少为该2-10倍的存储带宽。其中,最大性能与基础性能之间的倍数关系可以根据竞争力和资源竞争情况确定。
由于物理服务器的资源相对空闲时才有可能达到最大性能,云厂商通过”积分”限制每个虚拟实例达到最大性能的时长,以控制同一物理服务器上各虚拟实例对空闲资源的竞争,从而减少虚拟实例争抢空闲资源出现冲突的概率。其中,虚拟实例达到最大性能的时长越短,出现冲突的概率越低。在虚拟实例对资源的利用率低于基础性能时,虚拟实例会根据低于基础性能的时长累积积分。且当物理服务器出现空闲资源时,虚拟实例的性能可以达到最大性能,直至消耗完该虚拟实例已累积的积分。
目前,各个云厂商推出的虚拟实例通常都具有一定规格,其规格根据物理服务器的计算性能、网络传输性能和存储性能能力划分,不同规格的虚拟实例能实现不同的QoS能力。租户需要使用虚拟实例时,直接在云厂商已规划的虚拟实例中选择满足租户需求的虚拟实例。
但是,云厂商规划的规格通常无法较好地满足租户需求,同时由于用户不一定会充分利用申请的资源,导致云厂商提供的资源的利用率也较差。
本申请实施例提供了一种虚拟实例设置方法,通过获取租户输入的实例配置信息以确认租户需创建的虚拟实例的实例规格和服务质量Qos要求,根据实例规格和Qos要求确定虚拟实例的售卖价格,获取租户根据售卖价格输入的实例创建指令以创建满足实例规格和Qos要求的虚拟实例,从而能够根据租户输入的实例规格和Qos要求创建虚拟实例,使得创建的虚拟实例能够更细粒度地反映租户的真实需求,能够实现对云资源的按需购买,降低租户使用云资源的成本,且有效地提高了云厂商提供的资源的利用率,使得云厂商能够利用有限的云资源为更多的租户服务。其中,Qos要求用于指示租户对虚拟实例所要求的服务质量。
图1是本申请实施例提供的一种虚拟实例设置方法涉及的实施场景的示意图。如图1所示,该实施场景包括:云数据中心10和终端20。该云数据中心10和终端20能够进行通信。
云数据中心10包括云资源和云平台。云资源包括云服务提供商拥有的大量基础资源。基础资源可以为计算资源、存储资源和网络资源等。且计算资源可以是大量的计算设备(例如服务器)。云平台可以利用部署的基础资源或根据该基础资源虚拟化出的资源,实现租户的业务,为租户提供云服务。其中,租户的业务包括根据租户的业务需求创建的软件应用业务等。例如:租户的业务包括根据租户的业务需求创建的语 言识别服务、视频审核服务或图像渲染服务等。并且,云平台可以是中心云的云平台、边缘云的云平台或包括中心云和边缘云的云平台,本申请实施例对其也不做具体限定。
租户可以通过终端20访问云数据中心10,并通过该云数据中心10对云资源做相关的处理。例如,云平台可以向租户提供配置接口,租户可以通过终端20在该配置接口中输入针对虚拟实例的实例配置信息,云平台可以根据该实例配置信息确认租户需创建的虚拟实例的实例规格和服务质量Qos要求,并为租户创建满足实例规格和Qos要求的虚拟实例。其中,Qos要求用于指示租户对虚拟实例所要求的服务质量。
云平台可以通过软件或硬件实现。在一种可实现方式中,云平台可以通过物理服务器等硬件方式实现。例如,云平台可以通过一台物理服务器,或者由若干台物理服务器组成的物理服务器集群,或者是一个云计算服务中心实现。在另一种实现方式中,云平台可以通过部署在计算资源上的软件实现,该软件用于实现本申请实施例提供的虚拟实例设置方法。例如,云平台可以通过在基础资源上通过软件模拟出的虚拟机或容器实现。并且,云平台可以通过独立部署的资源实现,或者可以通过分布式部署的资源实现。例如,用于实现云平台的软件可以独立地部署在云平台中的服务器、虚拟机或容器上,或者,用于实现云平台的软件可以分布式地部署在云平台中的多台服务器上,或者,用于实现云平台的软件可以分布式地部署在云平台中的多台虚拟机上,或者,用于实现云平台的软件可以分布式地部署在云平台中的多个容器中,再或者,用于实现云平台的软件可以分布式地部署在云平台中的多台服务器、多台虚拟机和多个容器中。
终端20可以是台式计算机、膝上型计算机、移动电话、智能手机、平板电脑、多媒体播放器、智能家电、人工智能设备、智能可穿戴设备、电子阅读器、智能车载设备或物联网设备等。
下面对本申请实施例提供的虚拟实例设置方法的实现过程进行说明。如图2所示,该虚拟实例设置方法的实现过程可以包括以下步骤:
步骤201、云平台提供配置接口,以供租户输入实例配置信息。
实例配置信息用于指示虚拟实例的实例规格和服务质量Qos要求,其中,Qos要求用于指示租户对虚拟实例所要求的服务质量。实例规格包括虚拟实例所需各种资源的规格。例如,虚拟实例所需资源包括以下一种或多种:计算资源、网络资源和存储资源。可选地,计算资源包括处理器核和/或内存。网络资源包括网络带宽、每秒发包数量(packet per second,PPS)和/或虚拟实例与其他虚拟实例的链接的总数。存储资源包括存储带宽和/或每秒执行读/写操作次数(input/output operation per second,IOPS)。
在一种可实现方式中,Qos要求包括:虚拟实例所需各种资源的基础Qos要求和上限Qos要求。例如,Qos要求包括以下一个或多个:计算资源的基础Qos要求,计算资源的上限Qos要求,网络资源的基础Qos要求,网络资源的上限Qos要求,存储资源的基础Qos要求,和存储资源的上限Qos要求。
计算资源的基础Qos要求为虚拟实例配置有实例规格指示的计算资源时,虚拟实例针对计算资源的使用情况能够达到的最低Qos要求。计算性能的上限Qos要求用于指示虚拟实例配置有实例规格指示的计算资源时,虚拟实例针对计算资源的使用情况 能够达到的最高Qos要求。网络资源的基础Qos要求为虚拟实例配置有实例规格指示的网络资源时,虚拟实例针对网络资源的使用情况能够达到的最低Qos要求。网络传输性能的上限Qos要求用于指示虚拟实例配置有实例规格指示的网络资源时,虚拟实例针对网络资源的使用情况能够达到的最高Qos要求。存储资源的基础Qos要求为虚拟实例配置有实例规格指示的存储资源时,虚拟实例针对存储资源的使用情况能够达到的最低Qos要求。存储性能的上限Qos要求为虚拟实例配置有实例规格指示的存储资源时,虚拟实例针对存储资源的使用情况能够达到的最高Qos要求。其中,资源的使用情况可以通过虚拟实例对资源的使用率表示。
由于实例配置信息用于指示虚拟实例的实例规格和服务质量Qos要求,则云平台提供配置接口可以包括:云平台提供供租户输入指示实例规格的配置接口,及云平台提供供租户输入指示Qos要求的配置接口。可选地,云平台提供配置接口的实现方式可以有多种,例如,云平台可以通过应用程序接口(application programming interface,API)、交互模板和配置界面提供配置接口。其中,交互模板是云平台向租户提供的用于实现不同功能的模板。当租户需要使用某一功能时,该租户可以下载用于实现该功能的模板,并在该模板中添加该租户的相关信息,然后将添加有租户的相关信息的模板反馈至云平台,云平台在接收到该添加有租户的相关信息的模板后,可以获取该模板需要实现的功能,并根据该租户的信息定制化该功能。配置界面是指租户可以在该配置界面中操作,以指示该租户需要实现的功能。
对应于通过配置界面的实现方式,云平台提供供租户输入指示实例规格的配置接口,及云平台提供供租户输入指示Qos要求的配置接口,可以通过两级页面进行显示。初级页面用于提供供租户输入指示实例规格的配置接口,次级页面用于提供供租户输入指示Qos要求的配置接口。该次级页面在租户在初级页面中选择实例规格后显示,且该次级页面显示的是在初级页面中选择的实例规格对应的Qos要求。
并且,云平台在管理云资源时,可以将实例规格与基础Qos能力和上限Qos能力绑定,且每个实例规格对应的基础Qos能力和上限Qos能力均可以在一定能范围内浮动,即当用户选择某一实例规格时,就确定了虚拟实例所需资源的基础Qos要求的选择范围和上限Qos要求的选择范围。因此,云平台提供供租户输入指示Qos要求的配置接口,包括:提供虚拟实例所需各种资源的基础Qos要求的选择范围和提供虚拟实例所需各种资源的上限Qos要求的选择范围。
可选的,当Qos要求包括:计算资源的基础Qos要求和上限Qos要求时,提供设置Qos要求的配置接口,包括:提供计算资源的基础Qos要求的选择范围和提供计算资源的上限Qos要求的选择范围。当Qos要求包括:网络资源的基础Qos要求和上限Qos要求时,提供设置Qos要求的配置接口,包括:提供网络资源的基础Qos要求的选择范围和提供网络资源的上限Qos要求的选择范围。当Qos要求包括:存储资源的基础Qos要求和上限Qos要求时,提供设置Qos要求的配置接口,包括:提供存储资源的基础Qos要求的选择范围和提供存储资源的上限Qos要求的选择范围。
例如,图3为在初级页面中选择实例规格的示意图,图4为在租户已选图3中4个虚拟处理器和8GB内存容量的实例规格下的次级页面。如图3所示,租户输入的实例规格(图3中虚线框标注的实例规格)包括:4个虚拟处理器和8吉比特(GB)的 内存容量。另外,租户还可以通过配置接口选择虚拟实例的名称和其需要的处理器的型号。如图3所示,租户通过配置接口选择的虚拟实例的名称为“T7.xlarge”。
如图4所示,该实例规格对应的基础Qos能力和上限Qos能力的选择范围分别为:基础CPU性能为4个虚拟处理器的利用率选择范围为[5%,100%],最大CPU性能为4个虚拟处理器的利用率选择范围为[5%,100%],基础网络带宽的选择范围为[1吉字节每秒(GB/S),5GB/S],最大网络带宽的选择范围为[3GB/S,11GB/S],基础PPS的选择范围为[20万(W),60W],最大PPS的选择范围为[40W,90W],基础IOPS的选择范围为[20W,60W],最大IOPS的选择范围为[40W,90W],基础存储带宽的选择范围为[20W,60W],最大存储带宽的选择范围为[40W,90W]。
并且,如图4所示,云平台向租户提供基础Qos要求的选择范围和上限Qos要求的选择范围后,可以通过拖动图4中的拖动条在选择范围中选择数值,或者,通过图4中的加减按钮调整数值,以通过租户选择的数值指示虚拟实例对资源的基础Qos要求和上限Qos要求。
步骤202、云平台获取租户输入的实例配置信息以确认租户需创建的虚拟实例的实例规格和Qos要求。
租户通过配置接口选择实例规格,及在资源的基础Qos要求的选择范围和上限Qos要求的选择范围中选择数值后,云平台即可根据租户的选择确定租户需创建的虚拟实例的实例规格和服务质量Qos要求。
在一种可实现方式中,当Qos要求包括:计算资源的基础Qos要求和上限Qos要求时,获取租户需创建的虚拟实例的计算资源的基础Qos要求,包括:根据租户在计算资源的基础Qos要求的选择范围中选择的数值,确认计算资源的基础Qos要求;获取租户需创建的虚拟实例的计算资源的上限Qos要求,包括:根据租户在计算资源的上限Qos要求的选择范围中选择的数值,确认计算资源的上限Qos要求。
当Qos要求包括:网络资源的基础Qos要求和上限Qos要求时,获取租户需创建的虚拟实例的网络资源的基础Qos要求,包括:根据租户在网络资源的基础Qos要求的选择范围中选择的数值,确认网络资源的基础Qos要求;获取租户需创建的虚拟实例的网络资源的上限Qos要求,包括:根据租户在网络资源的上限Qos要求的选择范围中选择的数值,确认网络资源的上限Qos要求。
当Qos要求包括:存储资源的基础Qos要求和上限Qos要求时,获取租户需创建的虚拟实例的存储资源的基础Qos要求,包括:根据租户在存储资源的基础Qos要求的选择范围中选择的数值,确认存储资源的基础Qos要求;获取租户需创建的虚拟实例的存储资源的上限Qos要求,包括:根据租户在存储资源的上限Qos要求的选择范围中选择的数值,确认存储资源的上限Qos要求。
例如,请继续参考图4,租户在基础CPU性能的利用率选择范围中选择的数值为5%,在最大CPU性能的利用率选择范围中选择的数值为5%,在基础网络带宽的选择范围中选择的数值为1GB/S,在最大网络带宽的选择范围中选择的数值为为3GB/S,在基础PPS的选择范围中选择的数值为20W,在最大PPS的选择范围中选择的数值为40W,在基础IOPS的选择范围中选择的数值为20W,在最大IOPS的选择范围中选择的数值为40W,在基础存储带宽的选择范围中选择的数值为20W,在最大存储带宽的 选择范围中选择的数值为40W。其中,图4中的“同心圆”图标用于标识租户在选择范围中选择的数值。
则根据租户在每个资源的基础Qos要求和上限Qos要求的选择范围中选择的数值,可以确认租户需要创建的虚拟实例的Qos要求包括:计算资源的基础Qos要求为对4个虚拟处理器的利用率为5%,计算资源的上限Qos要求为对4个虚拟处理器的利用率为5%,网络资源中基础网络带宽为1GB/S,最大网络带宽3GB/S,基础PPS为20W,最大PPS为40W,存储资源中基础IOPS为20W,最大IOPS为40W,基础存储带宽为20W,最大存储带宽为40W。
步骤203、云平台根据实例规格和Qos要求确定虚拟实例的售卖价格。
在确认租户需创建的虚拟实例的实例规格和Qos要求后,云平台可以根据实例规格和Qos要求,确定虚拟实例的售卖价格。由于本申请实施例中租户可以根据其应用需求输入需创建的虚拟实例的实例规格和Qos要求,实例规格和Qos要求能够表示租户对云计算资源的真正需求,则云平台根据实例规格和Qos要求确定虚拟实例的售卖价格时,能够实现云计算资源的按需计费。并且,租户还可以通过配置接口输入其期望的付费方式。如图3所示,当租户通过配置接口输入期望按需付费时,则云平台根据实例规格和Qos要求确定虚拟实例的售卖价格。
在一种可实现方式中,虚拟实例的售卖价格除了与实例规格呈正相关关系外,还与虚拟实例的Qos要求呈正相关关系,则当虚拟实例的实例规格和Qos要求中的至少一个改变时,该虚拟实例的售卖价格会相应发生变化。
可选地,虚拟实例的售卖价格、实例规格和Qos要求之间的关系可以满足下面的公式:
P(total)=P(Base)+S(基础cpu性能)×C(base)+S(最大cpu性能)×C(max)+S(基础网络带宽)×B(基础网络带宽)+S(最大网络带宽)×B(最大网络带宽)+S(基础PPS)×P(基础PPS)+S(最大PPS)×P(最大PPS)+S(基础IOPS)×I(基础IOPS)+S(最大IOPS)×I(最大IOPS)+S(基础存储带宽)×SB(基础存储带宽)+S(最大存储带宽)×SB(最大存储带宽)
其中,P(total)为虚拟实例的售卖价格,P(Base)为实例规格的基础价格基线,S(基础cpu性能)为基础cpu性能的价格系数,C(base)为租户选择的基础cpu性能,S(最大cpu性能)为最大cpu性能的价格系数,C(max)为租户选择的最大cpu性能,S(基础网络带宽)为基础网络带宽的价格系数,B(基础网络带宽)为租户选择的基础网络带宽,S(最大网络带宽)为最大网络带宽的价格系数,B(最大网络带宽)为租户选择的最大网络带宽,S(基础PPS)为基础PPS的价格系数,P(基础PPS)为租户选择的基础PPS,S(最大PPS)为最大PPS的价格系数,P(最大PPS)为租户选择的最大PPS,S(基础IOPS)为基础IOPS的价格系数,I(基础IOPS)为租户选择的基础IOPS,S(最大IOPS)为最大IOPS的价格系数,I(最大IOPS)为租户选择的最大IOPS,S(基础存储带宽)为基础存储带宽的价格系数,SB(基础存储带宽)为租户选择的基础存储带宽,S(最大存储带宽)为最大存储带宽的价格系数,SB(最大存储带宽)为租户选择的最大存储带宽。需要说明的是,上述用于计算虚拟实例的售卖价格的公式中的基础价格基线和各项价格系数均可以根据应用需求进行设置,本申请实施例对其不做具体限定。
通过向租户提供配置接口,使得租户能够按照实际需求定义徐创建的虚拟实例的 实例规格和Qos要求,且当按照其确定虚拟实例的售卖价格时,一方面能够实现对云资源的按需购买,另一方面能够降低租户使用云资源的成本。例如,当云厂商为2个虚拟处理器与4GB内存的组合(即2u4g)固定配置的基础网络带宽为1Gbps时,若租户需要使用2Gbps的基础网络带宽时,在相关技术中,租户需要购买4个虚拟处理器与8GB内存的组合(即4U8G)的虚拟机,其需要承担的费用为2u4g费用的2倍。而在本申请实施例中,通过本申请实施例提供的虚拟实例设置方法,当租户需要使用2Gbps的基础网络带宽时,只需要在2u4g的基础上提高基础网络带宽,使得租户承担的费用为2u4g费用的1.5倍,如图4所示虚拟实例的售卖价格为547元/月。由此可见,通过本申请实施例提供的虚拟实例设置方法,能够实现云资源的按需购买,且能够有效降低租户使用云资源的成本。
步骤204、云平台获取租户根据售卖价格输入的实例创建指令。
当租户认为能够接受虚拟实例的售卖价格时,可以通过配置接口输入实例创建指令,以指示按照其输入的实例规格和Qos要求创建实例。可选的,实例配置信息的配置界面上还设置有用于指示创建实例的图标,当租户点击该图标时,可以触发实例创建指令。例如,图4中设置由“创建”按钮,租户点击该“创建”按钮时,云平台即可获取实例创建指令。
步骤205、云平台根据实例创建指令创建满足实例规格和Qos要求的虚拟实例。
可选地,如图5所示,该步骤205的实现过程包括:
步骤2051、云平台从云数据中心中的多个物理服务器中选择第一物理服务器,第一物理服务器的空闲硬件资源可提供实例规格并满足Qos要求。
云平台获取虚拟实例的实例规格和Qos要求后,即可根据实例规格和Qos要求,在云数据中心中的多个物理服务器中选择第一物理服务器,以便于在该第一物理服务器上创建租户需创建的虚拟实例。为了保证创建的虚拟实例的Qos能力,需要保证第一物理服务器的空闲硬件资源可提供虚拟实例所需的实例规格,并满足虚拟实例的Qos要求。在一种可实现方式中,第一物理服务器至少满足以下条件:
条件一:第一物理服务器的任一硬件资源能够同时满足第一物理服务器上所有已创建虚拟实例的基础Qos要求和待创建的虚拟实例的基础Qos要求。
条件二:对于第一物理服务器的任一硬件资源,第一物理服务器上所有已创建虚拟实例的上限Qos要求与待创建的虚拟实例的上限Qos要求之和,小于或等于其他备选物理服务器上已创建虚拟实例的上限Qos要求与待创建的虚拟实例的上限Qos要求的和。
根据上述条件一可知,对于任一硬件资源提供的基础性能,若物理服务器能够同时满足该物理服务器上已创建的虚拟实例的基础Qos要求要求的基础性能和该待创建的虚拟实例的基础Qos要求所要求的该基础性能,该物理服务器上已创建的虚拟实例的基础Qos要求要求的基础性能和该待创建的虚拟实例的基础Qos要求所要求的该基础性能之和,就不会不超过该物理服务器能够提供的该基础性能的额定值,因此可将该物理服务器确认为备选物理服务器。例如,物理服务器上已创建的虚拟实例的基础Qos要求要求的基础网络带宽和该虚拟实例的基础Qos要求所要求的基础网络带宽之和,不超过物理服务器的最大物理网络带宽,物理服务器上已创建的虚拟实例的基础 Qos要求要求的基础计算性能和该虚拟实例的基础Qos要求所要求的基础计算性能之和,不超过物理服务器上所有处理器能够提供的最大计算性能之和,则可将该物理服务器确定为备选物理服务器。
通过根据该条件一选择物理服务器,能够保证物理服务器上所有虚拟实例在出现资源争抢时,物理服务器能够保证该物理服务器上的所有虚拟实例的基础性能,保证虚拟实例的服务等级协议(service level agreement,SLA)。
根据上述条件二可知,对于任一硬件资源提供的性能,当在满足条件一的多个备选物理服务器中选择物理服务器时,需要分别获取该待创建的虚拟实例的上限Qos要求与备选物理服务器上所有已创建虚拟实例的上限Qos要求所要求的最大性能之和,并将最小的上限Qos要求之和对应的备选物理服务器确定为第一物理服务器。
可选地,在执行上述条件二时,也可以根据Qos要求所要求的多项性能,分别计算待创建的虚拟实例的Qos要求所要求的多项性能的上限Qos要求与各个备选物理服务器上所有已创建虚拟实例的Qos要求所要求的多项性能的上限Qos要求的总和(或者总和的平均值),然后将最小总和(或者总和的平均值)对应的备选物理服务器确定为第一物理服务器。
通过根据该条件二选择第一物理服务器,能够在保证基础性能的前提下,实现物理服务器的负载均衡,能够控制每个物理服务器上争抢资源的概率尽量平均化,尽可能地减小物理服务器中虚拟实例之间争抢资源的概率,使得每个虚拟实例都有尽可能高地概率达到上限Qos要求,能够保证云计算环境资源的充分利用,提升集群资源利用率。
步骤2052、云平台在第一物理服务器创建虚拟实例,其中第一物理服务器的空闲硬件资源中的预定硬件资源被分配至虚拟实例,预定硬件资源满足实例规格和Qos要求。
在确定第一物理服务器后,即可根据待创建的虚拟实例的实例规格和Qos要求,在该第一物理服务器上创建该虚拟实例。在第一物理服务器上创建虚拟实例时,可先在该第一物理服务器的空闲硬件资源中确定满足实例规格和Qos要求的预定硬件资源,然后将该预定硬件资源分配至虚拟实例,以完成虚拟实例的创建。其中,在第一物理服务器中创建虚拟实例可以通过该第一物理服务器中的虚拟机管理器实现。
在一种可实现方式中,如图6所示,云数据中心中部署有云平台和云资源,云资源包括多个物理服务器。云平台用于根据租户输入的实例规格和Qos要求,并获取云资源中多个物理服务器的资源使用情况,根据各个物理服务器的资源使用情况确定各个物理服务器的各项Qos要求的总和,并根据租户输入的实例规格和Qos要求的总和,确定该多个物理服务器中满足上述步骤2051提出的两个条件的物理服务器,将满足上述两个条件的物理服务器确定为第一物理服务器,并指示该第一物理服务器中的虚拟机管理器根据租户输入的实例规格和Qos要求,利用该第一物理服务器的硬件层中的资源创建虚拟实例。其中,虚拟机管理器运行在物理服务器的操作系统中,硬件层中的资源包括计算资源、网络资源和存储资源等。其中,图6中方框中黑色填充图案的高度表示该方框指示的资源中已分配给已创建实例的基础Qos要求的总和,根据该图6可知,物理服务器2的计算资源的基础Qos要求的总和、存储资源的基础Qos要求 的总和和网络资源的基础Qos要求的总和均小于物理服务器1的对应总和,因此,将物理服务器2确定为第一物理服务器。
步骤206、云平台在虚拟实例符合迁移条件时,对虚拟实例进行迁移。
可选的,如图7所示,该步骤206的实现过程包括:
步骤2061、云平台从云数据中心中的多个物理服务器中选择第二物理服务器。
云平台在虚拟实例符合迁移条件时,可以根据虚拟实例的实例规格和Qos要求,在运输局掌心中的多个物理服务器中选择第二物理服务器,以便于将虚拟实例迁移至第二物理服务器。该第二物理服务器的空闲硬件资源可提供虚拟实例的实例规格并满足其Qos要求。其中,云平台选择第二物理服务器的实现过程,请相应参考步骤2051中的相关描述,此处不再赘述。其中,
可选地,迁移条件可以通过租户触发得到,或者通过云平台检测得到,本申请实施例以以下两种实现方式为例对其进行说明:
在一种可实现方式中,在第一物理服务器上创建虚拟实例后,租户可能还会根据业务需求调整虚拟实例的Qos要求。例如,根据业务需求调高虚拟实例的Qos要求,使得虚拟实例能够应对更高的负载,或者,根据业务需求调低虚拟实例的Qos要求,以在能够满足业务需求的前提下,降低租户使用云资源的成本。
因此,本申请实施例提供的虚拟实例设置方法还包括:云平台获取租户输入的更新Qos要求,其中更新Qos要求用于指示租户对虚拟实例所要求的更新服务质量。当配置接口接收到更新Qos要求,说明租户更新了该虚拟实例的Qos要求,创建虚拟实例时选择的物理服务器可能无法满足更新后的Qos要求,则需要对该虚拟实例进行迁移。如图8所示,在更新Qos要求后,由于物理服务器2已无法满足更新后的Qos要求,且确定物理服务器M能够满足更新Qos要求,则可将虚拟实例迁移至物理服务器M上。
在完成虚拟实例创建后,通过根据业务需求更新虚拟实例的Qos要求,并根据更新Qos要求对虚拟实例进行迁移,能够按照业务需求为虚拟实例分配资源,充分利用物理服务器的资源,节省租户使用云资源的成本。
可选地,云平台还可以为租户提供第一选项和/或第二选项。第一选项用于指示租户选择在更新Qos时虚拟实例进行重启,即采用冷迁移的方式进行虚拟实例的迁移。第二选项用于指示租户选择在更新Qos时虚拟实例不进行重启,即采用热迁移的方式进行虚拟实例的迁移,该第二选项和第一选项不能同时选择。相应的,本申请实施例提供的虚拟实例设置方法还包括:接收租户对第一选项和/或第二选项选择,根据租户的选择将虚拟实例从第一物理服务器迁移到第二物理服务器。例如,当租户选择第一选项时,云平台可以在租户选择在更新Qos时虚拟实例进行重启的情况下,停止在第一物理服务器运行虚拟实例,将虚拟实例从第一物理服务器迁移到第二物理服务器,并在第二物理服务器运行虚拟实例。又例如,当租户选择第二选项时,云平台在租户选择在更新Qos时虚拟实例进行不重启的情况下,将虚拟实例从第一物理服务器在线迁移到第二物理服务器。
例如,如图4所示,租户通过配置接口输入Qos要求时,租户还可以对“调整参数重启”的第一选项进行选择,当选择该第一选项时,云平台采用冷迁移的方式进行 虚拟实例迁移。或者,云平台中设置有默认的迁移方式,当租户未指示迁移方式时,可以采用该默认的迁移方式将虚拟实例迁移至第二物理服务器上。
其中,云平台中部署有调度系统和二次调度系统,调度系统用于在创建虚拟实例时选择第一物理机,二次调度系统在需要迁移虚拟实例时选择第二物理机。
在另一种可实现方式中,云平台可以监测物理服务器上硬件资源的使用情况,并根据该使用情况确定是否迁移虚拟实例。可选地,迁移条件包括:运行有虚拟实例的物理服务器上的任一硬件资源的利用率在指定时长内达到参考阈值。当硬件资源的利用率在指定时长内达到参考阈值时,说明虚拟实例对该硬件资源进行了资源争抢。
例如,如图9所示,物理服务器1中部署有虚拟实例0和虚拟实例5,物理服务器2中部署有虚拟实例3,且物理服务器1和物理服务器2中均设置有本地代理,该本地代理用于监测其所在物理服务器上硬件资源的使用情况,并根据该使用情况确定物理服务器的负载和资源利用率,并根据该负载和资源利用率确定物理服务器的硬件资源是否出现了资源争抢。如图9所示,物理服务器1的负载为90%且出现了资源争抢,物理服务器2的负载为20%且未出现资源争抢,则可以考虑将虚拟实例0迁移至物理服务器2中。
此时,当物理服务器监测到其硬件资源出现资源争抢时,通过将部署在该物理服务器上的部分虚拟实例迁移至其他物理服务器上,能够消除该物理服务器上的资源争抢,尽量保证云平台管理的多个物理服务器的负载均衡,使得每个物理服务器上的资源都能被充分利用,且尽量保证能够达到虚拟实例的上限Qos要求。并且,由于争抢资源出现在虚拟实例运行过程中,因此当出现资源争抢时,对虚拟实例进行迁移的方式通常为热迁移方式,以降低虚拟实例提供的业务出现业务中断的风险。
步骤2062、云平台将虚拟实例从第一物理服务器迁移到第二物理服务器。
在确定第二物理服务器后,云平台就可以将虚拟实例迁移至第二物理服务器。并且,当租户未选择迁移方式时,云平台按照默认设置的迁移方式将虚拟实例迁移至第二物理服务器上。当用户选择迁移方式时,云平台使用租户指示的迁移方式,将虚拟实例迁移至第二物理服务器上。
步骤207、云平台根据虚拟实例的售卖价格,对租户的登录到云平台的账号进行扣费。
在租户确定创建虚拟实例后,云平台即可根据租户需创建的虚拟实例的售卖价格,对租户的登录到云平台的账号进行扣费。可选的,云平台的扣费方式可以根据应用需求进行设置。例如,云平台可以在虚拟实例被创建后,根据售卖价格进行扣费。或者,在请求创建虚拟实例时,按照售卖价格进行与扣费,本申请实施例对其不做具体限定。
综上所述,本申请实施例提供了一种虚拟实例设置方法,通过获取租户输入的实例配置信息以确认租户需创建的虚拟实例的实例规格和服务质量Qos要求,根据实例规格和Qos要求确定虚拟实例的售卖价格,获取租户根据售卖价格输入的实例创建指令以创建满足实例规格和Qos要求的虚拟实例,从而能够根据租户输入的实例规格和Qos要求创建虚拟实例,使得创建的虚拟实例能够更细粒度地反映租户的真实需求,使得根据实例配置信息为租户的创建虚拟实例能够较好的满足租户的需求,能够实现对云资源的按需购买,降低租户使用云资源的成本,且有效地提高了云厂商提供的资 源的利用率,使得云厂商能够利用有限的云资源为更多的租户服务。并且,通过根据实例规格和服务质量Qos要求创建虚拟实例,能够实现虚拟实例Qos与物理服务器的解耦,减小了后续物理服务器的演进、利旧和替换对实例规格和性能造成的影响。
需要说明的是,本申请实施例提供的虚拟实例设置方法的步骤先后顺序可以进行适当调整,步骤也可以根据情况进行相应增减。任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本申请的保护范围之内,因此不再赘述。
本申请实施例还提供了一种虚拟实例设置装置。如图10所示,该虚拟实例设置装置100包括:
获取模块1001,用于获取租户输入的实例配置信息以确认租户需创建的虚拟实例的实例规格和服务质量Qos要求,其中Qos要求用于指示租户对虚拟实例所要求的服务质量。在一种可实现方式中,该获取模块1001可用于执行上述步骤202。
确定模块1002,用于根据实例规格和Qos要求确定虚拟实例的售卖价格。在一种可实现方式中,该确定模块1002可用于执行上述步骤203。
创建模块1003,用于获取租户根据售卖价格输入的实例创建指令以创建满足实例规格和Qos要求的虚拟实例。在一种可实现方式中,该创建模块1003可用于执行上述步骤204和步骤205。
可选的,Qos要求包括:计算资源的基础Qos要求和上限Qos要求;计算资源的基础Qos要求为虚拟实例配置有实例规格指示的计算资源时,虚拟实例针对计算资源的使用情况能够达到的最低Qos要求;计算性能的上限Qos要求用于指示虚拟实例配置有实例规格指示的计算资源时,虚拟实例针对计算资源的使用情况能够达到的最高Qos要求。
可选的,如图11所示,该虚拟实例设置装置100还包括:
提供模块1004,用于提供计算资源的基础Qos要求的选择范围。
获取模块1001,用于根据租户在计算资源的基础Qos要求的选择范围中选择的数值确认计算资源的基础Qos要求。
提供模块1004,用于提供计算资源的上限Qos要求的选择范围。
获取模块1001,用于根据租户在计算资源的上限Qos要求的选择范围中选择的数值确认计算资源的上限Qos要求。
在一种可实现方式中,该提供模块1004可用于执行上述步骤201。
可选的,计算资源包括处理器核和/或内存。
可选的,Qos要求包括:网络资源的基础Qos要求和上限Qos要求;网络资源的基础Qos要求为虚拟实例配置有实例规格指示的网络资源时,虚拟实例针对网络资源的使用情况能够达到的最低Qos要求;网络传输性能的上限Qos要求用于指示虚拟实例配置有实例规格指示的网络资源时,虚拟实例针对网络资源的使用情况能够达到的最高Qos要求。
可选的,提供模块1004,用于提供网络资源的基础Qos要求的选择范围。
获取模块1001,用于根据租户在网络资源的基础Qos要求的选择范围中选择的数 值确认网络资源的基础Qos要求。
提供模块1004,用于提供网络资源的上限Qos要求的选择范围。
获取模块1001,用于根据租户在网络资源的上限Qos要求的选择范围中选择的数值确认网络资源的上限Qos要求。
可选的,网络资源包括网络带宽或每秒发包数量PPS。
可选的,Qos要求包括:存储资源的基础Qos要求和上限Qos要求;存储资源的基础Qos要求为虚拟实例配置有实例规格指示的存储资源时,虚拟实例针对存储资源的使用情况能够达到的最低Qos要求;存储性能的上限Qos要求为虚拟实例配置有实例规格指示的存储资源时,虚拟实例针对存储资源的使用情况能够达到的最高Qos要求。
可选的,提供模块1004,用于提供存储资源的基础Qos要求的选择范围。
获取模块1001,用于根据租户在存储资源的基础Qos要求的选择范围中选择的数值确认存储资源的基础Qos要求。
提供模块1004,用于提供存储资源的上限Qos要求的选择范围。
获取模块1001,用于根据租户在存储资源的上限Qos要求的选择范围中选择的数值确认存储资源的上限Qos要求。
可选的,存储资源包括存储带宽和/或每秒执行读/写操作次数IOPS。
可选的,创建模块1003,具体用于:从云数据中心中的多个物理服务器中选择第一物理服务器,第一物理服务器的空闲硬件资源可提供实例规格并满足Qos要求;在第一物理服务器创建虚拟实例,其中第一物理服务器的空闲硬件资源中的预定硬件资源被分配至虚拟实例,预定硬件资源满足实例规格和Qos要求。
可选的,如图11所示,该虚拟实例设置装置100还包括:
获取模块1001,用于获取租户输入的更新Qos要求,其中更新Qos要求用于指示租户对虚拟实例所要求的更新服务质量。
迁移模块1005,用于从云数据中心中的多个物理服务器中选择第二物理服务器,第二物理服务器的空闲硬件资源可提供实例规格并满足更新Qos要求。
迁移模块1005,用于将虚拟实例从第一物理服务器迁移到第二物理服务器。
在一种可实现方式中,该迁移模块1005可用于执行上述步骤206。
可选的,提供模块1004,用于提供第一选项,第一选项用于指示租户选择在更新Qos时虚拟实例进行重启。相应的,迁移模块1005,具体用于在租户选择在更新Qos时虚拟实例进行重启的情况下,停止在第一物理服务器运行虚拟实例,将虚拟实例从第一物理服务器迁移到第二物理服务器,并在第二物理服务器运行虚拟实例。
可选的,提供模块1004,用于提供第二选项,第二选项用于指示租户选择在更新Qos时虚拟实例不进行重启,相应的,迁移模块1005,具体用于在租户选择在更新Qos时虚拟实例进行不重启的情况下,将虚拟实例从第一物理服务器在线迁移到第二物理服务器。
可选的,如图11所示,该虚拟实例设置装置100还包括:运维模块1006,用于根据售卖价格对租户的登录到云平台的账号进行扣费。在一种可实现方式中,该运维模块1006可用于执行上述步骤207。
综上所述,本申请实施例提供了一种虚拟实例设置装置,通过获取模块获取租户输入的实例配置信息以确认租户需创建的虚拟实例的实例规格和服务质量Qos要求,确定模块根据实例规格和Qos要求确定虚拟实例的售卖价格,创建模块获取租户根据售卖价格输入的实例创建指令以创建满足实例规格和Qos要求的虚拟实例,从而能够根据租户输入的实例规格和Qos要求创建虚拟实例,使得创建的虚拟实例能够更细粒度地反映租户的真实需求,使得根据实例配置信息为租户的创建虚拟实例能够较好的满足租户的需求,能够实现对云资源的按需购买,降低租户使用云资源的成本,且有效地提高了云厂商提供的资源的利用率,使得云厂商能够利用有限的云资源为更多的租户服务。并且,通过根据实例规格和服务质量Qos要求创建虚拟实例,能够实现虚拟实例Qos与物理服务器的解耦,减小了后续物理服务器的演进、利旧和替换对实例规格和性能造成的影响。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置和模块的具体工作过程,可以参考前述方法实施例中的对应内容,在此不再赘述。
本申请实施例提供了一种云平台。图12示例性的提供了云平台的一种可能的架构图。如图12所示,该云平台120可以包括处理器1201、存储器1202、通信接口1203和总线1204。在云平台中,处理器1201的数量可以是一个或多个,图12仅示意了其中一个处理器1201。可选的,处理器1201可以是中央处理器(Central Processing Unit,CPU)。若云平台具有多个处理器1201,多个处理器1201的类型可以不同,或者可以相同。可选的,云平台的多个处理器还可以集成为多核处理器。
存储器1202存储计算机指令和数据,存储器1202可以存储实现本申请提供的虚拟实例设置方法所需的计算机指令和数据。存储器1202可以是以下存储介质的任一种或任一种组合:非易失性存储器(如只读存储器(Read-Only Memory,ROM)、固态硬盘(Solid State Disk,SSD)、硬盘(Hard Disk Drive,HDD)、光盘等、易失性存储器。
通信接口1203可以是以下器件的任一种或任一种组合:网络接口(如以太网接口)、无线网卡等具有网络接入功能的器件。
通信接口1203用于云平台与其他节点或者其他云平台进行数据通信。
图12还示例性地绘制出总线1204。总线1204可以将处理器1201与存储器1202、通信接口1203连接。这样,通过总线1204,处理器1201可以访问存储器1202,还可以利用通信接口1203与其他节点或者其他云平台进行数据交互。
在本申请中,云平台执行存储器1202中的计算机指令,可以实现本申请提供的虚拟实例设置方法。例如,获取租户输入的实例配置信息以确认租户需创建的虚拟实例的实例规格和服务质量Qos要求,其中Qos要求用于指示租户对虚拟实例所要求的服务质量;根据实例规格和Qos要求确定虚拟实例的售卖价格;获取租户根据售卖价格输入的实例创建指令以创建满足实例规格和Qos要求的虚拟实例。并且,云平台通过执行存储器1202中的计算机指令,执行本申请提供的虚拟实例设置方法的步骤的实现过程可以相应参考上述方法实施例中对应的描述。
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质为非易失性计算机可读存储介质,该计算机可读存储介质包括程序指令,当程序指令在计算机设备上运行时,使得计算机设备执行如本申请实施例提供的虚拟实例设置方法。
本申请实施例还提供了一种包含指令的计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行本申请实施例提供的虚拟实例设置方法。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
在本申请实施例中,术语“第一”、“第二”和“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。术语“至少一个”是指一个或多个,术语“多个”指两个或两个以上,除非另有明确的限定。
本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的构思和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (33)

  1. 一种虚拟实例设置方法,其特征在于,所述方法应用于云平台,所述方法包括:
    获取租户输入的实例配置信息以确认所述租户需创建的虚拟实例的实例规格和服务质量Qos要求,其中所述Qos要求用于指示所述租户对所述虚拟实例所要求的服务质量;
    根据所述实例规格和所述Qos要求确定所述虚拟实例的售卖价格;
    获取所述租户根据所述售卖价格输入的实例创建指令以创建满足所述实例规格和所述Qos要求的所述虚拟实例。
  2. 根据权利要求1所述的方法,其特征在于,所述Qos要求包括:计算资源的基础Qos要求和上限Qos要求;
    所述计算资源的基础Qos要求为所述虚拟实例配置有所述实例规格指示的计算资源时,所述虚拟实例针对所述计算资源的使用情况能够达到的最低Qos要求;
    所述计算性能的上限Qos要求用于指示所述虚拟实例配置有所述实例规格指示的计算资源时,所述虚拟实例针对所述计算资源的使用情况能够达到的最高Qos要求。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    提供计算资源的基础Qos要求的选择范围;
    根据所述租户在所述计算资源的基础Qos要求的选择范围中选择的数值确认所述计算资源的基础Qos要求;
    提供计算资源的上限Qos要求的选择范围;
    根据所述租户在所述计算资源的上限Qos要求的选择范围中选择的数值确认所述计算资源的上限Qos要求。
  4. 根据权利要求2或3所述的方法,其特征在于,所述计算资源包括处理器核和/或内存。
  5. 根据权利要求1至4任一项的方法,其特征在于,所述Qos要求包括:网络资源的基础Qos要求和上限Qos要求;
    所述网络资源的基础Qos要求为所述虚拟实例配置有所述实例规格指示的网络资源时,所述虚拟实例针对所述网络资源的使用情况能够达到的最低Qos要求;
    所述网络传输性能的上限Qos要求用于指示所述虚拟实例配置有所述实例规格指示的网络资源时,所述虚拟实例针对所述网络资源的使用情况能够达到的最高Qos要求。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    提供网络资源的基础Qos要求的选择范围;
    根据所述租户在所述网络资源的基础Qos要求的选择范围中选择的数值确认所述 网络资源的基础Qos要求;
    提供网络资源的上限Qos要求的选择范围;
    根据所述租户在所述网络资源的上限Qos要求的选择范围中选择的数值确认所述网络资源的上限Qos要求。
  7. 根据权利要求5或6所述的方法,其特征在于,所述网络资源包括网络带宽或每秒发包数量PPS。
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述Qos要求包括:存储资源的基础Qos要求和上限Qos要求;
    所述存储资源的基础Qos要求为所述虚拟实例配置有所述实例规格指示的存储资源时,所述虚拟实例针对所述存储资源的使用情况能够达到的最低Qos要求;
    所述存储性能的上限Qos要求为所述虚拟实例配置有所述实例规格指示的存储资源时,所述虚拟实例针对所述存储资源的使用情况能够达到的最高Qos要求。
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    提供存储资源的基础Qos要求的选择范围;
    根据所述租户在所述存储资源的基础Qos要求的选择范围中选择的数值确认所述存储资源的基础Qos要求;
    提供存储资源的上限Qos要求的选择范围;
    根据所述租户在所述存储资源的上限Qos要求的选择范围中选择的数值确认所述存储资源的上限Qos要求。
  10. 根据权利要求8或9所述的方法,其特征在于,所述存储资源包括存储带宽和/或每秒执行读/写操作次数IOPS。
  11. 根据权利要求1至10任一所述的方法,其特征在于,所述获取所述租户根据所述售卖价格输入的实例创建指令以创建满足所述实例规格和所述Qos要求的所述虚拟实例,包括:
    从云数据中心中的多个物理服务器中选择第一物理服务器,所述第一物理服务器的空闲硬件资源可提供所述实例规格并满足所述Qos要求;
    在所述第一物理服务器创建所述虚拟实例,其中所述第一物理服务器的所述空闲硬件资源中的预定硬件资源被分配至所述虚拟实例,所述预定硬件资源满足所述实例规格和所述Qos要求。
  12. 根据权利要求11所述的方法,其特征在于,所述方法还包括:
    获取所述租户输入的更新Qos要求,其中所述更新Qos要求用于指示所述租户对所述虚拟实例所要求的更新服务质量;
    从所述云数据中心中的所述多个物理服务器中选择第二物理服务器,所述第二物 理服务器的空闲硬件资源可提供所述实例规格并满足所述更新Qos要求;
    将所述虚拟实例从所述第一物理服务器迁移到所述第二物理服务器。
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:
    提供第一选项,所述第一选项用于指示所述租户选择在更新Qos时所述虚拟实例进行重启;
    在所述租户选择在更新Qos时所述虚拟实例进行重启的情况下,停止在所述第一物理服务器运行所述虚拟实例,将所述虚拟实例从所述第一物理服务器迁移到所述第二物理服务器,并在所述第二物理服务器运行所述虚拟实例。
  14. 根据权利要求12或13所述的方法,其特征在于,所述方法还包括:
    提供第二选项,所述第二选项用于指示所述租户选择在更新Qos时所述虚拟实例不进行重启;
    在所述租户选择在更新Qos时所述虚拟实例进行不重启的情况下,将所述虚拟实例从所述第一物理服务器在线迁移到所述第二物理服务器。
  15. 根据权利要求1至14任一项所述的方法,其特征在于,所述方法还包括:
    根据所述售卖价格对所述租户的登录到所述云平台的账号进行扣费。
  16. 一种虚拟实例设置装置,其特征在于,所述装置包括:
    获取模块,用于获取租户输入的实例配置信息以确认所述租户需创建的虚拟实例的实例规格和服务质量Qos要求,其中所述Qos要求用于指示所述租户对所述虚拟实例所要求的服务质量;
    确定模块,用于根据所述实例规格和所述Qos要求确定所述虚拟实例的售卖价格;
    创建模块,用于获取所述租户根据所述售卖价格输入的实例创建指令以创建满足所述实例规格和所述Qos要求的所述虚拟实例。
  17. 根据权利要求16所述的装置,其特征在于,所述Qos要求包括:计算资源的基础Qos要求和上限Qos要求;
    所述计算资源的基础Qos要求为所述虚拟实例配置有所述实例规格指示的计算资源时,所述虚拟实例针对所述计算资源的使用情况能够达到的最低Qos要求;
    所述计算性能的上限Qos要求用于指示所述虚拟实例配置有所述实例规格指示的计算资源时,所述虚拟实例针对所述计算资源的使用情况能够达到的最高Qos要求。
  18. 根据权利要求17所述的装置,其特征在于,所述装置还包括:
    提供模块,用于提供计算资源的基础Qos要求的选择范围;
    所述获取模块,用于根据所述租户在所述计算资源的基础Qos要求的选择范围中选择的数值确认所述计算资源的基础Qos要求;
    所述提供模块,用于提供计算资源的上限Qos要求的选择范围;
    所述获取模块,用于根据所述租户在所述计算资源的上限Qos要求的选择范围中选择的数值确认所述计算资源的上限Qos要求。
  19. 根据权利要求17或18所述的装置,其特征在于,所述计算资源包括处理器核和/或内存。
  20. 根据权利要求16至19任一项的装置,其特征在于,所述Qos要求包括:网络资源的基础Qos要求和上限Qos要求;
    所述网络资源的基础Qos要求为所述虚拟实例配置有所述实例规格指示的网络资源时,所述虚拟实例针对所述网络资源的使用情况能够达到的最低Qos要求;
    所述网络传输性能的上限Qos要求用于指示所述虚拟实例配置有所述实例规格指示的网络资源时,所述虚拟实例针对所述网络资源的使用情况能够达到的最高Qos要求。
  21. 根据权利要求20所述的装置,其特征在于,所述装置还包括:
    提供模块,用于提供网络资源的基础Qos要求的选择范围;
    所述获取模块,用于根据所述租户在所述网络资源的基础Qos要求的选择范围中选择的数值确认所述网络资源的基础Qos要求;
    所述提供模块,用于提供网络资源的上限Qos要求的选择范围;
    所述获取模块,用于根据所述租户在所述网络资源的上限Qos要求的选择范围中选择的数值确认所述网络资源的上限Qos要求。
  22. 根据权利要求20或21所述的装置,其特征在于,所述网络资源包括网络带宽或每秒发包数量PPS。
  23. 根据权利要求16至22任一项所述的装置,其特征在于,所述Qos要求包括:存储资源的基础Qos要求和上限Qos要求;
    所述存储资源的基础Qos要求为所述虚拟实例配置有所述实例规格指示的存储资源时,所述虚拟实例针对所述存储资源的使用情况能够达到的最低Qos要求;
    所述存储性能的上限Qos要求为所述虚拟实例配置有所述实例规格指示的存储资源时,所述虚拟实例针对所述存储资源的使用情况能够达到的最高Qos要求。
  24. 根据权利要求23所述的装置,其特征在于,所述装置还包括:
    提供模块,用于提供存储资源的基础Qos要求的选择范围;
    所述获取模块,用于根据所述租户在所述存储资源的基础Qos要求的选择范围中选择的数值确认所述存储资源的基础Qos要求;
    所述提供模块,用于提供存储资源的上限Qos要求的选择范围;
    所述获取模块,用于根据所述租户在所述存储资源的上限Qos要求的选择范围中选择的数值确认所述存储资源的上限Qos要求。
  25. 根据权利要求23或24所述的装置,其特征在于,所述存储资源包括存储带宽和/或每秒执行读/写操作次数IOPS。
  26. 根据权利要求16至25任一所述的装置,其特征在于,所述创建模块,具体用于:
    从云数据中心中的多个物理服务器中选择第一物理服务器,所述第一物理服务器的空闲硬件资源可提供所述实例规格并满足所述Qos要求;
    在所述第一物理服务器创建所述虚拟实例,其中所述第一物理服务器的所述空闲硬件资源中的预定硬件资源被分配至所述虚拟实例,所述预定硬件资源满足所述实例规格和所述Qos要求。
  27. 根据权利要求26所述的装置,其特征在于,所述装置还包括:
    所述获取模块,用于获取所述租户输入的更新Qos要求,其中所述更新Qos要求用于指示所述租户对所述虚拟实例所要求的更新服务质量;
    迁移模块,用于从所述云数据中心中的所述多个物理服务器中选择第二物理服务器,所述第二物理服务器的空闲硬件资源可提供所述实例规格并满足所述更新Qos要求;
    所述迁移模块,用于将所述虚拟实例从所述第一物理服务器迁移到所述第二物理服务器。
  28. 根据权利要求27所述的装置,其特征在于,所述装置还包括:
    提供模块,用于提供第一选项,所述第一选项用于指示所述租户选择在更新Qos时所述虚拟实例进行重启;
    所述迁移模块,具体用于在所述租户选择在更新Qos时所述虚拟实例进行重启的情况下,停止在所述第一物理服务器运行所述虚拟实例,将所述虚拟实例从所述第一物理服务器迁移到所述第二物理服务器,并在所述第二物理服务器运行所述虚拟实例。
  29. 根据权利要求27或28所述的装置,其特征在于,所述装置还包括:
    提供模块,用于提供第二选项,所述第二选项用于指示所述租户选择在更新Qos时所述虚拟实例不进行重启;
    所述迁移模块,具体用于在所述租户选择在更新Qos时所述虚拟实例进行不重启的情况下,将所述虚拟实例从所述第一物理服务器在线迁移到所述第二物理服务器。
  30. 根据权利要求16至29任一项所述的装置,其特征在于,所述装置还包括:
    运维模块,用于根据所述售卖价格对所述租户的登录到所述云平台的账号进行扣费。
  31. 一种云平台,其特征在于,包括存储器和处理器,所述存储器存储有程序指 令,所述处理器运行所述程序指令以执行权利要求1至15任一所述的方法。
  32. 一种计算机可读存储介质,其特征在于,包括程序指令,当所述程序指令在计算机设备上运行时,使得所述计算机设备执行如权利要求1至15任一所述的方法。
  33. 一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至15任一所述的方法。
PCT/CN2021/129172 2020-11-12 2021-11-07 虚拟实例设置方法及装置 WO2022100534A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202011264601 2020-11-12
CN202011264601.5 2020-11-12
CN202110131904.8A CN114489922A (zh) 2020-11-12 2021-01-30 虚拟实例设置方法及装置
CN202110131904.8 2021-01-30

Publications (1)

Publication Number Publication Date
WO2022100534A1 true WO2022100534A1 (zh) 2022-05-19

Family

ID=81491771

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/129172 WO2022100534A1 (zh) 2020-11-12 2021-11-07 虚拟实例设置方法及装置

Country Status (2)

Country Link
CN (1) CN114489922A (zh)
WO (1) WO2022100534A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024021485A1 (zh) * 2022-07-29 2024-02-01 天翼云科技有限公司 处理器性能调整方法、装置、电子设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024037619A1 (zh) * 2022-08-18 2024-02-22 华为云计算技术有限公司 一种基于云计算技术的虚拟实例创建方法和云管理平台

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142864A (zh) * 2014-08-07 2014-11-12 浪潮电子信息产业股份有限公司 一种基于虚拟化技术的多租户性能隔离框架
CN109740870A (zh) * 2018-12-17 2019-05-10 南京理工大学 云计算环境下Web应用的资源动态调度方法
US10613888B1 (en) * 2015-12-15 2020-04-07 Amazon Technologies, Inc. Custom placement policies for virtual machines
CN111400001A (zh) * 2020-03-09 2020-07-10 清华大学 一种面向边缘计算环境的在线计算任务卸载调度方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142864A (zh) * 2014-08-07 2014-11-12 浪潮电子信息产业股份有限公司 一种基于虚拟化技术的多租户性能隔离框架
US10613888B1 (en) * 2015-12-15 2020-04-07 Amazon Technologies, Inc. Custom placement policies for virtual machines
CN109740870A (zh) * 2018-12-17 2019-05-10 南京理工大学 云计算环境下Web应用的资源动态调度方法
CN111400001A (zh) * 2020-03-09 2020-07-10 清华大学 一种面向边缘计算环境的在线计算任务卸载调度方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024021485A1 (zh) * 2022-07-29 2024-02-01 天翼云科技有限公司 处理器性能调整方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN114489922A (zh) 2022-05-13

Similar Documents

Publication Publication Date Title
US10346216B1 (en) Systems, apparatus and methods for management of software containers
US20210149737A1 (en) Method for fast scheduling for balanced resource allocation in distributed and collaborative container platform environment
US10819776B2 (en) Automated resource-price calibration and recalibration by an automated resource-exchange system
US10873623B2 (en) Dynamically modifying a cluster of computing nodes used for distributed execution of a program
US11656895B1 (en) Computing resource provisioning
US10069693B1 (en) Distributed resource allocation
US11252220B2 (en) Distributed code execution involving a serverless computing infrastructure
Son et al. A price-and-time-slot-negotiation mechanism for cloud service reservations
US9491313B2 (en) Optimizing storage between mobile devices and cloud storage providers
TW522310B (en) Method, system and program products for managing logical processors of a computing environment
US9645840B2 (en) User-defined pools
Agmon Ben-Yehuda et al. The rise of RaaS: the resource-as-a-service cloud
US9634958B2 (en) Burst capacity for user-defined pools
CN100487659C (zh) 用于优化分段资源分配的方法和设备
WO2022100534A1 (zh) 虚拟实例设置方法及装置
US20160224372A1 (en) Determining an optimal computing environment for running an image
US10764185B2 (en) Token-based policies burst-mode operations
US20140380324A1 (en) Burst-mode admission control using token buckets
US20180063026A1 (en) Capacity optimization in an automated resource-exchange system
CN105204924A (zh) 管理程序执行能力的私有使用
US11190415B2 (en) Flexible capacity reservations for network-accessible resources
CN111796908A (zh) 一种资源自动弹性伸缩的系统、方法及云平台
JP5867238B2 (ja) オートスケーリング方法,オートスケーリングプログラムおよびコンピュータノード
US9639875B1 (en) Reconfiguring reserved instance marketplace offerings for requested reserved instance configurations
CN106126319A (zh) 中央处理器资源分配方法和计算节点

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21891059

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21891059

Country of ref document: EP

Kind code of ref document: A1