Func53-AdjustLURtoPhysicalAdv

<< Click to Display Table of Contents >>

Navigation:  Modules > Asset Management > Software License Management > Authorization Analyzer (Complex license types) > AA Functions >

Func53-AdjustLURtoPhysicalAdv

Description

This function is an advanced version of Func44 that is designed to check the sum of license units required (LURs) for the MSL title associated with the authorization under test on a given physical machine (and its associated virtual child machines (VMs)).  The LURs of all authorizations for the MSL title that belong to virtual machines on the same parent physical machine are summed, and then compared to the LURs that would be required to simply license the entire physical machine.  If the sum of the LURs across all the virtual machines exceeds the theoretical LURs that would be required based on the physical machine's characteristics, then a single authorization (existing or created if needed) will be carried on the physical asset for the required LUR and all other authorizations for the VMs will be zeroed out.  

Advanced features include:

Ability to expand the authorization search based on family or class.

Ability to defined a unique divisor for VMs

Will create or modify an authorization on the physical asset for the full LUR required using the highest order MSL title for the family or class configured.

This function, while general in nature, was designed specifically to address SQL Server counting.

This function is designed to evaluate all of the related authorizations (based on the parameters given) and set the correct LUR for the asset under test and/or the entire group as needed.

 

Processing Notes

This function goes through the following steps to derive the required answer:

Checks to see if the asset associated with the authorization under test is shown as a virtual machine (isVirtual is set to -1) and there is either a Parent (asset number) defined or a PhysicalComputerName define.

Given the checks pass, the physical asset is located and the physical core (or processor) count is sampled.

If no parent asset is located, then processing is stopped. Case 1

If a minimum physical license count parameter is specified and if that parameter is greater than zero, the physical core (or proc) count is compared to the minimum specified and if lower, the minimum specified is used.

A list is then made of all asset records whose parent matches the physical parent or whose physical computer name matches the physical parent (a list of all child assets, which are all assumed to be virtual machines hosted on the parent).

The authorization table is then checked to compile a list of all active authorizations that match the MSL title of the authorization under test (and any in the family or class configure)  and that have been assigned to the list of child assets as well as any assigned to the physical asset.  The LURs are summed across the child VMs as that list is compiled.  If an authorization is active against the physical parent, the current LURs assigned to the physical asset authorization is also sampled.

As LURs are summed across VMs, each current LUR count for each VM is compared to the minimum value specified as the minimum virtual license count.  If the current LUR count is less than the specified minimum, the specified minimum is used.  The specified minimum must evaluate to a number greater than zero to be used.

If the authorization under test is against the physical parent, then the physical cores (or procs) sent is returned as the LURs.

Once the LUR sums are tallied for the VMs and the Physical parent, the VM and physical divisors are applied to the totals and a comparison is made.  The two values, Vcompare and Pcompare are then processed according to this matrix*:

 

Compare

LUR Sum

Action to Take

Is the Vcompare total > Pcompare

Is the LUR Sum > Pcores

Set/Create an authorization for the (highest order) MSLno  to Pcores on the physical asset and zero out the other VMs. Case 2

Is the LUR Sum = Pcores

Do nothing. Case 3

Is the LUR Sum < Pcores

Set/Create an authorization for the (highest order) MSLno  to Pcores on the physical asset and zero out the other VMs. Case 4

 

 

 

Is the Vcompare total = Pcompare

Is the LUR Sum > Pcores

Set/Create an authorization for the (highest order) MSLno  to Pcores on the physical asset and zero out the other VMs. Case 5

Is the LUR Sum = Pcores

Do nothing. Case 6

Is the LUR Sum < Pcores

Set/Create an authorization for the (highest order) MSLno  to Pcores on the physical asset and zero out the other VMs. Case 7

 

 

 

Is the Vcompare total < Pcompare

Is the LUR Sum >= Pcores

If physical authorization:

 

    Zero out the vms

    and physical to pcompare

 

If no physical do something else:

 

Set the VM under test to the vCompare value for that particular VM. Case 8

Is the LUR Sum < Pcores

Set the VM under test to the Vcore value for that particular VM. Case 9

* The matrix is the same for either processor or cores.  The example shown is for cores.

 

 

Inputs

 

Parameter

Explanation

VM Divisor

(Optional)

A text value that will be interpreted as a number that will be used to divide the summed LURs.  Accepts tags as well as AA-specific tags.  If this value is non-numeric (after tags have been evaluated) or otherwise evaluates to 0, 1 will be used.

Divisor

(Optional)

A text value that will be interpreted as a number that will be used to divide the summed LURs.  Accepts tags as well as AA-specific tags.  If this value is non-numeric (after tags have been evaluated) or otherwise evaluates to 0, 1 will be used.

LUR Override

(Optional)

A text value that will be interpreted as the LUR count that should be returned by this function if no adjustment is made. This value will only be returned for Case 5 of the True results shown below.  This value accepts tags as well as AA-specific tags.  This override value will be returned for Case 5 only if this value evaluates to a number greater than 0.

An example of when an override should be specified is when an upstream rule definition determines the LUR count for this authorization and that LUR count might differ from the LUR count this routine will calculate.  Such would be the case when an upstream rule definition calculated LURs based on a high or low watermark core (or proc) value, and that calculation would differ from the calculation returned from this routine as this routine uses the current core (or proc) count.

Families

(Optional)

Optional parameter that expands the authorization search to all titles in the configured families.  This overrides the MSL under test.

Classes

(Optional)

Optional parameter that expands the authorization search to all titles in the configured classes.  This overrides the MSL under test and families if configured.

Minimum licenses for a physical machine

(Optional)

This setting is meant for licensing schemes that enforce a minimum license value, such as Microsoft SQL Server by core licensing.  This setting specifies the minimum licensing required to cover the current asset under test (if it is physical) or its physical parent (if it is virtual).

Leave blank or set to 0 to ignore this setting.  

You may use tags as well as AA-specific tags.

Minimum licenses for a virtual machine

(Optional)

This setting is meant for licensing schemes that enforce a minimum license value, such as Microsoft SQL Server by core licensing.  This setting specifies the minimum licensing required to cover the current asset under test (if it is virtual).

Leave blank or set to 0 to ignore this setting.  

You may use tags as well as AA-specific tags.

Use processors in calculations

This setting is checked to cause the adjustment calculations to be based on processor counts instead of core counts (the default is core counts).

Enforce chain harvest (Optional)

If selected, the authorization being created will have the chain harvest flag set.  If the parent authorization (the authorization under test) is harvested, then the newly spawned authorization will be deleted also.

Advanced reason code (Optional)

An advanced reason code can be assigned to authorizations that are altered by this function.

 

Outputs

 In all cases, an LUR of '-1' will be returned.  This will prevent housekeeping from attempting to adjust the LUR.

 

Result

Result Explanation

Confidence Adjustment

Return Value

Else

Case 1:

No physical parent is found

Y

Old LUR

True

Case 2:

Set/Create an authorization for the (highest order) MSLno  to Pcores on the physical asset and zero out the other VMs.

See matrix for details.

 

N

Old LUR

True

Case 3:

Do nothing.  See matrix for details.

N

Old LUR

True

Case 4:

Set/Create an authorization for the (highest order) MSLno  to Pcores on the physical asset and zero out the other VMs.

See matrix for details.

 

N

Old LUR

True

Case 5:

Set/Create an authorization for the (highest order) MSLno  to Pcores on the physical asset and zero out the other VMs.

See matrix for details.

 

N

Old LUR

True

Case 6:

Do nothing.  See matrix for details.

N

Old LUR

True

Case 7:

Set/Create an authorization for the (highest order) MSLno  to Pcores on the physical asset and zero out the other VMs.

See matrix for details.

 

N

Old LUR

True

Case 8:

If physical authorization:

 

    Zero out the vms

    and physical to pcompare

 

If no physical do something else:

 

Set the VM under test to the vCompare value for that particular VM.

N

Old LUR

True

Case 9:

Set the VM under test to the Vcore value for that particular VM.

N

Old LUR

Else

One of the pre-processing checks failed or a general processing error was encountered.  Check the thread log for details

Y

Old LUR