Func44_AdjustLURtoPhysical

<< Click to Display Table of Contents >>

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

Func44_AdjustLURtoPhysical

Description

This function is a specialty function 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).  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 the theoretical LURs, based on physical parameters, is returned.  

If there is an authorization against the physical asset for the same MSL title and that authorization is showing as fully licensing the physical machine, then if the authorization under test is a VM, LURs are returned as 0 (if there is a physical authorization and the physical machine is fully licensed, then any VMs presented will have their LURs zeroed out.)

If there is no authorization against the physical asset for the same MSL and the sum of all VM LURs exceeds what would be required to license the physical machine, then this function will cause the first VM authorization it analyzes to carry the full LUR count for the physical.  Once that has been established, any subsequent VM authorizations submitted for analysis will have their LURs returned as 0.  In essence, when there isn't a physical authorization record, one and only one of the VM authorizations will be used to carry the LURs required to license the physical machine and the rest will be set to zero (through subsequent analyze runs).

This function, while general in nature, was designed specifically to address IBM PVU counting.  However, this function can also be used for Microsoft SQL Server by core licensing (or any licensing where minimum licenses are required, such as Microsoft's 4 license per physical processor minimum or for core minimum requirements).

One thing to keep in mind, this function may take several analyze runs before it converges on all the correct values being stored in all of the participating authorization records.  It is possible, while waiting for all runs to finish, for the current deployed position to be temporarily overstated.

 

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 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 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) times the divisor value sent is returned as the LURs.

If the authorization under test is against one of the child VMs, and if an authorization exists against the physical parent and the LURs of that authorization equal the physical cores (or procs) times the divisor value sent, 0 is returned as the new LUR count of the VM.  (In essence the physical is completely licensed so any VM will not require licensing).

If the authorization under test is against one of the child VMs, if no authorization exists against the physical parent, and if any one of the current VMs has an LUR count equal to the physical cores (or procs) times the divisor value sent (meaning at least one VM is carrying the full licensing required for the physical machine), and the current authorization is not that VM, then the LURs will be returned as 0.  (In essence there is already a different VM carrying sufficient LURs to license the entire physical server, so no other VMs require LURs).

If the authorization under test is against one of the child VMs, if no authorization exists against the physical parent, no current VMs are carrying LURs that match the required physical licensing requirement, and the sum of all LURs across all child VMs exceeds the LURs required to license the physical machine, then the LURs required to license the physical machine will be returned.  That will cause the current VM's authorization to show sufficient LURs for the entire physical machine.

If the authorization under test is against one of the child VMs, if no authorization exists against the physical parent, no current VMs are carrying LURs that match the required physical licensing requirement, and the sum of all LURs across all child VMs is less than the LURs required to license the physical machine, and if the minimum physical license parameter value was substituted for the actual physical cores (or procs), then the minimum physical license value will be returned.

If the authorization under test is against one of the child VMs, if no authorization exists against the physical parent, no current VMs are carrying LURs that match the required physical licensing requirement, and the sum of all LURs across all child VMs is less than the LURs required to license the physical machine, then -1 will be returned (signalling no change to current LUR setting for the authorization under test)

 

Inputs

 

Parameter

Explanation

Divisor

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.

In the case of using this function for IBM PVUs, the divisor should be the current PVU count from the PVU look-up.

LUR Override

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.

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).

Advanced reason code (Optional)

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

 

Outputs

 

Result

Result Explanation

Confidence Adjustment

Return Value

True

Case 1:

Authorization under test is against a physical machine.

N

Physical cores (or procs) of parent x divisor

True

Case 2:

Authorization under test is against a child VM, there is an authorization for the same MSL title against the parent physical machine, and the LURs of the parent authorization exactly equal the physical core (or proc) count times the divisor value sent.  (Parent is fully licensed so VMs do not require licensing)

N

0

True

Case 3:

Authorization under test is against a child VM, there is no authorization for the same MSL title against the parent, at least one VM is carrying an LUR count that exactly equals the physical core (or proc) count times the divisor value sent, and that VM is not the current authorization under test. (A VM is carrying the full physical licensing so other VMs can be zeroed)

N

0

True

Case 4:

Authorization under test is against a child VM, there is no authorization for the same MSL title against the parent, there are no VMs carrying an LUR count that exactly equals the physical core (or proc) count times the divisor value sent, and the sum of all LURs across all VMs exceeds the physical core (or proc) count times the divisor value sent (VM LURs exceed physical requirements)

N

Physical cores (or procs) of parent x divisor

True

Case 5:

Authorization under test is against a child VM, there is no authorization for the same MSL title against the parent, there are no VMs carrying an LUR count that exactly equals the physical core (or proc) count times the divisor value sent, and the sum of all LURs across all VMs is less than the physical core (or proc) count times the divisor value sent.

N

LUR override (if > 0)

Otherwise, # Cores (or procs) this VM x divisor (or the minimum VM value if it is greater.)

True

Case 6:

Authorization under test is against a child VM, there is no authorization for the same MSL title against the parent, there are no VMs carrying an LUR count that exactly equals the physical core (or proc) count times the divisor value sent, the sum of all LURs across all VMs exactly equals the physical core (or proc) count times the divisor value sent, and the minimum physical license count parameter was substituted for the physical cores (or procs).

N

Minimum physical license value

False

Authorization under test is against a child VM, there is no authorization for the same MSL title against the parent, there are no VMs carrying an LUR count that exactly equals the physical core (or proc) count times the divisor value sent, and the sum of all LURs across all VMs exactly equals the physical core (or proc) count times the divisor value sent.

N

-1

(no change to existing LURs)

Else

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

Y

0