Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

System Administration Guide: Virtualization Using the Solaris Operating System
Previous Next

About Adding Packages in Zones

The pkgadd system utility described in the pkgadd(1M) man page is used to add packages on a Solaris system with zones installed.

Using pkgadd in the Global Zone

The pkgadd utility can be used with the -G option in the global zone to add the package to the global zone only. The package is not propagated to any other zones. Note that if SUNW_PKG_THISZONE=true, you do not have to use the -G option. If SUNW_PKG_THISZONE=false, the -G option will override it.

When you run the pkgadd utility in the global zone, the following actions apply.

  • The pkgadd utility is able to add a package:

    • To the global zone only, unless the package is SUNW_PKG_ALLZONES=true

    • To the global zone and to all non-global zones

    • To all non-global zones only, if the package is already installed in the global zone

    • To the current zone only, if SUNW_PKG_THISZONE=true

  • The pkgadd utility cannot add a package:

    • To any subset of the non-global zones

    • To all non-global zones, unless the package is already installed in the global zone

  • If the pkgadd utility is run without the -G option and SUNW_PKG_THISZONE=false , the specified package is added to all zones by default. The package is not marked as installed in the global zone only.

  • If the pkgadd utility is run without the -G option and SUNW_PKG_THISZONE=true, then the specified package is added to the current (global) zone by default. The package is marked as installed in the global zone only.

  • If the -G option is used, the pkgadd utility adds the specified package to the global zone only. The package is marked as installed in the global zone only. The package is not installed when any non-global zone is installed.

Adding a Package to the Global Zone and to All Non-Global Zones

To add a package to the global zone and to all non-global zones, execute the pkgadd utility in the global zone. As the global administrator, run pkgadd without the -G option.

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

The following steps are performed by the pkgadd utility:

  • Package dependencies are checked on the global zone and on all non-global zones. If required packages are not installed in any zone, 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 is added to each non-global zone and the database in the global zone is updated.

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

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.

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire