AIX Wpar PDF
AIX Wpar PDF
IBM
AIX Version 7.2
IBM
Note
Before using this information and the product it supports, read the information in Notices on page 45.
This edition applies to AIX Version 7.2 and to all subsequent releases and modifications until otherwise indicated in
new editions.
Copyright IBM Corporation 2015.
US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
About this document . . . . . . . .. v Configuring networks for system WPARs . .. 26
Highlighting . . . . . . . . . . . . .. v Configuring resource controls for system WPARs 29
Case-sensitivity in AIX . . . . . . . . . .. v Using specification files for system WPARs . .. 30
ISO 9000. . . . . . . . . . . . . . .. v Using an image.data file for system WPARs .. 30
Configuring application WPARs . . . . . .. 30
IBM Workload Partitions for AIX . . .. 1 Creating an application WPAR . . . . . .. 31
Configuring directories and file systems for
What's new in IBM Workload Partitions for AIX .. 1
application WPARs . . . . . . . . . .. 31
WPAR concepts . . . . . . . . . . . .. 1
Configuring networks for application WPARs .. 32
Differences in the WPAR environment . . . .. 1
Configuring resource controls for application
Restrictions and limitations in the WPAR
WPARs . . . . . . . . . . . . . .. 33
environment . . . . . . . . . . . .. 2
Working with specification files for application
Devices . . . . . . . . . . . . . .. 3
WPARs . . . . . . . . . . . . . .. 33
Networking. . . . . . . . . . . . .. 4
Managing WPARs . . . . . . . . . . .. 34
Global environment . . . . . . . . . .. 4
Listing WPARs . . . . . . . . . . .. 34
System WPARs . . . . . . . . . . .. 4
Listing WPAR identifiers . . . . . . . .. 34
Security . . . . . . . . . . . . . .. 8
Logging in to a WPAR. . . . . . . . .. 35
Resource controls . . . . . . . . . . .. 9
Backing up WPARs . . . . . . . . . .. 35
Versioned workload partitions . . . . . . .. 11
Restoring WPARs . . . . . . . . . .. 36
Requirements for versioned WPARs . . . .. 11
Removing WPARs . . . . . . . . . .. 36
Installing support for versioned WPAR . . .. 12
Stopping WPARs . . . . . . . . . .. 37
Restrictions and limitations within a versioned
Recovering detached WPARs that are
WPAR . . . . . . . . . . . . . .. 12
incompatible . . . . . . . . . . . .. 37
Creating a versioned WPAR . . . . . . .. 13
Managing software with detached WPARs . .. 38
Devices in WPARWPARs . . . . . . . . .. 16
Installing Apache in a WPAR . . . . . . .. 39
Deploying a storage device . . . . . . .. 18
Using the Advanced Accounting subsystem with
Allocating a device . . . . . . . . . .. 18
WPARs . . . . . . . . . . . . . . .. 39
Configuring a device in a WPAR . . . . .. 19
Using the trace facility with WPARs . . . . .. 39
Managing file systems for a device . . . .. 20
Making software available to other WPARs . . .. 40
Application WPARs . . . . . . . . . .. 20
Modified and enhanced AIX commands for WPARs 40
File systems for application WPARs . . . .. 21
Configuring system WPARs . . . . . . . .. 21
Creating a system WPAR . . . . . . . .. 21 Notices . . . . . . . . . . . . .. 45
Naming the system WPAR . . . . . . .. 25 Privacy policy considerations . . . . . . .. 47
Starting system WPARs . . . . . . . .. 25 Trademarks . . . . . . . . . . . . .. 47
Configuring directories and file systems for
system WPARs . . . . . . . . . . .. 25 Index . . . . . . . . . . . . . .. 49
Highlighting
The following highlighting conventions are used in this document:
Bold Identifies commands, subroutines, keywords, files, structures, directories, and other items whose names are
predefined by the system. Also identifies graphical objects such as buttons, labels, and icons that the user
selects.
Italics Identifies parameters whose actual names or values are to be supplied by the user.
Monospace Identifies examples of specific data values, examples of text similar to what you might see displayed,
examples of portions of program code similar to what you might write as a programmer, messages from
the system, or information you should actually type.
Case-sensitivity in AIX
Everything in the AIX operating system is case-sensitive, which means that it distinguishes between
uppercase and lowercase letters. For example, you can use the ls command to list files. If you type LS, the
system responds that the command is not found. Likewise, FILEA, FiLea, and filea are three distinct file
names, even if they reside in the same directory. To avoid causing undesirable actions to be performed,
always ensure that you use the correct case.
ISO 9000
ISO 9000 registered quality systems were used in the development and manufacturing of this product.
WPARs secure and isolate the environment for the processes and signals that are used by enterprise
applications.
In this PDF file, you might see revision bars (|) in the left margin that identifies new and changed
information.
December 2015
The following information is a summary of the updates made to the WPAR topics collection.
v Added the following note to creconfig-create-wpar topic.
Note: The mkwpar command is not supported on a system that has Trusted Computing Base (TCB)
installed.
WPAR concepts
The workload partition (WPAR) environment is different from the standard AIX operating system
environment. Various aspects of the system, such as networking and resource controls, function
differently in the WPAR environment.
The WPAR information describes how to install applications in a WPAR environment using various
applications such as Apache, DB2 and WAS. These examples are not intended to imply that they are the
only supported versions or configurations of these applications.
If the WPAR Manager licensed program is installed, there are additional restrictions on WPARs that are
enabled for live mobility:
v The WPAR must either be a rootvg WPAR or NFS-based.
v The WPAR cannot have kerberos-protected NFS mounts.
v DMAPI cannot be used within the WPAR.
v Applications within the WPAR cannot use raw logical volume or disks.
v Applications cannot access /dev/mem or /dev/kmem.
v The WPAR cannot have kernel extensions exported to them.
v Files which have been mapped cannot be unlinked at the time of mobility.
v Processes cannot have stopped or debugged threads at the time of mobility.
v Processes which have been launched from the clogin command cannot exist at the time of mobility.
Devices
To function properly, some applications require the use of system devices.
You can export a limited set of devices or storage adapters to one or more partitions. Devices that can be
exported include Fibre-Channel attached storage devices such as SCSI disk, CD, and tape devices.
Applications that require access to non-exportable devices are restricted to running in the global
environment. The following pseudo devices are exported to WPARs by default:
v /dev/audit
v /dev/clone
v /dev/console
v /dev/error
v /dev/errorctl
v /dev/null
v /dev/nvram
v /dev/random
v /dev/sad
v /dev/tty
v /dev/urandom
v /dev/xti/tcp
v /dev/xti/tcp6
v /dev/xti/udp
v /dev/xti/udp6
v /dev/xti/unixdg
v /dev/xti/unixst
v /dev/zero
Devices that are exported to workload partitions must operate safely and securely in the WPAR
environment.
Related concepts:
Devices in WPARWPARs on page 16
Different types of devices are supported by the AIX operating system, although the support of devices in
the WPAR is limited to fiber-attached storage devices, fiber channel adaptors, and virtual Small
Computer System Interface (SCSI) disks.
If the name of the WPAR resolves to a network address, that address is used as the default network
address for the WPAR. You can create a WPAR with no network addresses assigned. In this case, the only
external mechanism to access the partition is the clogin command from the global environment. The
clogin command provides a limited function terminal to access the WPAR. It is suggested that WPARs be
configured to at least have a private network configured from the global environment so that a network
login function such as rlogin or telnet can be used to access the WPAR.
Related tasks:
Configuring networks for system WPARs on page 26
You can configure the network for a system WPAR using the -h flag or the -N flag for the mkwpar
command or the chwpar command.
Configuring networks for application WPARs on page 32
You can configure the network for an application WPAR using the -h flag and the -N flag for the
wparexec command or the chwpar command.
Global environment
The global environment has an all-encompassing view of processes, IPC, file systems, devices, and other
user-level objects and system-level objects within an AIX operating system.
This environment allows you to view and interact with processes, file systems and other system
components that are assigned to an active WPAR on the system. The global environment is the same as
the traditional AIX login environment.
You can create new WPARs only in the global environment. You cannot create new WPARs in other
WPARs. Many administrative tasks can be performed only from the global environment. Many
commands also behave differently when they are run in the global environment than they do in the
WPAR environment.
System WPARs
System WPARs are autonomous virtual system environments with their own private file systems, users
and groups, login, network space and administrative domain.
Most traditional system services are virtualized at the WPAR level, and they can be independently used
and managed within each WPAR. While the system WPAR environment is largely partitioned and
isolated, read-only file systems might be shared between WPARs to facilitate the sharing of application
data and text. Versioned WPARs can only be non-shared system WPARs.
You can also configure a non-shared system WPAR by specifying writable file systems of one of the
following types for the /usr file system and the /opt file system:
v directory
v jfs
v jfs2
v nfs
If you create a non-shared system WPAR, all files from the /usr file system and the /opt file system in
the global environment are copied to the WPAR. The administrator must allocate enough space in the
WPAR file systems for the files.
System software in non-shared system WPARs must be kept at the same system level as the global
environment in order to avoid unexpected results.
Related concepts:
Recovering detached WPARs that are incompatible on page 37
It is possible that the system software in a detached workload partition (WPAR) might become
incompatible with the levels of system software in the global environment. This occurs if software
installation and maintenance tasks are performed independently in the global environment and the
WPAR, or if a WPAR backup image from an incompatible system level was installed.
Related information:
Installing and managing software with detached WPARs
System WPARs can be created with local file system spaces, which are constructed from isolated sections
of the file system space for the global environment or with a WPAR owned root volume group.
When the system WPAR isolates the file system spaces, each file system is owned and managed by the
global environment. For a WPAR owned root volume group, dedicated storage devices must be allocated
to the WPAR and each file system is owned and managed by the WPAR.
The default location for the file system spaces is in the /wpars directory of the global environment. The
initial process for each WPAR is moved to the correct path in the global file system using the chroot
command. All processes run within the WPAR and appear in the base directory for the WPAR. For
example, users in a WPAR would see the /wpars/part1/usr directory as the /usr directory.
The file system configuration for a WPAR is specified when the WPAR is created. You can either use the
system defaults or customize each file system. Some of the file systems in a system WPAR are local to the
partition while others can be shared with the global environment.
The following JFS2 file systems are created with inline logs and populated similar to a stand-alone AIX
system with the following sizes:
v / (64 MB)
v /tmp (96 MB)
v /var (128 MB)
v /home (32 MB)
The following JFS2 file systems are shared from the global environment using namefs mounts with the
following permissions:
v /usr (read-only permissions)
v /opt (read-only permissions)
v /proc (read/write permissions)
You can specify the use of a flat file system structure for part or all of a WPAR namespace by specifying
that one or more directories can be local to a parent directory. This structure means that no distinct file
system is created for the parent directory. The sizes of the file systems or directories to be populated in
the WPAR must be large enough to hold the files for that partition. This structure simplifies the number
of file systems to manage for a partition, but it loses the granularity of control over user files populating
the file system. The flat file system structure might be a viable option for servers running in the WPAR
that do not offer system login privileges to users.
When a system WPAR is created with its own root volume group by using the mkwpar command with
the D flag and specifying the disk name devname=hdisk name and the rootvg=yes option, the root file
systems are created in a separate volume group that is owned and managed by the WPAR. For example,
two disks can be allocated for the root volume group by using these options -D devname=hdisk5
rootvg=yes -D devname=hdisk6 rootvg=yes. The following JFS2 file systems are created within the
WPAR-owned root volume group with inline logs, and populated similar to a stand-alone AIX operating
system:
v /
v /admin
v /home
v /tmp
v /var
Note: The initial sizes of these file systems can change depending on the system requirements and
storage characteristics.
If a non-shared system WPAR is created that owns the root volume group, the /usr file system and /opt
file system are created and populated within the WPAR owned root volume group. Versioned WPARs
always have non-shared /usr and /opt file systems. Otherwise, the /usr file system and /opt file system
are shared from the global environment by using namefs mounts.
Note: The logical volume names used within a rootvg WPAR are the same as those typically used on an
AIX system. For example, /dev/hd4 would be the logical volume name for the root / file system and
/dev/hd11admin for the /admin file system.
The WPAR administrator can change the file system characteristics of any file system that resides within
the WPAR-owned root volume group.
When a WPAR is created as a system copy from an AIX system or AIX system image, the file systems
included in the WPAR are based on the file systems in the root volume group of the source.
If the source for creating the WPAR is an AIX system backup image, the file systems included by default
in the system copy WPAR are the file systems that are listed in the image.data file from the system
If the source for creating the WPAR is a running AIX system rather than a system backup image, the
default file systems for the WPAR are the mounted file systems from the rootvg of the global system,
with the following exceptions:
v File systems associated with WPARs are not included by default. You can override this setting by using
the -T preserve_wpars=yes option to the mkwpar command or by setting preserve_wpars=yes in a
copy_controls stanza of a WPAR specification file.
v The /usr and /opt file systems from the global system are not copied if the WPAR is created as a
shared WPAR. If the WPAR is created with the -l option or if the privateusr=yes attribute is set in the
general stanza of a WPAR specification file, the /usr and /opt file systems are copied into the WPAR.
Otherwise, the WPAR mounts the /usr and /opt file systems in read-only mode from the global
system.
Rootvg WPARs
A system WPAR which is configured with its own root volume group on one or more dedicated storage
devices is called a rootvg WPAR. Configuring a rootvg WPAR gives the WPAR administrator complete
control over managing the storage devices exported to the WPAR, the volume groups on those devices,
and the logical volumes and file systems within those volume groups. A system WPAR which is not a
rootvg WPAR does not have its own root volume group, but has file systems created in logical volumes
created out of the root volume group of the global system.
For a rootvg WPAR, storage devices must be exported (or allocated) to the WPAR when it is created.
After it has been created, the chwpar command can be used to allocate additional disks to the WPARs
root volume group or, if it contains multiple disks, to deallocate a disk from the WPARs root volume
group. It is not possible to change a WPAR without its own root volume group into a rootvg WPAR after
it has been created.
Rootvg WPARs can be configured to support live application mobility when used in combination with
IBM PowerVM Workload Partitions Manager for AIX.
A configuration with a WPAR owned root volume group (a RootVG WPAR) helps to isolate the file
systems and volume groups of a WPAR from the global system.
A WPAR whose file systems are all NFS mounted or all SAN based is eligible for Live Application
Mobility, wherein a workload running in a WPAR on one LPAR might be moved to another compatible
LPAR and execution resumed at the same point. This relocation of a WPAR involves moving its
executable code to the target LPAR, while keeping the application data on the same storage devices.
Thus, the storage devices containing the file systems must be visible and accessible from both LPARs.
Note: IBM PowerVM Workload Partitions Manager for AIX (WPAR Manager) is required for WPAR
mobility.
A typical configuration might include two SAN based disks containing the rootvg of the WPAR, with a
third SAN based disk exported to the WPAR and containing a separate volume group with application
data. This gives the WPAR administrator complete control over creating new file systems or resizing the
existing file systems within those volume groups. If the intent is to be able to relocate the WPAR, the
WPAR Manager can be used to create the WPAR, as well as to move it between LPARs.
Related concepts:
Devices in WPARWPARs on page 16
Different types of devices are supported by the AIX operating system, although the support of devices in
the WPAR is limited to fiber-attached storage devices, fiber channel adaptors, and virtual Small
Computer System Interface (SCSI) disks.
File systems for system WPARs on page 5
System WPARs have their own file systems similar to stand-alone AIX.
Related tasks:
Creating a writable directory under a shared directory on page 26
You can create a writable directory beneath a shared directory using a symbolic link from the global
environment.
A system copy WPAR contains configured files and file systems directly from its source. A system copy
WPAR differs from a standard system WPAR because it contains the files and file systems from the root
volume group of the source system. A standard WPAR is created as a newly installed system by installing
new and unconfigured root parts of filesets into a default set of files.
Related concepts:
File systems for system WPARs on page 5
System WPARs have their own file systems similar to stand-alone AIX.
Creating a WPAR as a system copy on page 23
Instead of installing a WPAR with the default set of files, you can create a WPAR as a copy of an existing
system.
Security
WPARWPARs provide an isolated application environment that minimizes potential interactions with
system objects or processes outside the WPAR. Even though a WPAR is using the same operating system
instance as other WPARs or the global environment, the ability to view or interact with processes or
devices outside the partition is limited.
In system workload partitions, the ability to interact with the global environment's file systems is limited.
For non-persistent system objects, such as IPC and processes, constraints are implemented in the
following ways:
v Marking system objects as being owned by an individual WPAR
Interaction with persistent objects, such as files and devices, is also limited by maintaining separate file
systems local to an individual partition. For persistent objects, constraints are implemented in the
following ways:
v Creating and mounting unique file systems separate from file systems available in other WPARs
v Mounting shared, read-only file systems using the namefs mount type from the global environment
v Maintaining an environment within the local file system mounts for all processes using the chroot
command
WPAR isolation
System WPARs and application WPARs are isolated from other partitions. Users cannot subvert the
isolation constraints.
WPAR isolation also prevents users from performing the following administrative tasks:
v Adjusting the system clock
v Manipulating process accounting
v Binding processes to a specific processor
v Exceeding certain system limits, even by privileged users
v Using fine grain timers less than 10 milliseconds
v Loading or unloading system-level device drivers or kernel extensions
v Manipulating system paging space and certain system-level tuning parameters
v Using certain file system-level operations, such as extension, contraction, or defragmentation
System workload partitions are integrated with the AIX RBAC system, so each system workload partition
can have security privileges assigned. The settings are not applicable for application workload partitions.
Note: Workload partition isolation can also constrain the use of computational resources, such as system
memory and processor processing time.
Resource controls
WPARs support up to 8192 resource-controlled workload partitions. The number of non-resource-
controlled WPARs that can be created is constrained only by the availability of global environment
memory and disk space resources. However, a maximum of 8192 can be active at any time.
You can change the resource controls for a WPAR dynamically using the chwpar command. If the process
or thread limit is reduced on an active WPAR, processes or threads are not terminated, but new process
or thread creation is not allowed until the total count falls below the specified limit. For example, if a
WPAR has 200 active processes and you change the total process limit on the WPAR to 170, then the
system will not terminate the extra 30 processes. New process creation within the WPAR is not allowed
until the process count falls below 170. You can enable resource controls for a WPAR when it is created.
You can also change the controls on an existing WPAR using SMIT or using the chwpar command with
the -R active = yes option.
Related tasks:
You can use share-based allocation or percentage-based allocation for processor and memory resources.
Note: Both share-based controls and percentage-based controls can be specified. In the event of conflict,
the percentage-based controls take precedence.
Share-based allocation
The percentage of CPU or memory to allocate to the WPAR is determined by dividing the
number of shares by the total number of shares allocated to all active WPARs. The number of
shares represents how much of a particular resource a WPAR receives relative to the other
WPARs.
For example, if there are three active WPARs (A, B, and C) with shares for a particular resource
of 15, 10, and 5, allocation targets would be the following:
WPAR A, 15/30 or 50%
WPAR B, 10/30 or 33%
WPAR C, 5/30 or 17%
Allocation targets adjust with the number of active workload partitions. If partition A is inactive,
then the allocation targets would be the following:
WPAR B, 10/15 or 66%
WPAR C, 5/15 or 33%
Share-based allocation is specified by using the shares_CPU option with the mkwpar command
or the chwpar command.
Percentage-based allocation
The percentage of CPU or memory to allocate to the WPAR is determined by the following
user-specified values:
min%
The minimum amount of a resource that should be made available to the WPAR. If the actual
consumption is below this value, the WPAR will be given highest priority access to the
resource. The possible values are 0 to 100, with a default value of 0.
soft%
The maximum amount of a resource that a WPAR can use when there is contention for that
resource. If the WPAR's consumption exceeds this value, the WPAR will be given the lowest
priority access to the resource. If there is no contention for the resource, the WPAR is allowed
to consume as many resources as it requires. The possible values are .01 to 100, with a default
value of 100.
hard%
The maximum amount of a resource that a WPAR can consume, even when there is no
contention. If the class reaches this limit, it will not be allowed to consume any more of the
resource until its consumption percentage falls below the limit. The possible values are .01 to
100, with a default value of 100.
Note: Using hard maximum limits can have a significant impact on system or application
performance if not used appropriately. Because imposing hard limits can result in unused
system resources, in most cases, soft maximum limits are more appropriate.
Support for AIX 5.2 or AIX 5.3 versioned WPARs requires installation of additional licensed program
products:
v AIX 5.2 workload partitions for AIX 7
v AIX 5.3 workload partitions for AIX 7
The versioned WPARs do have some limitations as compared to local system WPARs. A versioned WPAR
has a runtime environment from an older AIX system backup and runs on a global system with a newer
level of AIX. The AIX commands and libraries inside the WPAR support the older AIX level's syntax and
semantics, even though the AIX kernel on the system is running a newer level. Applications running in
the versioned WPAR need not be aware that the global system is a different version. However, there are
some limitations related to running in any WPAR that might affect some applications.
A mksysb backup of a system running the earlier version of AIX is used to create the versioned WPAR.
Applications running in a versioned WPAR use the commands and libraries from the operating system
files where the backup was made to create the versioned WPAR. If you have applications that have not
been certified on newer versions of the AIX operating system, the versioned WPAR commands and
libraries provide a way to run them in the original AIX environment on top of an AIX 7.1 kernel. Such a
setup allows running those applications on currently available hardware that might not support the use
of the older AIX level as the base operating system. A versioned WPAR is always a system WPAR and is
not shared. Versioned WPARs own writable /opt and /usr file systems.
SMIT panels for administering versioned WPARs are available using SMIT fast path vwpar.
The product media contains required installation images to support the creation of versioned workload
partitions along with optional software which provides System Management Interface Tool (SMIT)
support for creating and managing versioned WPARs.
To install the required image support for versioned WPARs from CD, use the following command:
installp -acXY -d /dev/cd0 vwpar.images
If you have also purchased and installed IBM Systems Director with the Workload Partition Manager
plugin and plan to use Live Application Mobility to move AIX versioned WPARs from one system to
another, then all of the vwpar.images from the level of versioned WPAR being moved must also be
installed on any system to which a versioned WPAR is to be moved.
If you have AIX 5.2 Workload Partitions for AIX 7 version 1.1.0, run the following command:
ODMDIR=/usr/lib/objrepos odmget overlay | awk $1=="path" {print $3}
Unlike local system WPARs, it is possible for applications running within a versioned WPAR to access a
limited number of symbols through the /dev/kmem interface in read-only mode. The accessible symbols
are as follows:
v avenrun
v cpuinfo
v enter_dbg
v iostat
v pacefork
v sysinfo
v tickadj
Versioned workload partitions use the device configuration methods from the global logical partition
(LPAR), because they depend on device drivers in the kernel and therefore must have a compatible
version. However, there is predefined device configuration data that the configuration methods depend
on that is maintained separately in the WPAR, because all versioned WPAR are detached WPAR with
their own private copy of the /usr file system, which stores the device configuration data. This might
cause issues if the predefined device data in the WPAR is out of sync with the corresponding data in the
LPAR, because data on which the configuration methods depend might be incorrect or missing. This
out-of-sync condition occurs when the global LPAR is updated and the updates include new or changed
predefined device data. It can also occur if the global LPAR base level is newer than the AIX release that
was current when the vwpar product was shipped. The static updates to the predefined device data
when the vwpar filesets are installed in the WPAR do not include the most recent data. The predefined
device configuration data in the WPAR might be synchronized with the global LPAR by using the -c
option of the syncwpar command.
Related concepts:
Restrictions and limitations in the WPAR environment on page 2
This section lists the restrictions and limitations in the WPAR environment.
| Note: The mkwpar command is not supported on a system that has Trusted Computing Base (TCB)
| installed.
Each WPAR has an isolated network environment with unique IP addresses and a unique host name. You
can access WPARs through standard networking programs, such as telnet, FTP, and rlogin (depending on
the services running in the WPAR). Before you create a WPAR, you must log in as the root user and
perform one of the following prerequisites:
v Select a name for the WPAR that maps to an IP address for your network.
v Add an entry for the new versioned WPAR to the /etc/hosts file on the server. The entry must
include the host name for the WPAR and the name of the WPAR:
9.3.18.10 WPARname.austin.ibm.com WPARname
It continues restoring all files from the mksysb image. Each system WPAR has an isolated section of
the system's file space configured for the root directory, the /home directory, the /usr directory and
other file systems. Creation and configuration of this space is reflected in the above output from the
mkwpar command. After restoring all the files, the output from the mkwpar command then
continues with the installation of several file sets into the WPAR. At the end of the installation phase,
you can see an output similar to the following (The sample output shown below is from creation of
an AIX 5.2 WPAR):
installp: APPLYING software
for: vwpar.52 7.1.0.0 .
. .
Copyright
International Business Machines Corp. 2010. All
+-----------------------------------------------------------------------------+
Summaries:
+-----------------------------------------------------------------------------+
Installation Summary
--------------------
Name Level Part Event Result
-------------------------------------------------------------------------------
bos.wpars 7.1.0.0 USR APPLY SUCCESS
bos.wpars 7.1.0.0 ROOT APPLY SUCCESS
wio.common 7.1.0.0 USR APPLY SUCCESS
wio.common 7.1.0.0 ROOT APPLY SUCCESS
vwpar.52 7.1.0.0 USR APPLY SUCCESS
vwpar.52 7.1.0.0 ROOT APPLY SUCCESS
Workload partition WPARname created successfully.
mkwpar: 0960-390 To start the workload partition, execute the following as root:
startwpar [-v] WPARname
If you have purchased and installed IBM Systems Director with the Workload Partition Manager plug-in
and plan to use Live Application Mobility to move versioned WPARs from one system to another, then
vwpar.images for that level of versioned WPAR must also be installed on any system that a versioned
WPAR is to be moved to.
Preparing an AIX 5.2 versioned Workload Partition for Live Application Mobility
For AIX 5.2 workload partitions, the versioned WPAR must first be created, then the following software
must be applied within each versioned WPAR environment that is to be configured for live mobility:
v APAR IZ72315
v APAR IZ90201
The required system updates for preparing an AIX 5.2 versioned Workload Partition for Live Application
Mobility are included on the AIX 5.2 WPAR product media in the aix52_updates directory. To copy these
images to the AIX 5.2 versioned WPAR, mount the product media into a directory on the global system,
then copy all of the images from the aix52_updates directory to the AIX 5.2 WPAR, as in the following
example for AIX 5.2WPAR my52wpar:
# mount -vcdrfs /dev/cd0 /mnt
# startwpar my52wpar
# mkdir /wpar/my52wpar/tmp/aix52_updates
# cp /mnt/aix52_updates/* /wpar/my52wpar/tmp/aix52_updates
The software for APAR IZ72315 and APAR IZ90201 is included on the product installation media under
directory /aix52_updates.
Preparing an AIX 5.3 versioned Workload Partition for Live Application Mobility
For AIX 5.3 workload partitions, the software to enable live application mobility for a AIX 5.3 WPAR
might either be applied to the AIX 5.3 system from which the system backup image is derived, or it
might be applied within the AIX 5.3 workload partitions. The following software update must be applied
before live application mobility can be enabled for the AIX 5.3 workload partitions:
v APAR IZ89583
Additional options that can be used to control the file system characteristics of a versioned WPAR follow:
-g Set the default volume group to use for the WPAR. The default is rootvg.
-L shrink=yes
Use only the minimum file system space for the WPAR.
-L ignore_lvs=no
Use the logical volume characteristics from the backup for the WPAR. Use this option only if you
have a good understanding of LVM, because the characteristics from the backup can conflict with
logical volumes on the target system.
-L image_data=none
Ignore all file system characteristics from the backup. There must be -M mount specifications for
the base file systems (/, /usr /opt, /home, /tmp, and /var) in this case or else the default
characteristics for a regular WPAR are used.
Network considerations: Network characteristics from a restored system are not preserved. The network
characteristics are established from the network and host name specifications that were used when the
system created the versioned WPAR.
Devices in WPARWPARs
Different types of devices are supported by the AIX operating system, although the support of devices in
the WPAR is limited to fiber-attached storage devices, fiber channel adaptors, and virtual Small
Computer System Interface (SCSI) disks.
Inactive WPAR
With an inactive WPAR, a storage device can be allocated and de-allocated to any number of
WPARWPARs. The first WPAR that starts takes ownership of the device, which means that device will be
Active WPAR
There are two ways that a device can be allocated to an active WPAR.
v If a device is not in use by another WPAR, the cfgmgr command allocates the device to the WPAR and
makes the device available for use in the WPAR.
v If a device is in use by another WPAR, it is added to the WPAR file configuration. This device is not
made accessible to the WPAR because it is already in use by another WPAR.
When an active WPAR has control of a device, the device is in the defined state in the global
environment. No configuration operations are allowed on the device as long as it is in the global
environment. Commands such as mkdev, chdev, rmdev, and cfgmgr will not work on the device. In order
for the global environment to take control of the device, it has to be deallocated from the WPAR that has
control over it.
The disk drives that are supported in a WPAR include any Fibre Channel disk drive that is supported by
AIX Version 7.1 and uses the scsidisk device driver with the AIX Multiple Path I/O (MPIO) (default
PCM) multipath software. These include the following storage systems:
v IBM System Storage DS3400
v IBM System Storage DS4200
v IBM TotalStorage DS4300 (FAStT600)
v IBM TotalStorage DS4500 (FAStT900)
v IBM System Storage DS4700
v IBM System Storage DS4800
v IBM System Storage DS5100
v IBM System Storage DS5300
v IBM XIV Storage System
The tape drives that are supported in a WPAR are any Fibre Channel tape drives that are supported by
AIX Version 7.1 and use the sctape device driver.
To deploy a device to a WPAR, you can use the mkwpar -D command or the chwpar -D.
In order for a device to be allocated to a WPAR, the device must be in the available state or the defined
state in the global environment.
System WPARs can import one or more storage devices. Non-rootvg volume groups, logical volumes, and
file systems can be created and managed on imported storage devices within the WPAR.
After the device is exported to a WPAR, the device state is listed as Defined and it is not available in the
Global environment until it is unexported by using either the chwpar -K -D command or the stopwpar
command.
Related information:
lsdev command
chwpar command
mkwpar command
Allocating a device
The allocation process consists of providing a storage device that can be used by the WPAR.
A device can be allocated to a WPAR when the WPAR is created or it can be added to WPAR in a later
operation. For a device to be allocated to a WPAR, it must be in the available state or the defined state in
the global environment.
A device can be allocated to more than one WPAR, but can be used only by one WPAR at a time. To
allocate a device while creating the WPAR, run the following command:
mkwpar -D devname=<device name> -n <wpar name>
For a rootvg WPAR, the device to hold the rootvg must be specified, as in the following example:
mkwpar -D devname=<device name> rootvg=yes -n <wpar name>
The -D parameter can be repeated to specify multiple storage devices. The devid attribute can be used if
the unique device identifier for the storage device is known. The devid and devname attributes cannot be
specified together.
Additional disks can be allocated to a WPARs root volume group with the following command:
chwpar -D devname=<device name> rootvg=yes <wpar name>
When you allocate a storage device to an active WPAR, the device is exported to the WPAR unless it was
previously exported. To import the newly allocated device into the WPAR, invoke the cfgmgr command
within the WPAR.
A storage device can be allocated to more than one WPAR. However, the device can be exported to only
one WPAR at a time. The device is exported to the WPAR that starts first. After a device is exported to a
WPAR, the extended state of the device is listed as Exported. To see the extended state of a device, run
the following lsdev command with the new -x flag:
lsdev -x -l hdisk1
Deallocating a device
To deallocate a storage device from an existing WPAR, run the following command from the global
environment:
chwpar -K -D devname=<device name> <wpar name>
When a storage device is deallocated from an inactive WPAR, the device is removed from the WPAR
configuration. When a storage device is deallocated from an active WPAR, the chwpar command
attempts to unconfigure the device. If the device is used, the unconfiguration operation fails and the
command to remove the device from the WPAR also fails. When the command is successful, the device in
the WPAR changes from the available state to the defined state.
Related information:
chwpar command
lsdev command
The storage device has a parent device that is a virtualized device. You can not make any configuration
changes on the parent device in the WPAR, or modify any management paths to the device.
The following commands are used to configure and manage the global environment, and are also used in
the same manner to configure and manage devices in the WPAR:
v cfgmgr
v chdev
v lsattr
v lsdev
v lspath
v mkdev
v rmdev
Application WPARs
Application workload partitions (WPARs) provide an environment for isolation of applications and their
resources to enable checkpoint, restart, and relocation at the application level.
Application WPARs have less usage on system resources than system WPARs. Application WPARs do not
require their own instance of system services.
If additional dependencies are required, you can customize the WPAR during creation using the
wparexec command with the -M option. The supported file system types for application WPARs include
the same types as for system WPARs, with the exception that no file systems can be created by the
wparexec command. If a separate local file system is required, you must create it prior to creating the
application WPAR.
Related tasks:
Configuring directories and file systems for application WPARs on page 31
Application WPARs share file systems with the global environment. You can use the -M flag for the
wparexec command to configure directories and file systems.
When you create a system WPAR, a configuration profile is stored in the WPAR database. You can export
this profile to create a specification file that contains the exact same configuration information for that
WPAR. All WPARs must be created by an authorized administrator in the global environment.
Note: These topics provide specific examples of how to run WPAR-related commands. For complete
documentation of all options for a specific command, see the related information for that task.
Related information:
Installing and managing software with detached WPARs
Each WPAR has an isolated network environment with unique IP addresses and a unique hostname. You
can access WPARs through standard networking programs, such as telnet, ftp, and rlogin (depending on
the services running in the WPAR). Before you create a WPAR, you should log in as the root user and
complete one of the following prerequisites:
v Choose a name for the WPAR that maps to an IP address for your network.
v Add an entry for the new system WPAR to the /etc/hosts file on the server. The entry should include
the host name for the WPAR and the name of the WPAR as follows:
9.3.18.10 WPARname.austin.ibm.com WPARname
The initial output of the mkwpar command should look similar to the following:
Each system WPAR has an isolated section of the system's file space configured for the root directory, the
/home directory, the /usr directory and other file systems. Creation and configuration of this space is
reflected in the above output from the mkwpar command. The return from the mkwpar command
continues with output similar to the following:
x ./home
x ./home/guest
x ./home/lost+found
+-----------------------------------------------------------------------------+
Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...
SUCCESSES
---------
Filesets listed in this section passed pre-installation verification
and will be installed.
...
Each system workload partition has its own /dev directory. Creation and configuration of this space is
reflected in the populate: Exporting workload partition devices output from the mkwpar command.
Not all of the devices on the system can be shared among the WPARs so the WPARs /dev directory is a
sparse version of the /dev directory on the global environment. The mkwpar command then continues
with the installation of several AIX base system file sets into the WPAR. At the end of the installation
phase, you should see output similar to the following:
Finished processing all filesets. (Total time: 1 mins 4 secs).
Please wait...
The default method of creating a WPAR populates the new partition with a default set of installation
files, system configuration files, and file systems. An alternative approach is to create a WPAR as a copy
of an existing system.
A system copy WPAR can be created as a copy of the running system or it can be created from a system
backup image.
The WPAR that is created as a system copy contains all of the files and file systems from the source root
volume group, with the following exceptions:
v Filesets that were marked as not visible in a WPAR from the global system or the system backup
image are removed from the WPAR unless -T preserve_private=yes is specified on the mkwpar
command line or the preserve_private attribute of a copy_controls stanza is set to yes in a WPAR
specification file.
v File systems that are associated with WPARs on a running system are excluded from a system copy
WPAR created from that system unless -T preserve_wpars=yes is specified on the mkwpar command
or the preserve_wpars attribute of a copy_controls stanza is set to yes in a WPAR specification file.
The preserve_wpars attribute is ignored when a WPAR is created from a system backup image.
v Customized device information from the source is not copied into the WPAR. The customized device
information within the created WPAR reflects the devices that are available to the WPAR.
IBM Workload Partitions for AIX 23
A system copy WPAR that is created from a system backup image must be at the same system level as
the hosting system before the WPAR can be started or become active. If the levels are not compatible, the
administrator must use the syncwpar command to bring the WPAR to the level of the hosting system.
The initial level of the system backup image must be at least AIX 4.3.3.
The -G and -x options to the system backup commands enable a system backup image to be used to
create a system copy WPAR. The -x flag is only necessary if the /usr and /opt file systems need to be
excluded from the system backup image to create a shared WPAR from the system copy.
Related concepts:
System copy WPARs on page 8
A system copy WPAR is a system WPAR that is created by copying the files from the root volume group of
an existing AIX system or an AIX system backup image.
Related information:
mkcd Command
mkdvd Command
mksysb Command
mkszfile Command
mkwpar Command
syncwpar Command
Creating a system copy WPAR from a backup image of a system that has a similar structure and
configuration is easier than creating a default WPAR and configuring it manually.
To create a system WPAR as a copy of a backup image, enter the following command where device
represents a file or device that contains an AIX system backup image created by mksysb, mkcd, or
mkdvd:
mkwpar -t -B device -n WPARname
Related tasks:
Creating a system copy WPAR from the running system
Creating a system copy WPAR based on a running system that is similar provides an easier way to create
a WPAR than configuring it manually.
Creating a system copy WPAR based on a running system that is similar provides an easier way to create
a WPAR than configuring it manually.
To create a system WPAR as a copy of the currently running system, use one of the following methods:
v Enter the mkwpar command with the -t option
mkwpar -t [-l] -n WPARname
v Set the general attribute system_copy to yes in a WPAR specification file.
system_copy=yes
Related tasks:
Creating a system copy WPAR from a system backup image
Creating a system copy WPAR from a backup image of a system that has a similar structure and
configuration is easier than creating a default WPAR and configuring it manually.
You can specify the name for the system WPAR using the following command:
mkwpar -n wpar_name
You can also change the name of a system WPAR using the chwpar command. You can only change the
name of a system WPAR when it is stopped and in the defined state. To change the name of a system
WPAR, run the following command:
chwpar -n new_name old_name
Related information:
mkwpar command
chwpar command
To start a system WPAR, run the following command in the global environment:
startwpar wpar_name
You can also start a system WPAR in maintenance mode. Starting in maintenance mode performs all of
the actions of starting the WPAR with the exception of network configuration. You can use this flag to
prevent external access to the WPAR while you perform maintenance.
To start a system WPAR in maintenance mode, run the following command in the global environment:
startwpar -m wpar_name
Note: You cannot start WPARs that rely on NFS-mounted file systems in maintenance mode.
Related information:
startwpar command
By default, the file systems for a new system WPAR are located in the /wpars/wpar_name directory.
You can override the default location using the following command:
mkwpar -n wpar_name -d /newfs/wpar_name
For safety and security, the specified base directory must meet the following criteria:
v The directory must be empty.
v The directory must not be a registered file system in the /etc/filesystems directory.
v The directory must have permissions of 755 (rwxr-xr-x).
v The parent directory of the base directory (/newfs, in the example) must have permissions of 700
(rwx------).
You can also change the base directory of an existing system WPAR, using the following command:
chwpar -d /newfs/newbase wpar_name
The following file system types are supported using the vfs attribute of the -M option:
v JFS
v JFS2
v NFS
v Namefs
You can also specify that a directory should be created instead of a file system by specifying
vfs=directory. Specify this attribute in situations where you do not want to maintain a large number of
separate file systems.
Note: If the -M option is used with the mkwpar command for a rootvg system WPAR, or with the
chwpar command for an active system WPAR, the only valid value for the vfs attribute is namefs.
If you are customizing software within a system WPAR, it might be useful or necessary to have a
writable directory beneath a directory shared from the global environment. For example, it is common for
open source software to install into a /usr/local directory hierarchy by default. In order to accommodate
an unshared, writable /usr/local directory hierarchy, the global environment administrator must create a
writable /usr/local directory. Create a file system called /wpars/wparname/usr/local with the
type=wparname option.
Related concepts:
File systems for system WPARs on page 5
System WPARs have their own file systems similar to stand-alone AIX.
Rootvg WPARs on page 7
A system WPAR which is configured with its own root volume group on one or more dedicated storage
devices is called a rootvg WPAR. Configuring a rootvg WPAR gives the WPAR administrator complete
control over managing the storage devices exported to the WPAR, the volume groups on those devices,
and the logical volumes and file systems within those volume groups. A system WPAR which is not a
rootvg WPAR does not have its own root volume group, but has file systems created in logical volumes
created out of the root volume group of the global system.
If you do not specify any network information when you create a system WPAR, and the name of the
WPAR resolves to an IP address on the same network as any active global interface, the mkwpar
command automatically configures the network for the WPAR. If the WPAR does not resolve, you can
Each network requires its own instance of the -N flag. The -N flag specifies network configuration
attributes, and is used to separate the attribute=value pairs by blank spaces. You can specify more than
one -N flag to configure multiple IP addresses. For example:
mkwpar -n wpar_name -N interface=en0 address=224.128.9.3 \
netmask=255.255.255.0 broadcast=224.128.9.255 -N interface=en1 \
address=192.168.0.3 netmask=255.255.255.0 broadcast=192.168.0.255
To configure a system WPAR with a network address of 224.128.9.3 using the en0 interface for the global
environment, run the following command:
mkwpar -n wpar_name -N interface=en0 address=224.128.9.3 \
netmask=255.255.255.0 broadcast=224.128.9.255
To configure a system WPAR with an IPv6 network address of fe80::200:254 using the en3 interface from
the global environment, run the following command:
mkwpar -n wpar_name -N interface=en3 address6=fe80::200:254 prefixlen=64
You can also use the -N flag with the chwpar command to add additional networks on a previously
defined system WPAR. To add a network, run the following command:
chwpar -N address=224.128.9.4 wpar_name
If you want to change the network settings for a system WPAR, use the address attribute to identify the
network you want to change. For example, to change the netmask and broadcast address of the network
at 224.128.9.3, run the following command:
chwpar -N address=224.128.9.3 netmask=255.255.255.128 \
broadcast=224.128.9.127 wpar_name
Related concepts:
Networking on page 4
A WPAR can have one or more network addresses assigned to support network login and network
services.
To override the default host name when you create a system WPAR, run the following mkwpar
command:
mkwpar -n wpar_name -h wpar_hostname
To change the host name for an existing system WPAR, run the following chwpar command:
chwpar -h new_hostname wpar_name
Related information:
mkwpar command
chwpar command
To remove a network from the system WPAR, run the following chwpar command, using the address of
the network to identify it:
chwpar -K -N address=124.128.9.3 wpar_name
Files such as the /etc/resolv.conf file do not exist in system WPARs by default.
To copy the global environment's domain resolution configuration into the system WPARs, run the
following command:
mkwpar -n wpar_name -r
Running this command copies the following files into the system WPARs, if they exist in the global
environment:
v /etc/resolv.conf
v /etc/hosts
v /etc/netsvc.conf
v /etc/irs.conf
v /etc/networks
If the NSORDER environmental variable is set in the environment where you run the mkwpar command,
the variable is added to the /etc/environment file for the new system WPAR.
The -r flag is not supported by the chwpar command. Any changes to the domain resolution
configuration of an existing WPAR must be made by manually editing the relevant files.
By default, system and application workload partitions with active network connections share the global
system's routing table. To enable WPAR-specific routing for a WPAR when you are creating the WPAR,
add the -i flag to the command line of the mkwpar command or the wparexec command. For system
WPARs:
mkwpar -n wpar_name -N network_attributes -i ...
Using these commands will automatically create loopback, broadcast, and subnet routes appropriate to
each configured address. If you do not specify any explicit routing table entries, the WPAR will only be
able to communicate within its own subnets. You can configure explicit routing table entries with -I flag
when you create the WPAR. You can configure zero or more explicit routing table entries. Each entry
requires its own instance of the -I flag. Destination and gateway addresses can be specified by symbolic
name or IP address.
For example, to configure a default route through a gateway with symbolic name gateway.customer.com
and a host route to myserver.customer.com through gateway 192.168.1.1:
mkwpar -n wpar_name -N network_attributes -i -I rtdest=default rtgateway=gateway.customer.com \
-I rtdest=myserver.customer.com rttype=host rtgateway=192.168.1.1 ...
You can change the WPAR-specific routing characteristics for both system WPARs and application
WPARs using the chwpar command. The changes can be performed on active WPARs or inactive WPARs.
Changes take effect immediately, and persist across system WPAR reboots. To disable WPAR-specific
routing, causing the affected WPAR to begin using the global routing tables, use the following command:
chwpar -K -i wpar_name
To enable WPAR-specific routing and add a route for destinations in subnet 224.128.9.0/24 through
gateway 224.128.9.1 on interface en4, use the following command::
chwpar -i -I rtdest=224.128.9.0 rtnetmask=255.255.255.0 rtgateway=224.128.9.1 rtinterface=en4 wpar_name
To delete an existing WPAR-specific route entry, you must provide enough information to identify the
entry being deleted. In most cases, it is effective to use the same attributes provided when the route was
configured. For example, use the following command to remove the route configured in the previous
example:
chwpar -K -I rtdest=224.128.9.0 rtnetmask=255.255.255.0 rtgateway=224.128.9.1 rtinterface=en4 wpar_name
Related concepts:
Configuring application WPARs on page 30
You can create and configure application WPARs using the wparexec command and the chwpar
command.
To change resource control settings dynamically for an existing active or inactive application WPAR run
the following chwpar command:
chwpar -R totalThreads=2048 shares_memory=100 wpar_name
Note: You can also use the -K flag for the chwpar command to remove individual attributes from the
profile and restore those controls to their default, as follows:
chwpar -K -R totalProcesses shares_CPU wpar_name
Related concepts:
Resource controls on page 9
WPARs support up to 8192 resource-controlled workload partitions. The number of non-resource-
controlled WPARs that can be created is constrained only by the availability of global environment
To use a specification file to create a system WPAR, run the mkwpar command as follows:
mkwpar -f /tmp/specfile1
To create a specification file as part of the WPAR creation process, run the following mkwpar command
with the -o flag:
mkwpar -n wpar_name -o /tmp/specfile2
Note: If the name of the system WPAR is provided in the specification file, the -n flag is not required.
The specification file reflects the settings being used to create the WPAR.
To generate a specification file without creating the WPAR, run the following mkwpar command with the
-w flag and the -o flag:
mkwpar -o /tmp/specfile3 -w
For a comprehensive description of the format and permitted contents of a specification file, see the
/usr/samples/wpars/sample.spec file.
Related information:
mkwpar command
The following restrictions apply to using image.data files with system WPARs:
v WPARs use only the lv_data stanza type and the fs_data stanza type in an image.data file. All other
stanza types are ignored.
v If the logical volume device name matches an existing device name on the system, a new name is
generated, and a warning is issued.
v The file system paths specified with the FS_NAME attribute should correspond to their appearance in the
WPAR (for example, the root file system is / and the home file system is /home).
v The base directory for the global environment should not be included in image.data paths.
v All file systems must have associated LVs in the image.data file.
v All logical volumes must have associated file systems in the image.data file.
To create a system WPAR using the logical volume options and file system options in an image.data file,
run the following command:
mkwpar -L image_data=image.data file -n wpar_name
Related information:
image.data file
Note: These topics provide specific examples of how to run WPAR-related commands. For complete
documentation of all options for a specific command, see the related information for that task.
Related concepts:
Configuring WPAR-specific routing on page 28
You can configure a WPAR to use its own routing table using the -i flag and the -I flag for the mkwpar
command, the wparexec command, or the chwpar command.
Related information:
Creating a versioned WPAR on page 13
You can create a new versioned WPAR with the mkwpar command.
You must supply the path to the application or command that you want to create an application WPAR
for, and you must supply any command line arguments when you run the wparexec command. The
application can either come from a specification file, or be specified on the command line. Unlike system
WPARs, it is not necessary to assign an explicit name to an application WPAR. Although both WPAR
types require a name, the names for application WPARs are generated based on the name of the
application running in the WPAR.
Application WPARs start as soon as the wparexec command is issued, and stop as soon as the
application completes its operation. When the operation is complete, the configuration for the application
WPAR is destroyed.
Unlike system WPARs, application WPARs do not have a base directory. You cannot override the default
settings for the local file system dependencies, but you can use the -M flag for the wparexec command to
specify additional file system dependencies, such as a remote NFS mount. The directory attribute
Application WPARs do not create new file systems. Therefore, the local JFS and JFS2 file system types
cannot be specified. A local file system dependency can be specified, but it must already exist in the
/etc/filesystems directory.
To mount the remote /export/shared directory over the /shared directory in the global environment, run
the following wparexec command with the -M flag, using the appropriate values for your environment:
wparexec -M directory=/shared vfs=nfs host=homeserver.customer.com dev=/export/shared \
-- /path/to/application arg1 arg2 ... argN
To specify a local file system dependency, specify only the directory attribute for that mount stanza, as
follows, using the appropriate values for your environment:
wparexec -M directory=/mylocalshare -- /path/to/application arg1 arg2 ... argN
Related concepts:
File systems for application WPARs on page 21
Application WPARs share the global environment's file system namespace. When an application WPAR is
created, it has access to all mounts available to the global environment's file system.
To override the default hostname for an application WPAR when you are creating it, run the following
wparexec command with the -h flag:
wparexec -h wpar_hostname -- /path/to/application arg1 arg2 ... argN
You can also change the host name for an application WPAR at any time using the -h flag with the
following chwpar command:
chwpar -h new_hostname wpar_name
If you do not specify any network information when you create an application WPAR, and the name of
the WPAR resolves to an IP address on the same network as any active global interface, the wparexec
command automatically configures the network for the WPAR. If the WPAR name does not resolve, you
can specify zero or more network configurations using the -N flag for the wparexec command or the
chwpar command. All network changes can be performed on active or inactive WPARs. The changes take
effect immediately.
Each network requires its own instance of the -N flag. The -N flag specifies network configuration
attributes, and is used to separate the attribute=value pairs by blank spaces. You can specify more than
one -N flag to configure multiple IP addresses. For example:
wparexec -N interface=en0 address=224.128.9.3 netmask=255.255.255.0 broadcast=224.128.9.255 \
-N interface=en1 address=192.168.0.3 netmask=255.255.255.0 broadcast=192.168.0.255 \
-- /path/to/application arg1 arg2 ... argN
To configure an application WPAR with an IPv6 address of fe80::200:214 using the en3 interface from the
global environment, run the following command:
wparexec -N interface=en3 address6=fe80::200:214 prefixlen=64 \
-- /path/to/application arg1 arg2 ... argN
If you want to change the network settings for an application WPAR, use the address attribute to identify
the network you want to change. For example, to change the netmask and broadcast address of the
network at 224.128.9.3, run the following command:
chwpar -N address=224.128.9.3 netmask=255.255.255.128 broadcast=224.128.9.127 wpar_name
Related concepts:
Networking on page 4
A WPAR can have one or more network addresses assigned to support network login and network
services.
In this example, the application WPAR is entitled to the following system resources:
v A minimum of 10% of the global environments processors upon request
v A maximum of 20% of the global environments processors when there is contention
v A maximum of 50% of the global environments processors when there is no contention
v A maximum of 1024 processes at a time
The active attribute can be set to yes or no. When the active attribute is set to no, resource controls are
disabled, but the settings are maintained in the configuration database.
For example, to change control settings dynamically for an application WPAR, run the following chwpar
command:
chwpar -R totalThreads=2048 shares_memory=100 wpar_name
Note: You can also use the -K flag for the chwpar command to remove individual attributes from the
profile and restore those controls to their default, as follows:
chwpar -K -R totalProcesses shares_CPU wpar_name
If you specify the application for an application WPAR to run, including the command and all
arguments, the command is not required when you create the specification file. To create a specification
file for an application WPAR, run the following command:
wparexec -f /tmp/specfile1
To create a specification file as part of the WPAR creation process, run the wparexec command with the
-o flag as follows:
wparexec -n wpar_name -o /tmp/specfile2 -- /path/to/application arg1 arg2 ... argN
The specification file reflects the settings being used to create the WPAR.
For a comprehensive description of the format and permitted contents of a specification file, see the
/usr/samples/wpars/sample.spec file.
Managing WPARs
After you have a WPAR created and configured, you might want to perform tasks such as removing,
restoring, and listing WPARs.
Listing WPARs
You can list summary data for system WPARs and application WPARs using the lswpar command.
You can list information about one or more WPARs using the lswpar command by specifying zero or
more workload partition names. The lswpar command supports shell-style wildcards.
For example, to list the WPARs on a system with names that start with "mypar_", run the following
command:
lswpar mypar_*
Related information:
lswpar command
You can display the WPAR configured ID and the WPAR key by running the lparstat command with the
-W flag. This command also displays processor information that might be helpful for licensing.
To view WPAR identification and processor information, run lparstat command with the -W flag as
follows:
lparstat -W
To display the WPAR key, run the uname command with the -W flag as follows:
uname -W
Logging in to a WPAR
After you configure and activate a system WPAR that does not have a network connection, you can log
in to it locally using the clogin command.
Note: The clogin command provides limited console support and some applications may not behave as
they would under a full function console. The clogin command is primarily intended to be used to access
the WPAR for maintenance to correct WPAR configuration problems. For best results, configure the
WPAR to have at least a private network to enable network login mechanisms, such as rlogin and telnet.
You can log in to a WPAR as the root user or as a different user. Output for the clogin command is
displayed on the console where the command was issued. When you exit the command, the command
returns to the global environment.
To log in to a system WPAR for maintenance and to create a shell as the root user, run the following
command:
clogin wpar_name
To log in to a system WPAR for maintenance and to create a shell as a different user, run the following
command:
clogin wpar_name -l username
Note: You can also log into a system WPAR remotely by using a network-based login command, such as
the rlogin command, the telnet command, or the rsh command.
Related information:
clogin command
Backing up WPARs
You can back up a WPAR using the savewpar command, the mkcd command, or the mkdvd command.
The savewpar command uses the data created by the mkwpardata command to back up your WPAR. If
these files are not already on your system, the savewpar command will call the mkwpardata command
to create these files. The image files contain the following information:
v A list of logical volumes and their sizes
v A list of file systems and their sizes
v A list of volume groups
v The WPAR name
To back up a WPAR to the default tape device, run the following command:
savewpar wparname
You can also back up a WPAR to a CD device using the mkcd -W command or to a DVD device using
the mkdvd -W command.
Related information:
The alt_disk_copy command is used during a maintenance cycle. It allows the current root volume group
to be saved on alternate disks before updates are applied. If any issues occur with the updated system,
the LPAR can be restarted from the alternate disks to switch back to the previous system level.
In a WPAR, the savewpar command provides function similar to the mksysb command for an LPAR. You
can create an alternate bootset for a WPAR that corresponds to use of the alt_disk_copy command in an
LPAR.
The chwpar command with the -B option allows cloning of the current bootset of a WPAR to create an
alternate bootset. For a file system-based WPAR, a volume group might be specified to create the
alternate bootset on. If volume group is not specified, the alternate bootset is created on the same volume
group where the current bootset is stored.
The chwpar command with the -b option might be used to specify a bootlist, which gives an ordered list
of bootsets on which a WPAR should be started from. If the start from the first bootset in the bootlist
fails, then startwpar command will retry to use the next bootset in the list.
The lswpar command also displays information about bootsets and bootlists.
Restoring WPARs
You can restore a WPAR using the restwpar command.
You can restore a WPAR from a backup image created by the savewpar command, the mkcd command,
or the mkdvd command.
To restore the backup image from the /dev/rmt1 device, run the following command:
restwpar -f/dev/rmt1
Related information:
restwpar command
Removing WPARs
You can remove a WPAR using the rmwpar command.
To remove a WPAR, it must be in the defined state, and you must provide the name of the WPAR.
To stop a WPAR before removing it, run the following rmwpar command with the -s flag:
rmwpar -s wpar_name
Related information:
rmwpar command
Stopping a system WPAR follows a similar paradigm to the shutdown command and the halt command
for the AIX operating system. For application WPARs, running the stopwpar command is equivalent to
removing the WPAR with the rmwpar command.
To stop a system WPAR in the same way that the shutdown command stops a system, run the following
command:
stopwpar wpar_name
To stop a system WPAR quickly in the same way that the halt command stops a system, run the
following command:
stopwpar -F wpar_name
Related information:
stopwpar command
If you use the recommended default WPAR configuration, which shares the /usr and /opt file systems
with the global environment, you cannot have any incompatibility issues. The software in a shared WPAR
comes from the global environment, and the syncwpar command provides functionality to complete any
required installation operations for the WPAR.
When the system software in a detached WPAR has become incompatible with the global environment,
you can use the syncwpar -D command to assist in recovering the detached WPAR that is incompatible
and make it consistent with the global system. It is possible that a WPAR might ultimately remain
unrecoverable, but even then it is still possible to recover the non-system files in the WPAR.
The selected files can be backed up to a file or backup media by using the backup command.
Related concepts:
The shared form (shared /usr) of a system WPAR has the /usr file and the /opt file systems mounted
from the global system hosting the WPAR. For shared system WPARs, all changes within the /usr file and
the /opt file systems are immediately visible within the WPAR along with the installation files and
information required to synchronize the non-shared (root) portion of the WPAR global system within the
/usr file system. The syncwpar command will synchronize a shared WPAR with its global environment.
The detached form (non-shared /usr) of system WPAR has a separately installed writable /usr file and
/opt file system. Detached WPARs provide improved flexibility by allowing the installation of different
software in a WPAR than existing software in a shared WPAR environment. When it is necessary to have
detached WPARs, you can use the syncwpar and inuwpar commands to manage the system software in
detached WPARs and recover from situations where the WPAR has become incompatible with the global
environment.
If you have WPARs on an AIX 6.1 operating system, and you migrate the global system to AIX 7.1, the
software in the WPARs must also be migrated. The migwpar command migrates a WPAR from AIX 6.1 to
AIX 7.1. The migwpar command can also be used to migrate a versioned WPAR from AIX 5.2 or AIX 5.3
to a native AIX 7.1 WPAR.
The syncwpar command cannot be used with AIX 5.2 or AIX 5.3 versioned WPARs. The software in
versioned WPARs must be maintained separately from the global environment.
You can use shared WPARs unless it is required that the /usr file systems be writable within the WPAR.
Detached WPARs increase administrative process usage due to the following unique operating
environments:
v Operating system updates applied in the global environment are not immediately available in a
detached WPAR.
v It is possible for the system software in a detached WPAR to become unusable and not boot if it is not
compatible with the running kernel. This can happen simply by rejecting or applying updates in either
the global environment or the WPAR, but not both.
v Installation files used to populate the non-shared (root) portion of a fileset reside in a packaging
directory in the shared environment, but the files used to populate the /usr file and the /opt file
systems in a detached WPAR are only on installation media. Thus, it is difficult to duplicate software
installation steps that were taken in the global environment in the detached WPAR.
Related information:
syncwpar command
inuwpar command
Before you install Apache, you must download the Apache RPM and the following dependencies:
v expat
v lynx
You can download all of these RPM files from the following website: http://www.ibm.com/servers/aix/
products/aixos/linux/download.html
The Advanced Accounting subsystem produces the following records for WPARs:
v Process records
v Aggregated process records
v Aggregated application records
v File system activity records
v Network interface I/O records
v Disk I/O records
v Third-party kernel extension common aggregation records
Related information:
Accounting records
Note: A maximum of seven WPARs can run the trace facility at the same time.
By default you cannot run trace facility in a WPAR. To enable the trace facility from a WPAR, you must
grant PV_KER_RAS privilege to the WPAR. You can grant this privilege when you run the mkwpar
command or by running the chwpar command with the -S privs+=PV_KER_RAS flag.
Related information:
trace daemon
trcrpt command
Application workload partitions share their file systems with the global environment and do not create
new file systems. Therefore, the syncwpar command and the syncroot command are applicable only to
system WPARs.
To make software available in one or more WPARs, run the following command in the global
environment:
syncwpar wpar_name1 wpar_name2
The syncroot command performs the same function as the syncwpar command, but the syncroot
command operates only within the WPAR where it is issued.
Related information:
syncroot command
syncwpar command
The following table shows how the behavior of some commands differs when they are run in a WPAR or
run in the global environment. Some commands have different behavior only when certain flags are
specified.
Note: For versioned WPARs, the -@ flag is not recognized, because it is not present in the previous run
time. Some commands in a versioned WPAR have added WPAR support, and in those cases, the behavior
related to the -@ flag is described in the following table.
IBM may not offer the products, services, or features discussed in this document in other countries.
Consult your local IBM representative for information on the products and services currently available in
your area. Any reference to an IBM product, program, or service is not intended to state or imply that
only that IBM product, program, or service may be used. Any functionally equivalent product, program,
or service that does not infringe any IBM intellectual property right may be used instead. However, it is
the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or
service.
IBM may have patents or pending patent applications covering subject matter described in this
document. The furnishing of this document does not grant you any license to these patents. You can send
license inquiries, in writing, to:
For license inquiries regarding double-byte character set (DBCS) information, contact the IBM Intellectual
Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some
states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this
statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes will be incorporated in new editions of the publication.
IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in
any manner serve as an endorsement of those websites. The materials at those websites are not part of
the materials for this IBM product and use of those websites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
IBM Corporation
Dept. LRAS/Bldg. 903
11501 Burnet Road
Austin, TX 78758-3400
USA
Such information may be available, subject to appropriate terms and conditions, including in some cases,
payment of a fee.
The licensed program described in this document and all licensed material available for it are provided
by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement or
any equivalent agreement between us.
Any performance data contained herein was determined in a controlled environment. Therefore, the
results obtained in other operating environments may vary significantly. Some measurements may have
been made on development-level systems and there is no guarantee that these measurements will be the
same on generally available systems. Furthermore, some measurements may have been estimated through
extrapolation. Actual results may vary. Users of this document should verify the applicable data for their
specific environment.
Information concerning non-IBM products was obtained from the suppliers of those products, their
published announcements or other publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.
All statements regarding IBM's future direction or intent are subject to change or withdrawal without
notice, and represent goals and objectives only.
All IBM prices shown are IBM's suggested retail prices, are current and are subject to change without
notice. Dealer prices may vary.
This information is for planning purposes only. The information herein is subject to change before the
products described become available.
This information contains examples of data and reports used in daily business operations. To illustrate
them as completely as possible, the examples include the names of individuals, companies, brands, and
products. All of these names are fictitious and any similarity to the names and addresses used by an
actual business enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs
in any form without payment to IBM, for the purposes of developing, using, marketing or distributing
application programs conforming to the application programming interface for the operating platform for
which the sample programs are written. These examples have not been thoroughly tested under all
conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these
programs. The sample programs are provided "AS IS", without warranty of any kind. IBM shall not be
liable for any damages arising out of your use of the sample programs.
Portions of this code are derived from IBM Corp. Sample Programs.
Copyright IBM Corp. _enter the year or years_. All rights reserved.
This Software Offering does not use cookies or other technologies to collect personally identifiable
information.
If the configurations deployed for this Software Offering provide you as the customer the ability to collect
personally identifiable information from end users via cookies and other technologies, you should seek
your own legal advice about any laws applicable to such data collection, including any requirements for
notice and consent.
For more information about the use of various technologies, including cookies, for these purposes, see
IBMs Privacy Policy at http://www.ibm.com/privacy and IBMs Online Privacy Statement at
http://www.ibm.com/privacy/details the section entitled Cookies, Web Beacons and Other
Technologies and the IBM Software Products and Software-as-a-Service Privacy Statement at
http://www.ibm.com/software/info/product-privacy.
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be
trademarks of IBM or other companies. A current list of IBM trademarks is available on the web at
Copyright and trademark information at www.ibm.com/legal/copytrade.shtml.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Notices 47
48 AIX Version 7.2: IBM Workload Partitions for AIX
Index
A G
active WPAR 16 global environment 4
Advanced Accounting subsystem 39
allocating 18
Apache
installing 39
H
host name
application
system WPARs 27
environment 1
application WPARs 20
configuring 32, 33
creating 31 I
file systems 21 identifiers 34
resource controls 33 image.data file 30
specification files 33 inactive WPAR 16
installing
Apache 39
B
backing up 35
L
listing 34
C logging in 35
configuring 19
application WPARs 32, 33
directories 25, 31 M
domain resolution 28 managing 20
file systems 25, 31
networks 26, 32
resource controls 29, 33
specification files 30
N
naming
system WPARs 21, 25, 26
system WPARs 25
creating
networks 4, 26
application WPARs 31
configuring 32
system WPARs 21
Versioned WPARs 13
WPARs as a system copy 8, 23
from a backup image 24 R
from a running system 24 removing 18, 36
customizing resource controls 9, 10, 33
file systems 26 configuring 29
system WPARs 26 restoring 36
D S
deploying 18 security 8, 9
device 16, 18, 19, 20 software 40
devices 3 specification files
directories application WPARs 33
configuring 31 configuring 30
domain resolution starting
configuring 28 system WPARs 25
stopping
system WPARs 37
F system WPARs 4, 27
alternate bootsets 36
file systems 20, 26
configuring 21, 25, 26
application WPARs 21
creating 21
configuring 31
customizing 26
system WPARs 5
directories 25, 26
file systems 5, 25
T
trace facility 39
V
Versioned WPARs
creating 13
W
WPARs as system copy
creating 8, 23
WPARs as system copy from a backup image
creating 24
WPARs as system copy from a running system
creating 24
Printed in USA