HP-UX Containers (SRP) A.03.01 Administrator's Guide
45
• Migrate a container across systems: export and import a container, then delete the original
container.
• Create a new container by copying an existing container: export a container, then import the
container with a new name and network configuration.
• Create a copy of a container for archival purposes. Similarly, a container can be taken
offline by exporting and deleting the original container.
In Example 6.8, the user runs the srp –export and srp –import commands to copy the
container named myContainer to a new container named newContainer.
When you copy a container with a new name, it is by default configured to start at run-level 2 instead
of the run-level configured in the original container. You should reconfigure the services in the new
container, as needed, and update the run-level in the container’s /etc/inittab file to the desired
value.
Example 6.8 Copying a container
# srp -export myContainer -xfile myContainer.x
/var/hpsrp/myContainer will require 4829788K octets in the exchange file
Enter the requested values when prompted, then press return.
Enter "?" for help at prompt. Press control-c to exit.
Save SRP container directories in exchange file? [yes] RETURN
Press return or enter "yes" to process this template.
Do you wish to continue? [yes] RETURN
export compartment rules succeeded
export RBAC admin role for compartment succeeded
export prm rules succeeded
export ipfilter rules succeeded
export ipsec rules succeeded
archiving etc home net opt tmp var bin lib .profile .sw .srp ...
export system product list succeeded
export compartment network service rules succeeded
export provision service succeeded
# srp -import newContainer -xfile myContainer.x
running fitness tests ...
===========================================================================
Container "myContainer" exported from mySystem on Thu Jun 30 18:41:17 PDT 2011
============================================================================
Enter the requested values when prompted, then press return.
Enter "?" for help at prompt. Press control-c to exit.
Default run-level: [2] RETURN
IP address: 192.2.2.2
Add IP address to netconf file? [yes] RETURN
IP subnet mask (press return to accept default): []RETURN
Primary network interface name: [] lan0
Gateway server IP address for default route (0 to skip) [192.2.2.2] RETURN
The following template variables have been set to the values shown:
iface = lan0
ip_address = 192.2.2.2
Press return or enter "yes" to make the selected modifications with these
values. Do you wish to continue? [yes] RETURN