Question & Answer
Question
The virtual machines (called VMs or LPARs) on IBM Power servers maintain their processor and memory allocations when they are shut down. While this option is normal, and often preferred, so that the lpar can be restarted by using the current configuration setting, some admins need to release those resources for other tasks.
Answer
You can use the chhwres command on the HMC command line interface (CLI) to set the values for processors and memory allocations to 0. The HMC man page for chhwres has more information if you need it. The following text is extracted from the page, and includes some examples that should work.
When chhwres is used to remove memory or processing resources from a LPAR in a Not Activated state, if the amount of memory or processing resources falls below the minimum for the LPAR, the minimum, assigned and maximum values for the LPAR are all set to 0. Also, if the memory values for a partition are set to 0, the processing resource values for the partition will also be set to 0. Likewise, if the processing resource values for a partition are set to 0, the memory values for the partition will also be set to 0.
To add, remove, or move memory:
chhwres -r mem -m managed-system -o {a | r | m | s}
{-p partition-name | --id partition-ID}
[{-t target-partition-name |
--tid target-partition-ID}]
[-q quantity] [--entitled quantity]
[-w wait-time] [-d detail-level] [--force]
If you have a LPAR (ID 10) on a system called MySystem that is inactive, and holds 16G of memory, you can attempt to remove it using chhwres as follows:
chhwres -r mem -m MySystem -o s --id 10 -q 0
To add, remove, or move processing resources:
chhwres -r proc -m managed-system -o {a | r | m | s}
{-p partition-name | --id partition-ID}
[{-t target-partition-name |
--tid target-partition-ID}]
[--procs quantity] [--procunits quantity]
[-w wait-time] [-d detail-level] [--force]
If you have an lpar with ID 10 with 25 vCPUs and 2.5 PUs, you can attempt to set them to 0 using following
chhwres -r proc -m <MySystem> -o s --id 10 --procs 0 --procunits 0
To see the name of system run following query
lssyscfg -r sys -F name
To see the lpar IDs and names of LPARs run
lssyscfg -m <system name> -r lpar -F name,lpar_id
After you run the chhwres commands to set the processors and memory to 0 then use the lshwres command to double check.
lshwres -m <system name> -r proc --level lpar
lshwres -m <system name> -r mem --level lpar
You can either grep for the lpar's name or use the filter --filter lpar_names=<lpar name> to just list the desired lpar.
When chhwres is used to remove memory or processing resources from a LPAR in a Not Activated state, if the amount of memory or processing resources falls below the minimum for the LPAR, the minimum, assigned and maximum values for the LPAR are all set to 0. Also, if the memory values for a partition are set to 0, the processing resource values for the partition will also be set to 0. Likewise, if the processing resource values for a partition are set to 0, the memory values for the partition will also be set to 0.
To add, remove, or move memory:
chhwres -r mem -m managed-system -o {a | r | m | s}
{-p partition-name | --id partition-ID}
[{-t target-partition-name |
--tid target-partition-ID}]
[-q quantity] [--entitled quantity]
[-w wait-time] [-d detail-level] [--force]
If you have a LPAR (ID 10) on a system called MySystem that is inactive, and holds 16G of memory, you can attempt to remove it using chhwres as follows:
chhwres -r mem -m MySystem -o s --id 10 -q 0
To add, remove, or move processing resources:
chhwres -r proc -m managed-system -o {a | r | m | s}
{-p partition-name | --id partition-ID}
[{-t target-partition-name |
--tid target-partition-ID}]
[--procs quantity] [--procunits quantity]
[-w wait-time] [-d detail-level] [--force]
If you have an lpar with ID 10 with 25 vCPUs and 2.5 PUs, you can attempt to set them to 0 using following
chhwres -r proc -m <MySystem> -o s --id 10 --procs 0 --procunits 0
To see the name of system run following query
lssyscfg -r sys -F name
To see the lpar IDs and names of LPARs run
lssyscfg -m <system name> -r lpar -F name,lpar_id
After you run the chhwres commands to set the processors and memory to 0 then use the lshwres command to double check.
lshwres -m <system name> -r proc --level lpar
lshwres -m <system name> -r mem --level lpar
You can either grep for the lpar's name or use the filter --filter lpar_names=<lpar name> to just list the desired lpar.
[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]
Was this topic helpful?
Document Information
Modified date:
05 December 2019
UID
isg3T1025552