292 Exploiting IBM AIX Workload Partitions
12.9 Restoring the System WPAR
The procedure to restore a WPAR is almost the same as creating a new WPAR. During the
creation, you specify the backup file.
Enter smitty nim Perform NIM Installation Manage Workload Partitions
Machines Create a Managed Workload Partition, as shown in Example 12-21.
Example 12-21 The target name is your WPAR, and the resource for the backup image is your backup
* Target Name [lpar_6_wpar_1]
Remain NIM client after install? [yes]
Specification Resource 
WPAR Name lpar_6_wpar_1
Resource for Backup Image [lpar_6_wpar_1_savewpar]
Alternate DEVEXPORTS for installation 
Alternate SECATTRS for installation 
Example 12-22 shows the command-line executable.
Example 12-22 Restoring a WPAR using the NIM CLI
# nim -o create -a savewpar=lpar_6_wpar_1_savewpar lpar_6_wpar
12.10 Using specification files for system WPAR
A specification file (“spec file”) is a file in stanza format with all the attributes that are needed
to build the WPAR.
You can pass the specification file as an input file to the following commands:
mkwpar command by using the -f flag
restwpar command by using the -w flag
wparexec command by using the -f flag
12.10.1 Specification file for system WPARs
The specification file can be defined as a resource in the NIM server, and it can be used as
well at the WPAR creation or WPAR restoration from the NIM server.
Example 12-23 on page 293 shows defining a WPAR specification resource file in the NIM
The wpar_exec resource definition steps are enter smitty nim_mkres Define resource
wpar_exec, after the specification file has already been copied into the desired location from
the source LPAR to the NIM master, as shown in Example 12-23 on page 293.
Important: If you use a rootvg WPAR and relocate it to another LPAR, it is not possible to
back it up with NIM. For such situations, you can use the IBM Systems Director.
Chapter 12. Managing your system workload partition with Network Installation Manager 293
Example 12-23 Defining the wpar_exec resource
Define a Resource
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
* Resource Name [wparm90]
* Resource Type wpar_spec
* Server of Resource [master]
* Location of Resource
NFS Client Security Method 
NFS Version Access 
Source for Replication 
The specification file is created automatically at WPAR creation time and saved in the
The specification file template is located in /usr/samples/wpars/sample.spec and belongs to
the bos.wpars package. The specification file can be created from this template and
customized as necessary. Refer to Example 12-24.
We describe the corresponding attributes for the WPAR specification files in 12.10, “Using
specification files for system WPAR” on page 292.
Example 12-24 Specification file created by mkwpar for a system non-shared rootvg WPAR
name = "wparm91"
hostname = "wparm91"
checkpointable = "yes"
directory = "/wpars/wparm91"
privateusr = "yes"
ostype = "0"
auto = "no"
Specification files: The specification files for application WPARs that are created by using
the CLI (mkwpar -e <name_of_WPAR> -o <spec_file>) or smit clonewpar_sys are kept in
the directory /etc/wpars until the application WPAR is stopped.
The spec file is automatically deleted when the application WPAR is stopped.
Specification files of application WPARs that are created by the WPAR Manager through
the IBM Systems Director are managed and located in the IBM Systems Director.
If you are not using WPAR Manager, the specification file is used at starting the WPAR
application by the wparexec -f <location of specification file> command.
294 Exploiting IBM AIX Workload Partitions
rootvgwpar = "yes"
routing = "yes"
broadcast = "172.16.23.255"
interface = "en0"
netmask = "255.255.252.0"
address = "172.16.20.91"
rttype = "net"
rtgateway = "172.16.20.1"
rtinterface = "en0"
rtdest = "default"
shares_CPU = "-1"
active = "yes"
devname = "/dev/errorctl"
devtype = "1"
devname = "/dev/audit"
devtype = "1"
devname = "/dev/nvram"
devtype = "1"
devname = "/dev/kmem"
devtype = "1"
devid = "3E213600A0B8000291B08000007BD06AAF1B20F1815 FAStT03IBMfcp"
devtype = "2"
rootvg = "yes"