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 Options
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
server.
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.
[Entry Fields]
* Resource Name [wparm90]
* Resource Type wpar_spec
* Server of Resource [master]
+
* Location of Resource
[/nimrepo/backups/spec/wparm90.sf] /
NFS Client Security Method []
+
NFS Version Access []
+
Comments []
Source for Replication []
+
The specification file is created automatically at WPAR creation time and saved in the
/etc/wpars/<name_of_wpar.cf> directory.
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
general:
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"
network:
broadcast = "172.16.23.255"
interface = "en0"
netmask = "255.255.252.0"
address = "172.16.20.91"
route:
rttype = "net"
rtgateway = "172.16.20.1"
rtinterface = "en0"
rtdest = "default"
resources:
shares_CPU = "-1"
active = "yes"
security:
privs =
"PV_SU_,PV_AU_READ,PV_DEV_LOAD,PV_MAC_R_PROC,PV_AU_WRITE,PV_DAC_GID,PV_DOM_,PV_LAB
_SL_FILE,PV_LAB_SLDG_STR,PV
_NET_,PV_MAC_R_STR,PV_MAC_W_DN,PV_SEC_TRACE,PV_DAC_UID,PV_MAC_R_CL,PV_AZ_READ,PV_D
EV_CONFIG,PV_MAC_W_PROC,PV_LAB_SLUG_STR,PV_
MAC_,PV_LAB_,PV_MAC_W_UP,PV_DOM_CHK,PV_MAC_OVRRD,PV_DOM_CSET,PV_DAC_O,PV_KER_,PV_D
AC_R,PV_AZ_ADMIN,PV_DAC_W,PV_DAC_X,PV_LAB_S
LDG,PV_WPAR_CKPT,PV_AU_PROC,PV_MAC_R,PV_WPAR_DEV_LOAD,PV_LAB_CLTL,PV_MAC_W,PV_AU_A
DD,PV_PROBEVUE_,PV_PROC_,PV_DAC_,PV_MAC_CL,
PV_LAB_CL,PV_TP,PV_LAB_SLUG,PV_TP_SET,PV_MIC_CL,PV_DAC_RID,PV_DOM_SELF,PV_LAB_LEF,
PV_LAB_TL,PV_DEV_QUERY,PV_LAB_SL_SELF,PV_DO
M_PROC,PV_MIC,PV_AZ_ROOT,PV_LAB_SL_PROC,PV_AU_,PV_FS_,PV_TCB,PV_MAC_W_CL,PV_AZ_CHE
CK,PV_AU_ADMIN"
.......
device:
devname = "/dev/errorctl"
devtype = "1"
device:
devname = "/dev/audit"
devtype = "1"
device:
devname = "/dev/nvram"
devtype = "1"
device:
devname = "/dev/kmem"
devtype = "1"
device:
devid = "3E213600A0B8000291B08000007BD06AAF1B20F1815 FAStT03IBMfcp"
devtype = "2"
rootvg = "yes"

Get Exploiting IBM AIX Workload Partitions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.