Strict Method Memory Resize Request Failure

This example uses the strict method to perform a memory resizing operation. First, set the capped-memory:memlzr property value to strict to enable the strict method. Next, reduce the amount of RAM for the kz3 kernel zone to 4 Gbytes and apply the changes. This result shows that the commands fail to reduce the RAM size of kz3 to the requested 4 Gbytes because the strict value is in effect. As a result, the RAM size of the kz3 kernel zone is unchanged at 16 Gbytes and the zonecfg apply command returns 1.

# zonecfg -z kz3 "select capped-memory;set memlzr=strict;end"
# zonecfg -z kz3 info capped-memory
capped-memory:
physical: 16G
pagesize-policy: largest-available
memlzr: strict
# zonecfg -z kz3 "select capped-memory;set physical=4g;end"
# zoneadm -z kz3 apply
Checking: Modifying capped-memory physical=4G Applying the
changes
error: operation could not reach the required memory settings
and the memlzr property was set to 'strict' forcing the
operation to fail. Clear the capped-memory's memlzr property to
accept partial success.
error: Modifying capped-memory physical=4G failed
# echo $?
1
# zlogin kz3
# prtconf | grep Memory
Memory size: 16382 Megabytes