Optimized placement of virtual machines in a network environment
AssigneeInternational Business Machines Corporation
InventorsOfer Biran, Erez Hadad, Elliot K Kolodner, Dean H Lorenz, Yosef Moatti
Life of this patent
Estimating the term…
Abstract
Systems and methods for reducing risk of service interruptions for one or more virtual machines (VMs) in a computing environment are provided. The method comprises computing a placement scheme for placing at least one VM on one or more hosts according to a set of placement constraints defined for the VM, wherein the set of placement constraints comprises at least one availability constraint defined for the VM, wherein the availability constraint designates a N resiliency level, wherein N corresponds to number of host failures that may occur before the services provided by the VM are interrupted.
Claims9
A computer implemented method for reducing risk of service interruptions for one or more virtual machines (VMs) in a computing environment, the method comprising:
- computing a placement scheme for placing at least one VM on one or more hosts according to a set of placement constraints defined for the VM, wherein the set of placement constraints comprises at least one availability constraint defined for the VM, wherein the availability constraint designates a N resiliency level, wherein N corresponds to number of host failures that may occur before the services provided by the VM are interrupted,
- evacuating the VM from a first host to a second host in a computing environment, in response to determining that the first host pertains to a group of up to N hosts susceptible to failure,
- wherein said VM is placed on first host in accordance to the placement constraints,
- wherein said VM can be placed on a second host also in accordance to the placement constraints, wherein N is the designated N resiliency level for said VM,
- further comprising pre-allocating shadow VMs for the VM to minimize risk of service interruption for said VM due to failure of one or more hosts hosting the VM
- wherein:
- h denotes a group of hosts;
- VM(x) denotes a VM x;
- P(h,x) denotes placement of x on h;
- such that P(h,x)=1 if x is placed on h and P(h,x)=O;
- Otherwise:
- R(x,d) denotes resource requirement of VM(x) for a resource type d;
- C(h,d) denotes the capacity on host h of resource type d;
- the method further comprising, for each VM, adding a set of F shadow VMs:
- {VM(x,1), VM(x,2) . . . , VM(x,F)};
- wherein F is the number of host failures from which the VM is protected;
- wherein:
- VM(x,O) denotes an original VM(x)
- A j-shadow is a shadow of the form VM(x,j) for any x
- P(h,x,j)=1 if shadow VM(x,j) is placed on h
- the method further comprising constructing evacuation mapping in case of host failures by:
- numbering each failed host from 1 to F;
- for j=1 to F performing the following:
- (a) for x on host hG) setting evacuation target of x to the host containing the shadow VM(x,j);
- (b) for shadow VM(x,i) on host hG) doing the following:
- 1. converting shadow VM(x,j) to VM(x,i);
- and
- 2. if i<j then updating the evacuation target of x;
- the method further comprising constructing additional constraint rules by:
- for any VM x and any i!=j, set VM(x,i) as anti-collocated with VM(x,j), wherein:
- i,j may be 0;
- if VM(x) and VM(y) are anti-collocated then set VM(x,i) as anti-collocated with VM(y,j) for any i!=j. If VM(x) is anti-located with host h, then also VM(x,i) is anti-located with host h, for any i;
- for any resource type d and any host h, sumx (P (h,x)*R(x,d))+sumj(maxh′!=h{sumy,i(P(h,y,j)*P(h′,y)*R(y,d)+P(h,y,j)*P (h′,y,i)*R (y,d))}) is prohibited from being greater than C(h, d) (P310d) h′ refers to any host that is different from h;
- sumx refers to the amount of resources to be allocated to VM x on h;
- sumj refers to the amount of resources to be allocated to shadow VMs on h;
- maxh′!=h refers to the maximum amount of resources to be allocated to any VM on any h′;
- and sumy,i refers to the amount of resources to be allocated to the shadow VMs on h′
- subject to:
- setting rule 1 such that 2 shadows of the same VM are not placed on the same host;
- setting rule 2 such that anti-collocation and anti-location apply to shadows, wherein a case i=j for anti-collocation is excluded, such that anti-collocated VMs have a different failed host number during evacuation;
- setting rule 3 as the resource capacity constraints such that:
- a left sum is the resource used for the real VMs on h,
- a right sum is the resource used for the shadows,
- shadows with different failure numbers (the sum over j) do not overlap;
- for each failure number j, summing the worst case host failure (both the shadows VM(y,j) on h corresponding to VM(y) on h′, and the shadows VM(y,j) that have a ‘brother’ shadow VM(y,i) (for any i) on host h′ to guarantee space on h both for the VMs of h′ (when h′ will be assigned as j) and for VMs of other hosts that have a shadow on h′ and a j-shadow on h, and due the Convert (in case h′ fails) will also be routed to their j-shadow;
- wherein due to rule 1, P(h,y,j) is 1 for at most one j on host h, so that all sets of J hosts are not maximized, wherein two different failure numberings cause evacuation of disjoint sets of VMs to the host h.
A computer-implemented method for managing virtual machines (VMs) in a network environment, the method comprising:
- creating one or more shadow VMs for each VM and creating for each shadow VM a set of additional constraints wherein the shadow VMs and the associated additional constraints are utilized to protect the VMs against a certain number of host failures as indicated by an availability constraint, and wherein the shadow VMs and associated constraints are used to reach a placement scheme which does not infringe the availability constraints,
- associating a placement scheme with one or more VMs on one or more hosts according to a set of placement constraints defined for the VMs and a set of placement constraints defined for the shadow VMs, wherein the placement scheme satisfies a set of availability constraints defined for the VMs and the shadow VMs, wherein a first availability constraint indicates that a first VM is to be protected against a certain number of host failures, and
- deploying the VMs according to the placement scheme, wherein deploying the VMs comprises migrating any VMs that are placed on different hosts,
- further comprising saving information about placement of the shadow VMs, wherein the saved information is utilized to designate migration targets for the VMs,
- further comprising detecting imminent failure of one or more of the hosts, wherein a first VM is deployed on a first failing host,
- further comprising determining whether number of failing hosts is less than or equal to the certain number of host failures against which the first VM is protected,
- further comprising utilizing the saved information to designate a migration target for the first VM, in response to determining that the number of failing hosts is less than or equal to the certain number of host failures against which the first VM is protected,
- further comprising associating the shadow VMs with a first set of identifiers, wherein identifier values in the first set of identifiers range from 1 to total number of shadow VMs,
- further comprising associating the failing hosts with a second set of identifiers, wherein identifier values in the second set of identifiers range from 1 to total number of failing hosts,
- wherein an identifier value assigned to a first shadow VM is same as an identifier value assigned to the first failing host.
A computer implemented method for reducing risk of service interruptions for one or more virtual machines (VMs) in a computing environment, the method comprising:
- computing a placement scheme for placing at least one VM on one or more hosts according to a set of placement constraints defined for the VM, wherein the set of placement constraints comprises at least one availability constraint defined for the VM, wherein the availability constraint designates a N resiliency level, wherein N corresponds to number of host failures that may occur before the services provided by the VM are interrupted,
- h denotes a group of hosts;
- VM(x) denotes a VM x;
- P(h,x) denotes placement of x on h;
- such that P(h,x)=1 if x is placed on h and P(h,x)=0;
- Otherwise:
- R(x,d) denotes resource requirement of VM(x) for a resource type d;
- C(h,d) denotes the capacity on host h of resource type d;
- the method further comprising, for each VM, adding a set of F shadow VMs:
- {VM(x,1), VM(x,2) . . . , VM(x,F)};
- wherein F is the number of host failures from which the VM is protected;
- wherein:
- VM(x,0) denotes an original VM(x)
- A j-shadow is a shadow of the form VM(x,j) for any x
- P(h,x,j)=1 if shadow VM(x,j) is placed on h
- the method further comprising constructing evacuation mapping in case of host failures by:
- numbering each failed host from 1 to F;
- for j=1 to F performing the following:
- (c) for x on host h(j) setting evacuation target of x to the host containing the shadow VM(x,j);
- (d) for shadow VM(x,i) on host h(j) doing the following:
- 1. converting shadow VM(x,j) to VM(x,i);
- and
- 2. if i<j then updating the evacuation target of x;
- the method further comprising constructing additional constraint rules by:
- for any VM x and any i!=j, set VM(x,i) as anti-collocated with VM(x,j), wherein:
- i,j may be 0;
- if VM(x) and VM(y) are anti-collocated then set VM(x,i) as anti-collocated with VM(y,j) for any i!=j If VM(x) is anti-located with host h, then also VM(x,i) is anti-located with host h, for any i;
- for any resource typed and any host h, sumx (P (h,x)*R (x,d))+sumj(maxh′!=h{sumy,i(P(h,y,j)*P(h′,y)*R(y,d)+P(h,y,j)*P(h′,y,i)*R(y,d))}) is prohibited from being greater than C(h, d) (P310d) h′ refers to any host that is different from h;
- sumx refers to the amount of resources to be allocated to VM x on h;
- sumj refers to the amount of resources to be allocated to shadow VMs on h;
- maxh-!=h refers to the maximum amount of resources to be allocated to any VM on any h′;
- and sumy,i refers to the amount of resources to be allocated to the shadow VMs on h′
- subject to:
- setting rule 1 such that 2 shadows of the same VM are not placed on the same host;
- setting rule 2 such that anti-collocation and anti-location apply to shadows, wherein a case i=j for anti-collocation is excluded, such that anti-collocated VMs have a different failed host number during evacuation;
- setting rule 3 as the resource capacity constraints such that:
- a left sum is the resource used for the real VMs on h,
- a right sum is the resource used for the shadows,
- shadows with different failure numbers (the sum over j) do not overlap;
- for each failure number j, summing the worst case host failure (both the shadows VM(y,j) on h corresponding to VM(y) on h′, and the shadows
- VM(y,j) that have a ‘brother’ shadow VM(y,i) (for any i) on host h′ to guarantee space on h both for the VMs of h′ (when h′ will be assigned as j) and for VMs of other hosts that have a shadow on h′ and a j-shadow on h, and due the Convert (in case h′ fails) will also be routed to their j-shadow;
- wherein due to rule 1, P(h,y,j) is 1 for at most one j on host h, so that all sets of J hosts are not maximized, wherein two different failure numberings cause evacuation of disjoint sets of VMs to the host h.
Dependencies are inferred from the claim text.