zhmcDeactivateLpar function


zhmcDeactivateLpar

zhmcDeactivateLpar (hmcname, lpar, force)

Issues a Deactivate Logical Partition to the HMC.

Parameters:

hmcname

The HMC session name.

lpar

The LPAR object as returned from zhmcGetLpars-function

force

true if the operation should be performed when the LPAR is not in an appropriate state

Returns:

An RDL2 object containing the job URI or false if an error occurred.

Example

function deactivateLpar(lparname)
hmcname = 'HMC5' status = false
lpar = findLpar(lparname)
if lpar != false then
status = zhmcDeactivateLpar(hmcname, lpar, false)
if status == false then
trace('Error: DeactivateLpar failed: ' & hmcGetLastError(), RED)
else
trace('DeactivateLpar for '' & lparname & '' returned ' & status, RED)
endif
else
trace('Error: LPAR '' & lparname & '' not found.', RED)
endif
return status

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*