# US 2018/0027061 A1 · Method and apparatus for elastically scaling virtual machine cluster

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0027061 A1
- Document ID: US20180027061A1
- Status: Published application
- Kind: A1
- Application number: 15/429,342
- Filed: 2017-02-10
- Published: 2018-01-25
- Earliest claimed: 2016-07-20
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science And Technology Co., Ltd.
- Inventors: Hengyi Jian
- Web page: https://patentgrep.com/patent/US20180027061A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 21/53: by executing in a restricted environment, e.g. sandbox or secure virtual machine
- G06F 21/57: Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- H04L 9/0869: {involving random numbers or seeds}
- H04L 9/14: using a plurality of keys or algorithms
- H04L 9/30: Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
- H04L 41/0895: Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
- H04L 41/40: using virtualisation of network functions or resources, e.g. SDN or NFV entities
- H04L 41/5054: Automatic deployment of services triggered by the service manager, e.g. service implementation by automatic configuration of network components
- H04L 63/045: {wherein the sending and receiving network entities apply hybrid encryption, i.e. combination of symmetric and asymmetric encryption (cryptographic mechanisms or cryptographic arrangements using a plurality of keys or algorithms H04L9/14)}
- H04L 67/10: in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46)
- H04L 67/1008: based on parameters of servers, e.g. available memory or workload (monitoring of computer activity G06F11/30)
- H04L 67/34: {involving the movement of software or configuration parameters (network booting or remote initial program loading [RIPL] G06F9/4416)}
- G06F 2009/4557: {Distribution of virtual machine instances; Migration and load balancing}
- G06F 2009/45587: {Isolation or security of virtual machine instances}
- G06F 2221/034: Test or assess a computer or a system
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The present application discloses a method and apparatus for elastically scaling a virtual machine cluster. A specific implementation of the method includes: calculating a first amount of residual resources of virtual machines in a virtual machine cluster during service deployment; acquiring an amount of resources demanded by a service to be deployed; acquiring a configuration level of the virtual machines in the virtual machine cluster; determining a virtual machine having a predetermined configuration level as a target virtual machine based on whether the first amount of residual resources satisfies the amount of resources demanded; and deploying the service to be deployed to the target virtual machine. This implementation can implement service deployment in a virtual machine cluster including virtual machines having different configuration levels and also can implement the deployment of different services on a single virtual machine, thereby reducing the costs of service deployment and improving the resource utilization rate of the virtual machine cluster.

## Claims

### Claim 1

A method for elastically scaling a virtual machine cluster, the method comprising:
calculating a first amount of residual resources of virtual machines in a virtual machine cluster during service deployment;
acquiring an amount of resources demanded by a service to be deployed;
acquiring a configuration level of the virtual machines in the virtual machine cluster;
determining a virtual machine having a predetermined configuration level as a target virtual machine based on whether the first amount of residual resources satisfies the demanded amount of resources; and
deploying the service to be deployed to the target virtual machine.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the determining a virtual machine having a predetermined configuration level as a target virtual machine based on whether the first amount of residual resources satisfies the demanded amount of resources comprises:
selecting one of the virtual machines having a highest configuration level as the target virtual machine in response to the first amount of residual resources satisfying the amount of resources demanded; or
selecting one of the virtual machines having a lowest configuration level from the virtual machine cluster as a reference virtual machine and determining the target virtual machine based on whether the reference virtual machine has the highest configuration level, in response to the first amount of residual resources not satisfying the amount of resources demanded.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the determining the target virtual machine based on whether the reference virtual machine has the highest configuration level comprises:
applying for a virtual machine having a lowest configuration level satisfying the amount of resources demanded, adding the virtual machine applied for to the virtual machine cluster, and using the virtual machine applied for as the target virtual machine, in response to the configuration level of the reference virtual machine being the highest configuration level; or
calculating, after upgrading the configuration level of the reference virtual machine, a second amount of residual resources of the virtual machine, and determining the target virtual machine based on whether the second amount of residual resources satisfies the amount of resources demanded, in response to the configuration level of the reference virtual machine being not the highest configuration level.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the determining the target virtual machine based on whether the second amount of residual resources satisfies the amount of resources demanded comprises:
applying for a virtual machine having an upgraded configuration level, migrating a service on the reference virtual machine to the virtual machine applied for, releasing the reference virtual machine, adding the virtual machine applied for to the virtual machine cluster, and using the virtual machine applied for as the target virtual machine, in response to the second amount of residual resources satisfying the amount of resources demanded; or
applying for a virtual machine having a lowest configuration level satisfying the amount of resources demanded, adding the virtual machine applied for to the virtual machine cluster, and using the virtual machine applied for as the target virtual machine, in response to the second amount of residual resources not satisfying the amount of resources demanded.

### Claim 5 (depends on 2)

The method according to claim 2, wherein the selecting one of the virtual machines having the highest configuration level as the target virtual machine in response to the first amount of residual resources satisfying the amount of resources demanded comprises:
selecting, if the number of virtual machines having the highest configuration level is greater than one, a virtual machine having a smallest amount of residual resources among the virtual machines having the highest configuration level as the target virtual machine, in response to the first amount of residual resources satisfying the amount of resources demanded.

### Claim 6 (depends on 3)

The method according to claim 3, wherein the selecting one of the virtual machines having a lowest configuration level from the virtual machine cluster as a reference virtual machine comprises:
selecting, if the number of virtual machines having the lowest configuration level in the virtual machine cluster is greater than one, a virtual machine having the smallest amount of residual resources among the virtual machines having the lowest configuration level as the reference virtual machine.

### Claim 7 (depends on 1)

The method according to claim 1, further comprising the following virtual machine releasing:
selecting at least one virtual machine having a smallest amount of resources occupied from the virtual machine cluster as a virtual machine to be released;
determining whether an amount of residual resources of a second virtual machine in the virtual machine cluster other than the virtual machine to be released satisfies an amount of resources required for deploying a service on the virtual machine to be released; and
if yes, migrating the service on the virtual machine to be released to the second virtual machine and releasing the virtual machine to be released.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the selecting at least one virtual machine having a smallest amount of resources occupied from the virtual machine cluster as a virtual machine to be released comprises:
if a number of virtual machines having the smallest amount of resources occupied is greater than one, selecting the virtual machine having the lowest configuration level among the virtual machines having the smallest amount of resources occupied as the virtual machine to be released.

### Claim 9 (depends on 7)

The method according to claim 7, further comprising:
repeatedly performing the virtual machine releasing at a predetermined time interval.

### Claim 10

An apparatus for elastically scaling a virtual machine cluster, the apparatus comprising:
at least one processor; and
a memory storing instructions, which when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprising:
calculating a first amount of residual resources of virtual machines in a virtual machine cluster during service deployment;
acquiring an amount of resources demanded by a service to be deployed;
acquiring a configuration level of the virtual machines in the virtual machine cluster;
determining a virtual machine having a predetermined configuration level as a target virtual machine based on whether the first amount of residual resources satisfies the demanded amount of resources; and
deploying the service to be deployed to the target virtual machine.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the determining a virtual machine having a predetermined configuration level as a target virtual machine based on whether the first amount of residual resources satisfies the demanded amount of resources comprises:
selecting one of the virtual machines having a highest configuration level as the target virtual machine in response to the first amount of residual resources satisfying the amount of resources demanded; or
selecting one of the virtual machines having a lowest configuration level from the virtual machine cluster as a reference virtual machine and determining the target virtual machine based on whether the reference virtual machine has the highest configuration level, in response to the first amount of residual resources not satisfying the amount of resources demanded.

### Claim 12 (depends on 11)

The apparatus according to claim 11, wherein the determining the target virtual machine based on whether the reference virtual machine has the highest configuration level comprises:
applying for a virtual machine having a lowest configuration level satisfying the amount of resources demanded, adding the virtual machine applied for to the virtual machine cluster, and using the virtual machine applied for as the target virtual machine, in response to the configuration level of the reference virtual machine being the highest configuration level; or
calculating, after upgrading the configuration level of the reference virtual machine, a second amount of residual resources of the virtual machine, and determining the target virtual machine based on whether the second amount of residual resources satisfies the amount of resources demanded, in response to the configuration level of the reference virtual machine being not the highest configuration level.

### Claim 13 (depends on 12)

The apparatus according to claim 12, wherein the determining the target virtual machine based on whether the second amount of residual resources satisfies the amount of resources demanded comprises:
applying for a virtual machine having an upgraded configuration level, migrating a service on the reference virtual machine to the virtual machine applied for, releasing the reference virtual machine, adding the virtual machine applied for to the virtual machine cluster, and using the virtual machine applied for as the target virtual machine, in response to the second amount of residual resources satisfying the amount of resources demanded; or
applying for a virtual machine having a lowest configuration level satisfying the amount of resources demanded, adding the virtual machine applied for to the virtual machine cluster, and using the virtual machine applied for as the target virtual machine, in response to the second amount of residual resources not satisfying the amount of resources demanded.

### Claim 14 (depends on 11)

The apparatus according to claim 11, wherein the selecting one of the virtual machines having the highest configuration level as the target virtual machine in response to the first amount of residual resources satisfying the amount of resources demanded comprises:
selecting, if the number of virtual machines having the highest configuration level is greater than one, a virtual machine having the smallest amount of residual resources among the virtual machines having the highest configuration level as the target virtual machine, in response to the first amount of residual resources satisfying the amount of resources demanded.

### Claim 15 (depends on 12)

The apparatus according to claim 12, wherein the selecting one of the virtual machines having a lowest configuration level from the virtual machine cluster as a reference virtual machine comprises:
selecting, if the number of virtual machines having the lowest configuration level in the virtual machine cluster is greater than one, a virtual machine having the smallest amount of residual resources among the virtual machines having the lowest configuration level as the reference virtual machine.

### Claim 16 (depends on 10)

The apparatus according to claim 10, the operations further comprising the following virtual machine releasing:
selecting at least one virtual machine having the smallest amount of resources occupied from the virtual machine cluster as a virtual machine to be released;
determining whether an amount of residual resources of another virtual machine in the virtual machine cluster other than the virtual machine to be released satisfies an amount of resources required for deploying a service that is on the virtual machine to be released; and
if yes, migrating the service on the virtual machine to be released to the another virtual machine and releasing the virtual machine to be released.

### Claim 17 (depends on 16)

The apparatus according to claim 16, wherein the selecting at least one virtual machine having a smallest amount of resources occupied from the virtual machine cluster as a virtual machine to be released comprises:
if the number of virtual machines having the smallest amount of resources occupied is greater than one, selecting the virtual machine having the lowest configuration level among the virtual machines having the smallest amount of resources occupied as the virtual machine to be released.

### Claim 18 (depends on 16)

The apparatus according to claim 16, the operations further comprising:
repeatedly performing the virtual machine releasing at a predetermined time interval.

### Claim 19

Anon-transitory computer storage medium storing a computer program, which when executed by one or more processors, cause the one or more processors to perform operations, the operations comprising:
calculating a first amount of residual resources of virtual machines in a virtual machine cluster during service deployment;
acquiring an amount of resources demanded by a service to be deployed;
acquiring a configuration level of the virtual machines in the virtual machine cluster;
determining a virtual machine having a predetermined configuration level as a target virtual machine based on whether the first amount of residual resources satisfies the demanded amount of resources; and
deploying the service to be deployed to the target virtual machine.
