Go to main content

Creating and Using Oracle® Solaris 10 Zones

Exit Print View

Updated: October 2017

How to Create and Activate Multiple Boot Environments on a solaris10 Branded Zone

  1. Become an administrator.

    For more information, see Assigning Rights to Non-Root Users to Manage Zones in Creating and Using Oracle Solaris Zones.

  2. Configure the solaris10 zone.

    In this procedure, the zone s10_zone with the configuration file /zones/S10_ZONE.cfg is used on the global zone, global.

    global$ zonecfg -z S10_zone -f /zones/S10_ZONE.cfg
  3. Install the solaris10 zone.

    The flash archive image file /zones/s10-system.flar is used in this procedure.

    global$ zoneadm -z S10_zone install -u -v -a /zones/s10-system.flar
  4. Boot the solaris10 zone.
    global$ zoneadm -z S10_zone boot
  5. On the solaris10 zone, create a new boot environment using ZFS commands.
    1. Create a ZFS snapshot.

      The snapshot rpool/ROOT/zbe-0@snap is used in this procedure.

      S10_zone# zfs snapshot rpool/ROOT/zbe-0@snap
    2. Clone and mount the new ZFS snapshot.

      In this case, the ZFS snapshot rpool/ROOT/zbe-0@snap is mounted to / and cloned to a new ZFS snapshot,rpool/ROOT/zbe-1 :

      S10_zone# zfs clone -o mountpoint=/ -o canmount=noauto rpool/ROOT/zbe-0@snap rpool/ROOT/zbe-1
    3. Promote the new ZFS snapshot.
      S10_zone# zfs promote rpool/ROOT/zbe-1
  6. Patch the new boot environment.
    1. Mount the new ZFS snapshot.
      S10_zone# zfs mount -o mountpoint=/mnt rpool/ROOT/zbe-1
    2. Run the patchadd command on the snapshot mount point.
      S10_zone# # patchadd -R /mnt -d /var/tmp  
      S10_zone# zfs unmount rpool/ROOT/zbe-1
    3. Unmount the new ZFS snapshot.
    S10_zone# zfs unmount rpool/ROOT/zbe-1
  7. Activate the new boot environment.
    S10_zone# zfs set com.oracle.zones.solaris10:activebe=zbe-1 rpool/ROOT
    S10_zone# shutdown -y -g 0 -r
  8. Boot the zone to have the changes take effect.
    global# zoneadm -z S10_zone boot

See Also

For further information about the zfs command and ZFS administration, refer to Managing ZFS File Systems in Oracle Solaris 11.3.