sun.com docs.sun.com My Sun Worldwide Sites

Previous Previous     Contents     Index     Next Next

Adding a Package to the Global Zone Only

To add a package to the global zone only, as the global administrator in the global zone, execute the pkgadd utility with the -G option only.

A package can be added to the global zone if the following conditions are true:

  • The package contents do not affect any area of the global zone that is shared with any non-global zone.

  • The package is set SUNW_PKG_ALLZONES=false.

The following steps are performed by the pkgadd utility:

  • If the package contents affect any area of the global zone that is shared with any non-global zone, or if the package is set SUNW_PKG_ALLZONES=true, then pkgadd fails. The error message states that the package must be added to the global zone and to all non-global zones.

  • Package dependencies are checked on the global zone only. If required packages are not installed, then the dependency check fails. The system notifies the global administrator, who is prompted whether to continue.

  • The package is added to the global zone.

  • The package database on the global zone is updated.

  • The package information on the global zone is annotated to indicate that this package is installed on the global zone only. If a non-global zone is installed in the future, this package will not be installed.

Adding a Package Installed in the Global Zone to all Non-Global Zones

To add a package that is already installed in the global zone to all non-global zones, you must currently remove the package from the global zone and reinstall it in all zones.

These are the steps used to add a package that is already installed in the global zone to all of the non-global zones:

  1. In the global zone, use pkgrm to remove the package.

  2. Add the package without using the -G option.

Using pkgadd in a Non-Global Zone

To add a package in a specified non-global zone, execute the pkgadd utility, without options, as the zone administrator. The following conditions apply:

  • The pkgadd utility can only add packages in the non-global zone in which the utility is used.

  • The package cannot affect any area of the zone that is shared from the global zone.

  • The package must be set SUNW_PKG_ALLZONES=false.

The following steps are performed by the pkgadd utility:

  • Package dependencies are checked on the non-global zone's package database before the package is added. If required packages are not installed, then the dependency check fails. The system notifies the non-global zone administrator, who is prompted whether to continue. The check fails if either of the following conditions are true.

    • Any component of the package affects any area of the zone that is shared from the global zone.

    • The package is set SUNW_PKG_ALLZONES=true.

  • The package is added to the zone.

  • The package database on the zone is updated.

About Removing Packages in Zones

The pkgrm utility described in the pkgrm(1M) man page supports removing packages on a Solaris system with zones installed.

Using pkgrm in the Global Zone

The pkgrm utility can be used with the -G option from the global zone to remove packages from the global zone only. The package must not affect any area of the global zone shared with non-global zones or be installed in any non-global zone.

When the pkgrm utility is used in the global zone, the following actions apply.

  • pkgrm can remove a package from the global zone and from all non-global zones, or from the global zone only when the package is only installed in the global zone.

  • pkgrm cannot remove a package only from the global zone if the package is also installed in a non-global zone, or remove a package from any subset of the non-global zones.

Note that a package can only be removed from a non-global zone by a zone administrator working in that zone if the following are true:

  • The package does not affect any area on the non-global zone that is shared from the global zone.

  • The package is set SUNW_PKG_ALLZONES=false.

Removing a Package From the Global Zone and From all Non-Global Zones

To remove a package from the global zone and from all non-global zones, execute the pkgrm utility in the global zone. As the global administrator, run pkgrm without the -G option.

A package can be removed from the global zone and from all non-global zones without regard to the area affected by the package.

The following steps are performed by the pkgrm utility:

  • Package dependencies are checked on the global zone and on all non-global zones. If the dependency check fails, then pkgrm fails. The system notifies the global administrator, who is prompted whether to continue.

  • The package is removed from each non-global zone.

  • The package database on each non-global zone is updated.

  • The package is removed from the global zone.

  • The package database on the global zone is updated.

Previous Previous     Contents     Index     Next Next
Company Info Contact Terms of Use Privacy Copyright 1994-2007 Sun Microsystems, Inc.