Modify Partition Resources (dlpar_set_resources) API


  Syntax:
#include <qpmlpmgt.h>
int dlpar_set_resources (void *attribute_value, int attribute_id);

  Service Program Name: QPMLPMGT

  Default Public Authority: *EXCLUDE

  Threadsafe: Yes

Modify Partition Resources (dlpar_set_resources) API is used to modify the configuration of the partition where this API was called. The API accepts the identifier of the partition configuration attribute intended to be modified and the new value for this attribute. The API modifies one partition configuration attribute at a time.

The modification of partition configuration attributes by the dlpar_set_resources() API is subject to configuration constraints that are enforced by the System i® hypervisor.


Authorities and Locks

*ALLOBJ special authority is required to change partition configuration.


Parameters

Configuration attribute value  (attribute_value)
INPUT; CHAR(*)

This parameter contains a new value for the configuration attribute identified by the Configuration attribute ID parameter. This value will have a different format depending on the configuration attribute being processed as follows:

Attribute Format
Processing capacity UNSIGNED BINARY(4)
Variable capacity weight UNSIGNED BINARY(4)
Interactive capacity UNSIGNED BINARY(4)
Number of virtual processors UNSIGNED BINARY(4)
Online memory UNSIGNED BINARY(8)

Interactive capacity is the new value for the portion of the physical machine interactive capacity this partition can use (in units of 1/100s of a percent).

Number of virtual processors is the new value for the number of virtual processors in this partition.

Online memory is the new value for partition online memory size (in megabytes).

Processing capacity is the new value for the partition's processing capacity (in units of 1/100 of a physical processor).

Variable capacity weight is the new value for the weighting factor that is used when assigning unused CPU cycles in the shared processor pool to the partition. This factor is in the range of 0 - 255.


Configuration attribute ID  (attribute_id)
INPUT; CHAR(*)

This parameter contains an ID of the configuration attribute to change. The following values are valid for this parameter.:

1 Processing capacity
2 Variable capacity weight
3 Interactive capacity
4 Number of virtual processors
5 Online memory

Return Value

Depending on whether the call was successful, there are several possible return values:

0 Request to change partition configuration was accepted.

Note that configuration change will happen asynchronously to the API call. Precise moment when actual configuration change is complete, is unpredictable.

It is possible that configuration change will only be partially satisfied, if system does not have enough resources to fulfill the request.

Negative value Request to change partition configuration failed. Return value is set to indicate the kind of error that prevented the change of the configuration attribute as follows:
-1
API was called with incorrect parameters.
-2
Configuration change was rejected because some LPAR configuration constraint was violated.
-3
Configuration change failed because of hardware fault.
-4
Configuration change failed because of insufficient authority.
-5
Configuration change failed because of unexpected exception. (See joblog for the details about exception.)


API introduced: V5R3

[ Back to top | Configuration APIs | APIs by category ]