<chapter id="z.admin.task-1"><title>Administering Solaris Zones (Tasks)</title><highlights><para>This chapter covers general administration tasks and provides usage
examples.</para><itemizedlist><listitem><para><olink targetptr="z.admin.task-2" remap="internal">Using the ppriv Utility</olink></para>
</listitem><listitem><para><olink targetptr="gelyb" remap="internal">Using DTrace in a Non-Global Zone</olink></para>
</listitem><listitem><para><olink targetptr="z.admin.task-11" remap="internal">Mounting File Systems in
Running Non-Global Zones</olink></para>
</listitem><listitem><para><olink targetptr="gbrkt" remap="internal">Adding Non-Global Zone Access to
Specific File Systems in the Global Zone</olink></para>
</listitem><listitem><para><olink targetptr="z.admin.task-54" remap="internal">Using IP Network Multipathing
on a Solaris System With Zones Installed</olink></para>
</listitem><listitem><para><olink targetptr="geohb" remap="internal">Administering Data-Links in Exclusive-IP
Non-Global Zones</olink></para>
</listitem><listitem><para><olink targetptr="z.admin.task-71" remap="internal">Using the Fair Share Scheduler
on a Solaris System With Zones Installed</olink></para>
</listitem><listitem><para><olink targetptr="z.admin.task-21" remap="internal">Using Rights Profiles in
Zone Administration</olink></para>
</listitem><listitem><para><olink targetptr="gbrko" remap="internal">Backing Up a Solaris System With
Installed Zones</olink></para>
</listitem><listitem><para><olink targetptr="gbrmv" remap="internal">Restoring a Non-Global Zone</olink></para>
</listitem>
</itemizedlist><para>See <olink targetptr="z.admin.ov-1" remap="internal">Chapter&nbsp;26, Solaris Zones Administration
(Overview)</olink> for general zone administration topics.</para>
</highlights><sect1 id="z.admin.task-2"><title>Using the <command>ppriv</command> Utility</title><para>Use the <command>ppriv</command> utility to display the zone's privileges.</para><task id="gdoof"><title>How to List Solaris Privileges in the Global Zone</title><tasksummary><para>Use the <command>ppriv</command> utility with the <option>l</option> option
to list the privileges available on the system.</para>
</tasksummary><procedure remap="single-step"><step><para>At the prompt, type <command>ppriv</command> <option>l</option> <literal>zone</literal> to report the set of privileges available in the zone.</para><screen>global# <userinput>ppriv -l zone</userinput></screen><para>You will see a display similar to this:</para><screen>contract_event
contract_observer
cpc_cpu
.
.
.</screen>
</step>
</procedure>
</task><task id="z.admin.task-6"><title>How to List the Non-Global Zone's Privilege
Set</title><tasksummary><para>Use the <command>ppriv</command> utility with the <option>l</option> option
and the expression <literal>zone</literal> to list the zone's privileges.</para>
</tasksummary><procedure><step id="z.admin.task-step-4"><para>Log into the non-global zone. This example
uses a zone named <replaceable>my-zone</replaceable>.</para>
</step><step id="z.admin.task-step-5"><para>At the prompt, type <command>ppriv</command> <option>l</option> <literal>zone</literal> to report the set of privileges available
in the zone.</para><screen>my-zone# <userinput>ppriv -l zone</userinput></screen><para>You will see a display similar to this:</para><screen>contract_event
contract_observer
file_chown

.
.
.</screen>
</step>
</procedure>
</task><task id="z.admin.task-7"><title>How to List a Non-Global Zone's Privilege
Set With Verbose Output</title><tasksummary><para>Use the <command>ppriv</command> utility with the <option>l</option> option,
the expression <literal>zone</literal>, and the <option>v</option> option
to list the zone's privileges.</para>
</tasksummary><procedure><step id="z.admin.task-step-9"><para>Log into the non-global zone. This example
uses a zone named <replaceable>my-zone</replaceable>.</para>
</step><step id="z.admin.task-step-10"><para>At the prompt, type <command>ppriv</command> <option>l</option> <option>v</option> <literal>zone</literal> to report the set of
privileges available in the zone, with a description of each privilege.</para><screen>my-zone# <userinput>ppriv -lv zone</userinput></screen><para>You will see a display similar to this:</para><screen>contract_event
        Allows a process to request critical events without limitation.
        Allows a process to request reliable delivery of all events on
        any event queue.
contract_observer
        Allows a process to observe contract events generated by
        contracts created and owned by users other than the process's
        effective user ID.
        Allows a process to open contract event endpoints belonging to
        contracts created and owned by users other than the process's
        effective user ID.
file_chown
        Allows a process to change a file's owner user ID.
        Allows a process to change a file's group ID to one other than
        the process' effective group ID or one of the process'
        supplemental group IDs.
.
.
.</screen>
</step>
</procedure>
</task>
</sect1><sect1 id="gelyb"><title>Using DTrace in a Non-Global Zone</title><para>Perform the following
steps to use DTrace functionality as described in <olink targetptr="gcogk" remap="internal">Running
DTrace in a Non-Global Zone</olink>.</para><task id="gelxd"><title>How to Use DTrace</title><procedure><step><para>Use the <command>zonecfg</command> <literal>limitpriv</literal> property
to add the <literal>dtrace_proc</literal> and <literal>dtrace_user</literal> privileges.</para><screen>global# <userinput>zonecfg -z my-zone</userinput>
zonecfg:my-zone> <userinput>set limitpriv="default,dtrace_proc,dtrace_user"</userinput>
zonecfg:my-zone> <userinput>exit</userinput></screen><note><para>Depending on your requirements, you can add either privilege,
or both privileges.</para>
</note>
</step><step><para>Boot the zone.</para><screen>global# <userinput>zoneadm -z my-zone boot</userinput></screen>
</step><step><para>Log in to the zone.</para><screen>global# <userinput>zlogin my-zone</userinput></screen>
</step><step><para>Run the DTrace program.</para><screen>my-zone# <userinput>dtrace -l</userinput></screen>
</step>
</procedure>
</task>
</sect1><sect1 id="genky"><title>Checking the Status of SMF Services in a Non-Global
Zone</title><para>To check the status of SMF services in a native non-global zone, use
the zlogin command.</para><task id="genmf"><title>How to Check the Status of SMF Services From the Command
Line</title><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>From the command line, type the following to show all services,
including disabled ones.</para><screen>global# <userinput>zlogin my-zone svcs -a</userinput></screen>
</step>
</procedure><taskrelated role="see-also"><para>For more information, see <olink targetptr="z.login.task-1" remap="internal">Chapter&nbsp;22,
Logging In to Non-Global Zones (Tasks)</olink> and <olink targetdoc="group-refman" targetptr="svcs-1" remap="external"><citerefentry><refentrytitle>svcs</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink>.</para>
</taskrelated>
</task><task id="genmh"><title>How to Check the Status of SMF Services From Within
a Zone</title><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Log in to the zone.</para><screen>global# <userinput>zlogin my-zone</userinput></screen>
</step><step><para>Run the <command>svcs</command> command with the <option>a</option> option
to show all services, including disabled ones.</para><screen>my-zone# <userinput>svcs -a</userinput></screen>
</step>
</procedure><taskrelated role="see-also"><para>For more information, see <olink targetptr="z.login.task-1" remap="internal">Chapter&nbsp;22,
Logging In to Non-Global Zones (Tasks)</olink> and <olink targetdoc="group-refman" targetptr="svcs-1" remap="external"><citerefentry><refentrytitle>svcs</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink>.</para>
</taskrelated>
</task>
</sect1><sect1 id="z.admin.task-11"><title>Mounting File Systems in Running Non-Global
Zones</title><para>You can mount file systems in a running non-global zone. The following
procedures are covered.</para><itemizedlist><listitem><para>As the global administrator in the global zone, you can import
raw and block devices into a non-global zone. After the devices are imported,
the zone administrator has access to the disk. The zone administrator can
then create a new file system on the disk and perform one of the following
actions:</para><itemizedlist><listitem><para>Mount the file system manually</para>
</listitem><listitem><para>Place the file system in <filename>/etc/vfstab</filename> so
that it will be mounted on zone boot</para>
</listitem>
</itemizedlist>
</listitem><listitem><para>As the global administrator, you can also mount a file system
from the global zone into the non-global zone.</para>
</listitem>
</itemizedlist><task id="z.admin.task-13"><title>How to Import Raw and Block Devices by Using <command>zonecfg</command></title><tasksummary><para>This procedure uses the <command>lofi</command> file driver, which exports
a file as a block device.</para>
</tasksummary><procedure><step id="z.admin.task-step-18"><para>Become superuser, or assume the Primary
Administrator role.</para><para>To create the role and assign the role to
a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="z.admin.task-step-20"><para>Change directories to <filename>/usr/tmp</filename>.</para><screen>global# <userinput>cd /usr/tmp</userinput></screen>
</step><step id="z.admin.task-step-38"><para>Create a new UFS file system.</para><screen>global# <userinput>mkfile 10m fsfile</userinput></screen>
</step><step id="z.admin.task-step-39"><para>Attach the file as a block device.</para><para>The first available slot, which is <filename>/dev/lofi/1</filename> if
no other <command>lofi</command> devices have been created, is used.</para><screen>global# <userinput>lofiadm -a `pwd`/fsfile</userinput></screen><para>You will also get the required character device.</para>
</step><step id="z.admin.task-step-41"><para>Import the devices into the zone <literal>my-zone</literal>.</para><screen>global# <userinput>zonecfg -z my-zone</userinput>
zonecfg:my-zone> <userinput>add device</userinput>
zonecfg:my-zone:device> <userinput>set match=/dev/rlofi/</userinput>1
zonecfg:my-zone:device> <userinput>end</userinput>
zonecfg:my-zone> <userinput>add device</userinput>
zonecfg:my-zone:device> <userinput>set match=/dev/lofi/1</userinput>
zonecfg:my-zone:device> <userinput>end</userinput></screen>
</step><step id="z.admin.task-step-42"><para>Reboot the zone.</para><screen>global# <userinput>zoneadm -z my-zone boot</userinput></screen>
</step><step id="z.admin.task-step-43"><para>Log in to the zone and verify that the
devices were successfully imported.</para><screen>my-zone# <userinput>ls  -l /dev/*lofi/*</userinput></screen><para>You will see a display that is similar to this:</para><screen>brw-------   1 root     sys      147,  1 Jan  7 11:26 /dev/lofi/1
crw-------   1 root     sys      147,  1 Jan  7 11:26 /dev/rlofi/1</screen>
</step>
</procedure><taskrelated role="see-also"><para>For more information, see  the <olink targetdoc="group-refman" targetptr="lofiadm-1m" remap="external"><citerefentry><refentrytitle>lofiadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> and <olink targetdoc="group-refman" targetptr="lofi-7d" remap="external"><citerefentry><refentrytitle>lofi</refentrytitle><manvolnum>7D</manvolnum></citerefentry></olink> man pages.</para>
</taskrelated>
</task><task id="z.admin.task-44"><title>How to Mount the File System Manually</title><tasksummary><para>You must be the zone administrator and have the Zone Management profile
to perform this procedure. This procedure uses the <command>newfs</command> command,
which is described in the <olink targetdoc="group-refman" targetptr="newfs-1m" remap="external"><citerefentry><refentrytitle>newfs</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</tasksummary><procedure><step><para>Become superuser, or have the Zone Management rights profile in
your list of profiles.</para>
</step><step id="z.admin.task-step-46"><para>In the zone <literal>my-zone</literal>,
create a new file system on the disk.</para><screen>my-zone# <userinput>newfs /dev/lofi/1</userinput></screen>
</step><step id="z.admin.task-step-47"><para>Respond yes at the prompt.</para><screen>newfs: construct a new file system /dev/rlofi/1: (y/n)? <userinput>y</userinput></screen><para>You will see a display that is similar to this:</para><screen>/dev/rlofi/1:   20468 sectors in 34 cylinders of 1 tracks, 602 sectors
        10.0MB in 3 cyl groups (16 c/g, 4.70MB/g, 2240 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 9664, 19296,</screen>
</step><step id="z.admin.task-step-48"><para>Check the file system for errors.</para><screen>my-zone# <userinput>fsck -F ufs /dev/rlofi/1</userinput></screen><para>You will see a display that is similar to this:</para><screen>** /dev/rlofi/1
** Last Mounted on 
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 9 used, 9320 free (16 frags, 1163 blocks, 0.2% fragmentation)</screen>
</step><step id="z.admin.task-step-49"><para>Mount the file system.</para><screen>my-zone# <userinput>mount -F ufs /dev/lofi/1 /mnt</userinput></screen>
</step><step id="z.admin.task-step-50"><para>Verify the mount.</para><screen>my-zone# <userinput>grep /mnt /etc/mnttab</userinput></screen><para>You will see a display similar to this:</para><screen>/dev/lofi/1     /mnt    ufs
rw,suid,intr,largefiles,xattr,onerror=panic,zone=foo,dev=24c0001
1073503869</screen>
</step>
</procedure>
</task><task id="z.admin.task-51"><title>How to Place a File System in <filename>/etc/vfstab</filename> to Be Mounted When the Zone Boots</title><tasksummary><para>This procedure is used to mount the block device <filename>/dev/lofi/1</filename> on
the file system path <filename>/mnt</filename>. The block device contains
a UFS file system. The following options are used:</para><itemizedlist><listitem><para><literal>logging</literal> is used as the mount option.</para>
</listitem><listitem><para><literal>yes</literal> tells the system to automatically mount
the file system when the zone boots.</para>
</listitem><listitem><para><filename>/dev/rlofi/1</filename> is the character (or raw)
device. The <command>fsck</command> command is run on the raw device if required.</para>
</listitem>
</itemizedlist>
</tasksummary><procedure><step><para>Become superuser, or have the Zone Management rights profile in
your list of profiles.</para>
</step><step id="z.admin.task-step-53"><para>In the zone <literal>my-zone</literal>,
add the following line to <filename>/etc/vfstab</filename>:</para><screen>/dev/lofi/1 /dev/rlofi/1  /mnt   ufs  2  yes logging</screen>
</step>
</procedure>
</task><task id="z.admin.task-12"><title>How to Mount a File System From the Global
Zone Into a Non-Global Zone</title><tasksummary><para>Assume that a zone has the <literal>zonepath</literal> <filename>/export/home/my-zone</filename>. You want to mount the disk <filename>/dev/lofi/1</filename> from
the global zone into <filename>/mnt</filename> in the non-global zone.</para><para>You must be the global administrator in the global zone to perform this
procedure.</para>
</tasksummary><procedure><step id="z.admin.task-step-15"><para>Become superuser, or assume the Primary
Administrator role.</para><para>To create the role and assign the role to
a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="z.admin.task-step-16"><para>To mount the disk into <filename>/mnt</filename> in
the non-global zone, type the following from the global zone:</para><screen>global# <userinput>mount -F ufs /dev/lofi/1 /export/home/my-zone/root/mnt</userinput></screen>
</step>
</procedure><taskrelated role="see-also"><para>For information about <command>lofi</command>, see the <citerefentry><refentrytitle>lofiadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry> and <citerefentry><refentrytitle>lofi</refentrytitle><manvolnum>7D</manvolnum></citerefentry> man
pages.</para>
</taskrelated>
</task>
</sect1><sect1 id="gbrkt"><title>Adding Non-Global Zone Access to Specific File Systems
in the Global Zone</title><task id="gbrlv"><title>How to Add Access to CD or DVD Media in a Non-Global
Zone</title><tasksummary><para>This procedure enables you to add read-only access to CD or DVD media
in a non-global zone. The Volume Management file system is used in the global
zone for mounting the media. A CD or DVD can then be used to install a product
in the non-global zone. This procedure uses a DVD named <literal>jes_05q4_dvd</literal>.</para>
</tasksummary><procedure><step id="gbrkz"><para>Become superuser, or assume the Primary Administrator
role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Determine whether the Volume Management file system is running
in the global zone.</para><screen>global# <userinput>svcs volfs</userinput>
STATE          STIME    FMRI
online         Sep_29   svc:/system/filesystem/volfs:default</screen>
</step><step><para>(Optional) If the Volume Management file system is not running
in the global zone, start it.</para><screen>global# <userinput>svcadm volfs enable</userinput></screen>
</step><step><para>Insert the media.</para>
</step><step><para>Check for media in the drive.</para><screen>global# <userinput>volcheck</userinput></screen>
</step><step><para>Test whether the DVD is automounted.</para><screen>global# <userinput>ls /cdrom</userinput></screen><para>You will see a display similar to the following:</para><screen>cdrom   cdrom1   jes_05q4_dvd</screen>
</step><step><para>Loopback mount the file system with the options <literal>ro,nodevices</literal> (read-only and no devices) in the non-global zone.</para><screen>global# <userinput>zonecfg -z my-zone</userinput>
zonecfg:my-zone> <userinput>add fs</userinput>
zonecfg:my-zone:fs> <userinput>set dir=/cdrom</userinput>
zonecfg:my-zone:fs> <userinput>set special=/cdrom</userinput>
zonecfg:my-zone:fs> <userinput>set type=lofs</userinput>
zonecfg:my-zone:fs> <userinput>add options [ro,nodevices]</userinput>
zonecfg:my-zone:fs> <userinput>end</userinput>
zonecfg:my-zone> <userinput>commit</userinput>
zonecfg:my-zone> <userinput>exit</userinput></screen>
</step><step><para>Reboot the non-global zone.</para><screen>global# <userinput>zoneadm -z my-zone reboot</userinput></screen>
</step><step><para>Use the <command>zoneadm</command> <command>list</command> command
with the <option>v</option> option to verify the status.</para><screen>global# <userinput>zoneadm list -v</userinput></screen><para>You will see a display that is similar to the following:</para><screen>ID  NAME     STATUS       PATH                           BRAND      IP
 0  global   running      /                              native     shared
 1  my-zone  running      /export/home/my-zone           native     shared</screen>
</step><step><para>Log in to the non-global zone.</para><screen>global# <userinput>zlogin my-zone</userinput></screen>
</step><step><para>Verify the DVD-ROM mount.</para><screen>my-zone# <userinput>ls /cdrom</userinput></screen><para>You will see a display similar to this:</para><screen>cdrom   cdrom1   jes_05q4_dvd</screen>
</step><step><para>Install the product as described in the product installation guide.</para>
</step><step><para>Exit the non-global zone.</para><screen>my-zone# <userinput>exit</userinput></screen><tip><para>You might want to retain the <literal>/cdrom</literal> file system
in your non-global zone. The mount will always reflect the current contents
of the CD-ROM drive, or an empty directory if the drive is empty.</para>
</tip>
</step><step><para>(Optional) If you want to remove the <literal>/cdrom</literal> file
system from the non-global zone, use the following procedure.</para><screen>global# <userinput>zonecfg -z my-zone</userinput>
zonecfg:my-zone> <userinput>remove fs dir=/cdrom</userinput>
zonecfg:my-zone> <userinput>commit</userinput>
zonecfg:my-zone> <userinput>exit</userinput></screen>
</step>
</procedure>
</task><task id="gbrke"><title>How to Add a Writable Directory under <literal>/usr</literal> in
a Non-Global Zone</title><tasksummary><para>In a sparse root zone, <literal>/usr</literal> is mounted read-only
from the global zone. You can use this procedure to add a writable directory,
such as <literal>/usr/local</literal>, under <literal>/usr</literal> in your
zone.</para><para>You must be the global administrator in the global zone to perform this
procedure.</para>
</tasksummary><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Create the directory <literal>/usr/local</literal> in the global
zone.</para><screen>global# <userinput>mkdir -p /usr/local</userinput></screen>
</step><step><para>Specify a directory in the global zone to serve as the backing
store for the zone's <literal>/usr/local</literal> directory.</para><screen>global# <userinput>mkdir -p /storage/local/my-zone</userinput></screen>
</step><step><para>Edit the configuration for the zone <replaceable>my-zone</replaceable>.</para><screen>global# <userinput>zonecfg -z my-zone</userinput></screen>
</step><step><para>Add the loopback-mounted filesystem.</para><screen>zonecfg:my-zone> <userinput>add fs</userinput>
zonecfg:my-zone:fs> <userinput>set dir=/usr/local</userinput>
        zonecfg:my-zone:fs> <userinput>set special=/storage/local/my-zone</userinput>
        zonecfg:my-zone:fs> <userinput>set type=lofs</userinput>
        zonecfg:my-zone:fs> <userinput>end</userinput>
        zonecfg:my-zone> <userinput>commit</userinput>
        zonecfg:my-zone> <userinput>exit</userinput></screen>
</step><step><para>Boot the zone.</para>
</step>
</procedure>
</task><task id="gbrlq"><title>How to Export Home Directories in the Global Zone
Into a Non-Global Zone</title><tasksummary><para>This procedure is used to export home directories or other file systems
from the global zone into non-global zones on the same system.</para><para>You must be the global administrator in the global zone to perform this
procedure.</para>
</tasksummary><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Add the loopback-mounted filesystem.</para><screen>global# <userinput>zonecfg -z my-zone</userinput>
zonecfg:my-zone> <userinput>add fs</userinput>
zonecfg:my-zone:fs> <userinput>set dir=/export/home</userinput>
zonecfg:my-zone:fs> <userinput>set special=/export/home</userinput>
zonecfg:my-zone:fs> <userinput>set type=lofs</userinput>
zonecfg:my-zone:fs> <userinput>set options=nodevices</userinput>
zonecfg:my-zone:fs> <userinput>end</userinput>
zonecfg:my-zone> <userinput>commit</userinput>
zonecfg:my-zone> <userinput>exit</userinput></screen>
</step><step><para>Add the following line to the zone's <literal>/etc/auto_home</literal> file:</para><screen>$HOST:/export/home/&amp;</screen>
</step>
</procedure>
</task>
</sect1><sect1 id="z.admin.task-54"><title>Using IP Network Multipathing on a Solaris
System With Zones Installed</title><task id="geofy"><title>How to Use IP Network Multipathing in Exclusive-IP
Non-Global Zones</title><tasksummary><para>IP Network Multipathing (IPMP) in an exclusive-IP zone is configured
as it is in the global zone.</para><para>You can configure one or more physical interfaces into an IP multipathing
group, or IPMP group. After configuring IPMP, the system automatically monitors
the interfaces in the IPMP group for failure. If an interface in the group
fails or is removed for maintenance, IPMP automatically migrates, or fails
over, the failed interface's IP addresses. The recipient of these addresses
is a functioning interface in the failed interface's IPMP group. The failover
feature of IPMP preserves connectivity and prevents disruption of any existing
connections. Additionally, IPMP improves overall network performance by automatically
spreading out network traffic across the set of interfaces in the IPMP group.
This process is called load spreading.</para>
</tasksummary><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Configure IPMP groups as described in <olink targetdoc="sysadv3" targetptr="deploynetmult-57" remap="external"><citetitle remap="section">Configuring IPMP Groups</citetitle> in <citetitle remap="book">System Administration Guide: IP Services</citetitle></olink>.</para>
</step>
</procedure>
</task><task id="z.admin.task-60"><title>How to Extend IP Network Multipathing Functionality
to Shared-IP Non-Global Zones</title><tasksummary><para>Use this procedure to configure IPMP in the global zone and extend the
IPMP functionality to non-global zones.</para><para>Each address, or logical interface, should be associated with a non-global
zone when you configure the zone. See <olink targetptr="z.config.ov-5" remap="internal">Using
the zonecfg Command</olink> and <olink targetptr="z.conf.start-29" remap="internal">How to
Configure the Zone</olink> for instructions.</para><para>This procedure accomplishes the following:</para><itemizedlist><listitem><para>The cards <literal>bge0</literal> and <literal>hme0</literal> are
configured together in a group.</para>
</listitem><listitem><para>Address 192.168.0.1 is associated with the non-global zone <replaceable>my-zone</replaceable>.</para>
</listitem><listitem><para>The <literal>bge0</literal> card is set as the physical interface.
Thus, the IP address is hosted in the group that contains the <literal>bge0</literal> and <literal>hme0</literal> cards.</para>
</listitem>
</itemizedlist><para>In a running zone, you can use the <command>ifconfig</command> command
to make the association. See <olink targetptr="z.admin.ov-12" remap="internal">Shared-IP Network
Interfaces</olink> and the <olink targetdoc="group-refman" targetptr="ifconfig-1m" remap="external"><citerefentry><refentrytitle>ifconfig</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><para>You must be the global administrator in the global zone to perform this
procedure.</para>
</tasksummary><procedure><step id="z.admin.task-step-56"><para>Become superuser, or assume the Primary
Administrator role.</para><para>To create the role and assign the role to
a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="z.admin.task-step-57"><para>In the global zone, configure IPMP groups
as described in <olink targetdoc="sysadv3" targetptr="deploynetmult-57" remap="external"><citetitle remap="section">Configuring IPMP Groups</citetitle> in <citetitle remap="book">System Administration Guide: IP Services</citetitle></olink>.</para>
</step><step id="z.admin.task-step-58"><para>Use the <command>zonecfg</command> command
to configure the zone. When you configure the <literal>net</literal> resource,
add address <literal>192.168.0.1</literal> and physical interface <literal>bge0</literal> to
the zone <replaceable>my-zone</replaceable>:</para><screen>zonecfg:my-zone> <userinput>add net</userinput>
zonecfg:my-zone:net> <userinput>set address=192.168.0.1</userinput>
zonecfg:my-zone:net> <userinput>set physical=bge0</userinput>
zonecfg:my-zone:net> <userinput>end</userinput></screen><para>Only <literal>bge0</literal> would be visible in non-global zone <replaceable>my-zone</replaceable>.</para>
</step>
</procedure><taskrelated-custom><title>If <literal>bge0</literal> Subsequently Fails</title><para>If <literal>bge0</literal> subsequently fails and the <literal>bge0</literal> data
addresses fail over to <literal>hme0</literal> in the global zone, the <replaceable>my-zone</replaceable> addresses migrate as well.</para><para>If address <literal>192.168.0.1</literal> moves to <literal>hme0</literal>,
then only <literal>hme0</literal> would now be visible in non-global zone <replaceable>my-zone</replaceable>. This card would be associated with address <literal>192.168.0.1</literal>, and <literal>bge0</literal> would no longer be visible.</para>
</taskrelated-custom>
</task>
</sect1><sect1 id="geohb"><title>Administering Data-Links in Exclusive-IP Non-Global
Zones</title><para>The <command>dladm</command> command is used from the global zone to administer data-links.</para><task id="geofw"><title>How to Use <command>dladm</command> <literal>show-linkprop</literal></title><tasksummary><para>The <command>dladm</command> command can be used with the <literal>show-linkprop</literal> subcommand to show the assignment of data-links to running exclusive-IP
zones. </para><para>You must be the global administrator in the global zone to administer
data-links.</para>
</tasksummary><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Show the assignment of data-links on the system.</para><screen>global# <userinput>dladm show-linkprop</userinput></screen>
</step>
</procedure><example id="geogi"><title>Using <command>dladm</command> With the <literal>show-linkprop</literal> subcommand</title><orderedlist><listitem><para>In the first screen, zone <literal>49bge</literal>, which
is assigned <literal>bge0</literal> has not been booted</para><screen>global# <userinput>dladm show-linkprop</userinput>
LINK         PROPERTY        VALUE          DEFAULT        POSSIBLE
bge0         zone            --             --             --
ath0         channel         6              --             --
ath0         powermode       ?              off            off,fast,max
ath0         radio           ?              on             on,off
ath0         speed           11             -- 
1,2,5.5,6,9,11,12,18,24,36,48,54
ath0         zone            --             --             --</screen>
</listitem><listitem><para>Zone <literal>49bge</literal> is booted.</para><screen>global# <userinput>zoneadm -z 49bge boot</userinput></screen>
</listitem><listitem><para>The command <command>dladm</command> <literal>show-linkprop</literal> is
run again. Note that the <literal>bge0</literal> link is now assigned to <literal>49bge</literal>.</para><screen>global# <userinput>dladm show-linkprop</userinput>
LINK         PROPERTY        VALUE          DEFAULT        POSSIBLE
bge0         zone            49bge          --             --
ath0         channel         6              --             --
ath0         powermode       ?              off            off,fast,max
ath0         radio           ?              on             on,off
ath0         speed           11             -- 
1,2,5.5,6,9,11,12,18,24,36,48,54
ath0         zone            --             --             --</screen>
</listitem>
</orderedlist>
</example>
</task><task id="geofr"><title>How to Use <command>dladm</command> <literal>set-linkprop</literal></title><tasksummary><para>The <command>dladm</command> command can be used with the <literal>set-linkprop</literal> subcommand to temporarily assign data-links to running exclusive-IP
zones. Persistent assignment must be made through the <command>zonecfg</command> command.</para><para>You must be the global administrator in the global zone to administer
data-links.</para>
</tasksummary><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Use <command>dladm</command> <literal>set-linkprop</literal> with
the <option>t</option> to add <literal>bge0</literal> to a running zone called <literal>excl</literal>.</para><screen>global# <userinput>dladm set-linkprop -t -p zone=excl bge0</userinput>
LINK         PROPERTY        VALUE          DEFAULT        POSSIBLE
bge0         zone            excl           --             --</screen><tip><para>The <option>p</option> option produces a display using a stable
machine-parseable format.</para>
</tip>
</step>
</procedure>
</task><task id="geofj"><title>How to Use <command>dladm</command> <literal>reset-linkprop</literal></title><tasksummary><para>The <command>dladm</command> command can be used with the <literal>reset-linkprop</literal> subcommand to reset the <literal>bge0</literal> link value to unassigned.</para>
</tasksummary><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Use <command>dladm</command> <literal>reset-linkprop</literal> with
the <option>t</option> to undo the zone assignment of the <literal>bge0</literal> device.</para><screen>global# <userinput>dladm set-linkprop -t -p zone=excl bge0</userinput>
LINK         PROPERTY        VALUE          DEFAULT        POSSIBLE
bge0         zone            excl           --             --</screen><tip><para>The <option>p</option> option produces a display using a stable
machine-parseable format.</para>
</tip>
</step>
</procedure><taskrelated role="troubleshooting"><para>If the running zone is using the device, the reassignment fails and
an error message is displayed. See <olink targetptr="geoin" remap="internal">Exclusive-IP Zone
Is Using Device, so dladm reset-linkprop Fails</olink>.</para>
</taskrelated>
</task>
</sect1><sect1 id="z.admin.task-71"><title>Using the Fair Share Scheduler on a Solaris
System With Zones Installed</title><para>Limits specified through the <command>prctl</command> command are not
persistent. The limits are only in effect until the system is rebooted. To
set shares in a zone permanently, see <olink targetptr="z.conf.start-29" remap="internal">How
to Configure the Zone</olink> and <olink targetptr="gejpu" remap="internal">How to Set zone.cpu-shares
in the Global Zone</olink>.</para><task id="z.admin.task-76"><title>How to Set FSS Shares in the Global Zone
Using the <command>prctl</command> Command</title><tasksummary><para>The global zone is given one share by default. You can use this procedure
to change the default allocation. Note that you must reset shares allocated
through the <command>prctl</command> command whenever you reboot the system.</para><para>You must be the global administrator in the global zone to perform this
procedure.</para>
</tasksummary><procedure><step id="z.admin.task-step-79"><para>Become superuser, or assume the Primary
Administrator role.</para><para>To create the role and assign the role to
a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="z.admin.task-step-80"><para>Use the <command>prctl</command> utility
to assign two shares to the global zone:</para><screen># <userinput>prctl -n zone.cpu-shares -v 2 -r -i zone global</userinput></screen>
</step><step id="z.admin.task-step-81"><para>(Optional) To verify the number of shares
assigned to the global zone, type:</para><screen># <userinput>prctl -n zone.cpu-shares -i zone global</userinput></screen>
</step>
</procedure><taskrelated role="see-also"><para>For more information on the <command>prctl</command> utility, see the <olink targetdoc="group-refman" targetptr="prctl-1" remap="external"><citerefentry><refentrytitle>prctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page.</para>
</taskrelated>
</task><task id="fiouo"><title>How to Change the <literal>zone.cpu-shares</literal> Value
in a Zone Dynamically</title><tasksummary><para>You must be the global administrator in the global zone to perform this
procedure.</para>
</tasksummary><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink></para>
</step><step><para>Use the <command>prctl</command> command to specify a new value
for <literal>cpu-shares</literal>. </para><screen># <userinput>prctl -i <replaceable>idtype</replaceable> -n zone.cpu-shares -r -v value</userinput></screen><para><replaceable>idtype</replaceable> is either the <replaceable>zonename</replaceable> or
the <replaceable>zoneid</replaceable>. <replaceable>value</replaceable> is
the new value.</para>
</step>
</procedure>
</task>
</sect1><sect1 id="z.admin.task-21"><title>Using Rights Profiles in Zone Administration</title><para>This
section covers tasks associated with using rights profiles in non-global zones.</para><task id="z.admin.task-22"><title>How to Assign the Zone Management Profile</title><tasksummary><para>The Zone Management profile grants the power to manage all of the non-global
zones on the system to a user.</para><para>You must be the global administrator in the global zone to perform this
procedure.</para>
</tasksummary><procedure><step id="z.admin.task-step-24"><para>Become superuser, or assume the Primary
Administrator role.</para><para>To create the role and assign the role to
a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="z.admin.task-step-25"><para>Create a role that includes the Zone
Management rights profile, and assign the  role to a user.</para><itemizedlist><listitem><para>To create and assign the role by using the Solaris Management
Console, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
Refer to the task &ldquo;How to Create and Assign a Role By Using the  GUI.&rdquo;</para>
</listitem><listitem><para>To create and assign the role on the command line, see <olink targetdoc="sysadv6" targetptr="rbactask-4" remap="external"><citetitle remap="section">Managing RBAC</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>. Refer to the task &ldquo;How to Create a Role
From the Command Line.&rdquo;</para>
</listitem>
</itemizedlist>
</step>
</procedure>
</task><sect2 id="z.admin.task-26"><title>Example&mdash;Using Profile Shells With
Zone Commands</title><para>You can execute zone commands in a profile using the <command>pfexec</command> program.
The program executes commands with the attributes specified by the user's
profiles in the <command>exec_attr</command> database. The program is invoked
by the profile shells <literal>pfksh</literal>, <literal>pfcsh</literal>,
and <literal>pfsh</literal>.</para><para>Use the <literal>pfexec</literal> program to log in to a zone, for example, <literal>my-zone</literal>.</para><screen>machine$ <userinput>pfexec zlogin my-zone</userinput></screen>
</sect2>
</sect1><sect1 id="gbrko"><title>Backing Up a Solaris System With Installed Zones</title><para>The following procedures can be used to back up files in zones. Remember
to also back up the zones' configuration files.</para><task id="gbrni"><title>How to Use <command>ufsdump</command> to Perform Backups</title><tasksummary><para>You can perform full or incremental backups using the <command>ufsdump</command> command.
This procedure backs up the zone <literal>/export/my-zone</literal> to <literal>/backup/my-zone.ufsdump</literal>, where <replaceable>my-zone</replaceable> is replaced with the
name of a zone on your system. You might want to have a separate file system,
for example, a file system mounted on <literal>/backup</literal>,  to hold
the backups.</para>
</tasksummary><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>(Optional) Shut down the zone to put the zone in a quiescent state
and to avoid creating backups of shared file systems.</para><screen>global# <userinput>zlogin -S my-zone init 0</userinput></screen>
</step><step><para>Check the zone's status.</para><screen>global# <userinput>zoneadm list -cv</userinput></screen><para>You will see a display similar to the following:</para><screen>ID  NAME     STATUS       PATH                           BRAND      IP
 0  global   running      /                              native     shared
 -  my-zone  installed    /export/home/my-zone           native     shared</screen>
</step><step><para>Perform the backup.</para><screen>global# <userinput>ufsdump 0f /backup/my-zone.ufsdump /export/my-zone</userinput></screen><para>You will see a display similar to the following:</para><screen>DUMP: Date of this level 0 dump: Wed Aug 10 16:13:52 2005
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/rdsk/c0t0d0s0 (bird:/) to /backup/my-zone.ufsdump. 
DUMP: Mapping (Pass I) [regular files]
DUMP: Mapping (Pass II) [directories]
DUMP: Writing 63 Kilobyte records
DUMP: Estimated 363468 blocks (174.47MB).
DUMP: Dumping (Pass III) [directories]
DUMP: Dumping (Pass IV) [regular files]
DUMP: 369934 blocks (180.63MB) on 1 volume at 432 KB/sec
DUMP: DUMP IS DONE</screen>
</step><step><para>Boot the zone.</para><screen>global# <userinput>zoneadm -z my-zone boot</userinput></screen>
</step>
</procedure>
</task><task id="gbrmf"><title>How to Create a UFS Snapshot Using <command>fssnap</command></title><tasksummary><para>This approach uses the <command>fssnap</command> command, which creates
a temporary image of a file system intended for backup operations.</para><para>This method can be used to provide a clean, consistent backup of the
zone files only, and it can be executed while zones are running. However,
it is a good idea to suspend or checkpoint active applications that are updating
files when the snapshot is created. An application updating files when the
snapshot is created might leave these files in an internally inconsistent,
truncated, or otherwise unusable state. </para><para>In the example procedure below, note the following:</para><itemizedlist><listitem><para>There is a zone named <literal>my-zone</literal> under <literal>/export/home</literal>.</para>
</listitem><listitem><para><literal>/export/home</literal> is a separate file system.</para>
</listitem>
</itemizedlist>
</tasksummary><taskprerequisites><para>The destination backup is <literal>/backup/my-zone.ufs</literal>. You
must create the directory <literal>backup</literal> under <literal>/</literal>.</para>
</taskprerequisites><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Create the snapshot.</para><screen>global# <literal>fssnap -o bs=/export /export/home</literal></screen><para>You will see a display similar to the following:</para><screen>dev/fssnap/0</screen>
</step><step><para>Mount the snapshot.</para><screen>global# <userinput>mount -o ro /dev/fssnap/0 /mnt</userinput></screen>
</step><step><para>Back up <literal>my-zone</literal> from the snapshot.</para><screen>global# <literal>ufsdump 0f /backup/my-zone.ufsdump /mnt/my-zone</literal></screen><para>You will see a display similar to the following:</para><screen>DUMP: Date of this level 0 dump: Thu Oct 06 15:13:07 2005
   DUMP: Date of last level 0 dump: the epoch
   DUMP: Dumping /dev/rfssnap/0 (pc2:/mnt) to /backup/my-zone.ufsdump.
   DUMP: Mapping (Pass I) [regular files]
   DUMP: Mapping (Pass II) [directories]
   DUMP: Writing 32 Kilobyte records
   DUMP: Estimated 176028 blocks (85.95MB).
   DUMP: Dumping (Pass III) [directories]
   DUMP: Dumping (Pass IV) [regular files]
   DUMP: 175614 blocks (85.75MB) on 1 volume at 2731 KB/sec
   DUMP: DUMP IS DONE</screen>
</step><step><para>Unmount the snapshot.</para><screen>global# <userinput>umount /mnt</userinput></screen>
</step><step><para>Delete the snapshot.</para><screen>global# <userinput>fssnap -d /dev/fssnap/0</userinput></screen><para>Note that the snapshot is also removed from the system when the system
is rebooted.</para>
</step>
</procedure>
</task><task id="gbrnr"><title>How to Use <command>find</command> and <command>cpio</command> to
Perform Backups</title><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Change directories to the root directory.</para><screen>global# <userinput>cd /</userinput></screen>
</step><step><para>Back up <literal>my-zone</literal> files that are not loopback
mounted to <literal>/backup/my-zone.cpio</literal>.</para><screen>global# <userinput>find export/my-zone -fstype lofs -prune -o -local
 | cpio -oc -O /backup/my-zone.cpio</userinput> <lineannotation>type as one line</lineannotation></screen>
</step><step><para>Verify the results.</para><screen>global# <userinput>ls -l backup/my-zone.cpio</userinput></screen><para>You will see a display similar to the following:</para><screen>-rwxr-xr-x   1 root     root     99680256 Aug 10 16:13 backup/my-zone.cpio</screen>
</step>
</procedure>
</task><task id="gbrnd"><title>How to Print a Copy of a Zone Configuration</title><tasksummary><para>You should create backup files of your non-global zone configurations.
You can use the backups to recreate the zones later if necessary. Create the
copy of the zone's configuration after you have logged in to the zone for
the first time and have responded to the <command>sysidtool</command> questions.
This procedure uses a zone named <literal>my-zone</literal> and a backup file
named <literal>my-zone.config</literal> to illustrate the process.</para>
</tasksummary><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Print the configuration for the zone <literal>my-zone</literal> to
a file named <literal>my-zone.config</literal>.</para><screen>global# <userinput>zonecfg -z my-zone export > my-zone.config</userinput></screen>
</step>
</procedure>
</task>
</sect1><sect1 id="gbrmv"><title>Restoring a Non-Global Zone</title><task id="gbrmi"><title>How to Restore an Individual Non-Global Zone</title><tasksummary><para>You can use the backup files of your non-global zone configurations
to restore non-global zones, if necessary. This procedure uses a zone named <literal>my-zone</literal> and a backup file named <literal>my-zone.config</literal> to
illustrate the process of restoring a zone.</para>
</tasksummary><procedure><step><para>Become superuser, or assume the Primary Administrator role.</para><para>To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-95" remap="external"><citetitle remap="section">Using the Solaris Management Tools With RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Specify that <literal>my-zone.config</literal> be used as the <command>zonecfg</command> command file to recreate the zone <literal>my-zone</literal>.</para><screen>global# <userinput>zonecfg -z my-zone -f my-zone.config</userinput></screen>
</step><step><para>Install the zone.</para><screen>global# <userinput>zoneadm -z my-zone install</userinput></screen>
</step><step><para>To prevent the system from displaying the <command>sysidtool</command> questions
upon initial zone login, delete the file <replaceable>zonepath</replaceable><literal>/root/etc/.UNCONFIGURED</literal>, for example:</para><screen>global# <userinput>rm /export/home/my-zone/root/etc/.UNCONFIGURED</userinput></screen>
</step><step><para>If you have any zone-specific files to restore, such as application
data, manually restore (and possibly hand-merge) files from a backup into
the newly created zone's root file system.</para>
</step>
</procedure>
</task>
</sect1>
</chapter>