The following are my accumulated notes concerning WPARs' (or Workload Partitions) configuration and administration, which is supported on AIX 6.1 and above. WPARs can be created on a dedicated or shared LPAR (Logical Partition), because the LPAR's operating system image and physical resources are shared with the WPAR. WPARs also provide the ability to further isolate a system's workload without creating a full LPAR.
bos.wpars
wio.common
wio.fcp
wio.vscsi
A system WPAR is a workload partition that has filesystems created in logical volumes, and its root volume group is created from the global WPAR. You can use the 'smitty simplewpar_sys' or 'mkwpar' commands to create a system WPAR.
A system WPAR can also be created with its own root volume group if one or more disk devices are allocated to the WPAR from the global WPAR. This is referred to as a rootvg system WPAR. Rootvg system WPARs can only be created by using/exporting/allocating fibre attached storage devices, fibre channel adapters, or virtual SCSI disks to the rootvg system WPAR.
1. Check the physical volume configuration. Use only disk devices that are in the available state.
lspv
2. Create and start a shared system WPAR with rootvg:
mkwpar -s -n WPAR_name -D rootvg=yes devname=hdisk_number
*Note: If hdisk_number is currently in a non-rootvg volume group, overwrite the non-rootvg volume group during WPAR creation:
mkwpar -s -n WPAR_name -D rootvg=yes devname=hdisk_number -O
1. Check the physical volume configuration. Use only disk devices that are in the available state.
lspv
2. Create and start a detached system WPAR with rootvg:
mkwpar -s -n WPAR_name -D rootvg=yes devname=hdisk_number -l
After the WPAR's creation, use the 'chwpar' command to change the WPAR's disk configuration.
CRE (Compatibility Runtime Environment) WPAR is a system WPAR running AIX 5.2 or AIX 5.3 binaries and libraries on a global WPAR running AIX 7.1 or higher. It is also known as a VWPAR (Versioned Workload Partition). A CRE WPAR should be created as a detached system WPAR, due to /usr. /opt, and /var running AIX 5.2/5.3 binaries and libraries. The following filesets need to be installed on the global WPAR before creating the CRE WPAR:
bos.wpars
vwpar.52
vwpar.53
vwpar.common
vwpar.images.52
vwpar.images.53
vwpar.images.base
wio.common
wio.fcp
You can load the AIX 5.2/5.3 environment from a mksysb image during the CRE WPAR's creation using the following command:
mkwpar -B /WPAR_mksysb_file -C -A -r -v -s -N address=network_address -n WPAR_name -D devname=hdisk_number -D devname=hdisk_number rootvg=yes -l
*Note: Possible numeric values for OStype:
OStype = 0 (Native or the same as global WPAR's oslevel)
OStype = 1 (AIX 5.2)
OStype = 1024 (AIX 5.3)
Bootset is a set of disk(s) or filesystem(s) that are used for boot by the rootvg system WPAR. A disk or filesystem that belongs to a bootset can NOT be removed unless the bootset is removed first. The maximum value for the bootset ID is 8.
WPARs can be created with its own network configuration. This enables the administrator to further isolate the WPAR's network traffic, and meet specific network security requirements. WPARs with their own network configuration can use physical interfaces, virtual interfaces, etherchannels, and virtual local area network (VLAN) interfaces. Unless specified, WPARs created with its own network configuration are classified as IPv4.
WPARs can also be created with its own network routing table.
1. Run 'autoconf6' on the global WPAR to get the link local IP address on the global WPAR:
Make note of network address beginning with 'fe80::'
netstat -in
Make note of the one line beginning with 'inet6' (which is the local IPv6 address):
ifconfig en0
Start and check the Neighbor Discovery Protocol daemon:
startsrc -s ndpd-host
lssrc -s ndpd-host
Temporarily enable IPv6 forwarding:
no -o ip6forwarding=1
ifconfig en0
2. To create and start a detached rootvg system WPAR using an IPv6 network address:
lspv
mkwpar -A -r -v -s -n WPAR_name -N address6=IPv6_local_address_beginning_with_'fe80::'_incremented_by_one interface=en_number prefixlen=The_number_in_the_global/local_IPv6_address_that_is_followed_by_a_forward_slash(/) -D devname=hdisk_number rootvg=yes -l
*Note: 'topas -@ WPAR_name' was run simultaneously as the 'ping wpar' command in a different telnet session.
Enhanced RBAC (Role based access control) can be administered on a WPAR, and increases the security threshold on the WPAR. Enhanced RBAC needs to be enabled on the global WPAR before it can be administered on the WPAR.
1. On the global WPAR, create authorizations for the role:
mkauth new_authorization_name
OR
smitty rbac
# mkauth test_wpar
2. Set the role to the RBAC user on the global WPAR:mkrole authorizations=new_authorization_name new_role_name
# mkrole authorizations=test_wpar wpar_role
# mkuser roles=wpar_role marie
An application WPAR hosts one or more applications. The 'wparexec' command creates the application WPAR. The command used to start an application(s) will be used as the argument for the 'wparexec' command. Once the application(s) exits, that specific application WPAR ceases to exist. An application WPAR will share the global WPAR's filesystem, and will NOT run system service daemons.
A user can test an application WPAR's functionality by using AIX performance statistical commands as an argument to the 'wparexec' command:
# wparexec -v -n WPAR_name /full_path_of_the_command_that_preferably_runs_for_some_time
appwpar configuration: @lcpu=8 @mem=4352MB @ent=2.00
kthr memory page faults cpu time
----------- --------------------- ------------------------------------ ------------------ ----------------------- --------
@ @ @ @ @
r b p avm fre fi fo pi po fr sr in sy cs us sy id wa pc ec hr mi se
0 0 0 277483 204786 0 0 0 0 0 0 0 2 1 18 82 - - 0.00 0.0 15:41:11
0 0 0 277488 204778 0 0 0 0 0 0 0 2 1 2 98 - - 0.00 0.0 15:43:11
0 0 0 277489 204775 0 0 0 0 0 0 0 2 0 3 97 - - 0.00 0.0 15:45:11
0 0 0 277528 204732 0 0 0 0 0 0 0 2 0 2 98 - - 0.00 0.0 15:47:11
0 0 0 277529 204730 0 0 0 0 0 0 0 2 0 36 64 - - 0.00 0.0 15:49:11
0 0 0 277565 204715 0 0 0 0 0 0 0 2 1 2 98 - - 0.00 0.0 15:51:11
0 0 0 277567 204710 0 0 0 0 0 0 0 2 1 2 98 - - 0.00 0.0 15:53:11
0 0 0 277567 204732 0 0 0 0 0 0 0 2 0 14 86 - - 0.00 0.0 15:55:11
0 0 0 277606 204690 0 0 0 0 0 0 0 2 0 3 97 - - 0.00 0.0 15:57:11
0 0 0 277607 204687 0 0 0 0 0 0 0 2 0 3 97 - - 0.00 0.0 15:59:11
Name State Type Hostname Directory RootVG WPAR
----------------------------------------------------------------------------------------------------
appwpar A A appwpar / no