System Administration Guide: Virtualization Using the Solaris Operating System

ProcedureHow to Install a Configured Zone

This procedure is used to install a configured non-global zone.

You must be the global administrator in the global zone to perform this procedure.

Note –

In Step 2, if the zonepath is on ZFS, the zoneadm install command automatically creates a ZFS file system (dataset) for the zonepath when the zone is installed. You can block this action by including the -x nodataset parameter.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Install the configured zone my-zone by using the zoneadm command with the install option.

    • Install the zone, automatically creating a ZFS file system if the zonepath is on ZFS.

      global# zoneadm -z my-zone install

      The system will display:

      A ZFS file systm has been created for this zone.
    • Install the zone that has a zonepath on ZFS, but do not automatically create the ZFS file system.

      global# zoneadm -z my-zone install -x nodataset

    You will see various messages as the files and directories needed for the zone's root file system are installed under the zone's root path.

  3. (Optional) If an error message is displayed and the zone fails to install, type the following to get the zone state:

    global# zoneadm -z my-zone list -v
    • If the state is listed as configured, make the corrections specified in the message and try the zoneadm install command again.

    • If the state is listed as incomplete, first execute this command:

      global# zoneadm -z my-zone uninstall

      Then make the corrections specified in the message, and try the zoneadm install command again.

  4. When the installation completes, use the list subcommand with the -i and -v options to list the installed zones and verify the status.

    global# zoneadm list -iv

    You will see a display that is similar to the following:

    ID  NAME     STATUS       PATH                           BRAND      IP
     0  global   running      /                              native     shared
     -  my-zone  installed    /export/home/my-zone           native     shared

If a zone installation is interrupted or fails, the zone is left in the incomplete state. Use uninstall -F to reset the zone to the configured state.

Next Steps

This zone was installed with the minimal network configuration described in Chapter 17, Managing Services (Tasks), in System Administration Guide: Basic Administration by default. You can switch to the open network configuration, or enable or disable individual services, when you log in to the zone. See Switching the Non-Global Zone to a Different Networking Service Configuration for details.