How to Upgrade the Solaris 10 OS With Non-global Zones Using Solaris Live Upgrade

Pallavi Madhusudhan, Arindam Sarkar, November 2007 ( Updated March 2009)

This article explains how to use Solaris Live Upgrade to upgrade the Solaris 10 OS with non-global zones installed.


Using Solaris Live Upgrade with Non-global Zones

Solaris Live Upgrade now supports upgrading a Solaris 10 OS with non-global zones. The Solaris 10 8/07 release includes a “zones upgrade” feature that enhances the Solaris platform upgrade mechanisms to fully support all non-global zones that are configured on the system. The zones upgrade feature includes support for using Solaris Live Upgrade with non-global zones.

Each non-global zone is treated as a separate Solaris instance by Solaris Live Upgrade and the underlying utilities. The global zone is upgraded first, followed by each of the non-global zones one at a time.

Note - Ensure that you completely backup your system before performing any installation, upgrade, or patching processes.


Planning for Solaris Live Upgrade

Install the Solaris Live Upgrade packages and patches before upgrading a system running any version of the Solaris 10 OS prior to the Solaris 10 8/07 release. The Solaris 10 system needs to be patched up to at least the patch levels listed in InfoDoc 206844. Depending on the version of the Solaris 10 system, you might find that some of these patches are already installed.

Required Packages

To upgrade a system to the Solaris 10 8/07 release, install the Solaris Live Upgrade packages from the Solaris 10 8/07 image. A new package, SUNWlucfg, is required before you can upgrade. The Solaris Live upgrade packages include existing software, new features, and bug fixes. If you do not remove your existing packages and install the new packages on your system before using Solaris Live Upgrade, upgrading to the target release might have problems. The new packages provide bug fixes and features that are not in the packages on your current system. See How to Install Required Packages in this article for information on how to install the packages.

Required Patches

When the packages are installed, apply the patches which are listed in InfoDoc 206844, required for upgrading using Solaris Live Upgrade. If you are storing the patches on a local disk, create a /var/tmp/lupatches directory and download the patches to that directory.

Before you install the patches, ensure that the following conditions are met:

  • Install Kernel patches in single-user mode.

  • Install all patches in single-user mode, when specified by the patch README file.

  • All zones are in the installed state.

  • All zone paths are accessible. If the zone path is on a different file system, the file system will not mount in single-user mode. Mount the particular file system or use the mountall command.

Some patches listed in InfoDoc 206844 are specific to Solaris Live Upgrade and zones. Downloading and installing these patches accomplishes the following tasks:

  • Updates the existing upgrade software to be zone aware, so that the software can upgrade the non-global zones with an acceptable level of performance

  • Updates the Solaris Live Upgrade software so that the software can fully manage the upgrade of non-global zones

The remaining patches listed in InfoDoc 206844 are necessary to bring the system up to the required patch level for upgrading the OS to the Solaris 10 8/07 release. All patches listed in InfoDoc 206844 are the lowest revisions of the patches necessary to perform the upgrade. The user can install the listed patch revisions or later revisions for upgrading.

How Shared File Systems are Managed By Solaris Live Upgrade

Solaris Live Upgrade recognizes when non-global zones are present in file systems that are shared between boot environments. When you upgrade the copy of the boot environment that shares a file system with an active boot environment, all shared file systems are mounted through read-only lofs mounts. This prevents the upgrade operation from corrupting the active boot environment that shares the same file systems.

Administrator Access to Boot Environments

When lucreate is used to create boot environments, the global zone administrator has access to the current boot environment and all inactive boot environments. When non-global zones are present, the global zone administrator has access to all boot environments.

However, each non-global zone administrator has access to the portion of the current boot environment that contains the file systems of that particular non-global zone. For a non-global zone administrator to access the zone's file system space in an inactive boot environment, the global zone administrator should mount the inactive boot environment in the global zone. The global zone administrator can then make the required file system space available to the non-global zone administrator through extensions to the lumount(1M) and luumount(1M) commands.

How to Install Required Packages

Perform the following steps to install the required Solaris Live Upgrade packages.

  1. Remove the existing Solaris Live Upgrade packages using the pkgrm command.

    The three Solaris Live Upgrade packages, SUNWlucfg, SUNWlur, and SUNWluu comprise the software needed to upgrade with Solaris Live Upgrade. These packages include existing software, new features, and bug fixes. Remove the existing packages and install the new packages on your system:

    # pkgrm SUNWlucfg SUNWluu SUNWlur

  2. Install the Solaris Live Upgrade packages.

    The following provide the steps to install the packages by using the liveupgrade20 command. The liveupgrade20 command requires Java. If your system does not have Java installed, then you need to use the pkgadd command to install the packages individually.

    1. Insert the Solaris DVD or CD.

      This media contains the packages for the release to which you are upgrading.

    2. Change to the installer directory.
      • If you are using the Solaris Operating System DVD:

        • For SPARC based systems:

          #cd /cdrom/cdrom0/s0/Solaris_10/Tools/Installers

        • For x86 based systems:

          # cd /cdrom/cdrom0/Solaris_10/Tools/Installers

      • If you are using the Solaris Software - 2 CD, run the installer.

        % ./installer

    3. Run the installer.

      # ./liveupgrade20 -noconsole - nodisplay

      The -noconsole and -nodisplay options prevent the character user interface (CUI) from displaying.

      Note - The Solaris Live Upgrade CUI is no longer supported.

    4. Verify that the packages have been installed successfully.

      # pkgchk -v SUNWlucfg SUNWlur SUNWluu

How to Install Solaris Live Upgrade Patches and Upgrade a System With Solaris Live Upgrade

  1. Set up the test system.

    Create and boot a sparse and whole root non-global zone, namely zone1 and zone2. For instructions about how to create and boot non-global zones, see System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.

  2. Install the patches listed in InfoDoc 206844.

    Change to the /var/tmp/lupatches directory and install the patches in the same order as listed in InfoDoc 206844.

    #cd /var/tmp/lupatches
    #patchadd  
                        
    patch_id
                      

    patch_id is the patch number.

  3. Assign UUIDs for all the non-global zones.

    To ensure that all non-global zones contain a universally unique identifier (UUID), perform a detach, attach, and boot of all the zones.

    #zoneadm -z zone1 detach      
    #zoneadm -z zone2 detach        
    #zoneadm -z zone1 attach        
    #zoneadm -z zone2 attach        
    #zoneadm -z zone1 boot          
    #zoneadm -z zone2 boot         
    

    Type the zoneadm list -p command to verify that all zones have been assigned a UUID.

    #zoneadm list -p            
    0:global:running:/::native:shared       
    16:zone1:running:/space/zone1:559ca0a2-d7c5-6a61-e64c-    bec99bb0910c:native:shared            
    17:zone2:running:/space/zone2:d3e6bc88-3533-6209-f25d-    e811e334295a:native:shared           
    
  4. Log in to the non-global zones at least once.

    The login ensures that the zones are up and in the running state. After logging in to each zone, exit from the zone.

    #zlogin zone1          
    #exit           
    #zlogin zone2           
    #exit          
    
  5. Create a new boot environment.

    Label the active boot environment as BE1 and the new boot environment as BE2. Create two file systems for the new boot environment, BE2.

    #lucreate -c  
                        
    BE1 -n  
                        
    BE2 -m  
                        
    /:/dev/dsk/c1t0d0s4:ufs  -m  
                        
    /space:/dev/dsk/c1t0d0s5:ufs
                      
    -c BE1

    Assigns the name BE1 to the current active boot environment.

    -n BE2

    Indicates the name of the new boot environment.

    -m /:/dev/dsk/c1t0d0s4:ufs

    Specifies the file systems' configuration of the new boot environment in the vfstab. Here the root (/) file system is placed on c1t0d0s4.

    -m /space:/dev/dsk/c1t0d0s5:ufs

    Creates a second file system on c1t0d0s5. The zone roots are present in /space.

  6. Activate the new boot environment.

    To verify that the new boot environment can be activated and is running, type the luactivate command.

    #luactivate BE2
    

    Reboot the system.

    #init 6
    
  7. From the new boot environment, relogin to the zones.

    The relogin ensures that the zones are functional in the new boot environment.

    #zoneadm -z zone1 boot          
    #zoneadm -z zone2 boot          
    #zlogin zone1           
    #exit           
    #zlogin zone2           
    #exit          
    
  8. Revert to the original boot environment.
    #luactivate BE1
    #init 6
    
  9. Verify the state of the zones in the original boot environment.

    Ensure that the zones are in the running state.

    #zoneadm -z zone1 boot
    #zoneadm -z zone2 boot
    #zoneadm list -cv       
    ID NAME             STATUS     PATH                           BRAND    IP               
    0 global           running    /                              native   shared            
    1 zone1            running    /space/zone1                   native   shared            
    2 zone2            running    /space/zone2                   native   shared            
    
    #zoneadm list -p        
    0:global:running:/::native:shared       
    1:zone1:running:/space/zone1:559ca0a2-d7c5-6a61-e64c-   bec99bb0910c:native:shared      
    2:zone2:running:/space/zone2:d3e6bc88-3533-6209-f25d-   e811e334295a:native:shared
    
  10. Upgrade the new boot environment.

    #luupgrade -u -n new-BE -s solaris-image-path

    luupgrade -u

    Upgrades the OS on the boot environment

    -n new-BE

    Name of the boot environment that is to be upgraded

    -s solaris-image-path

    Specifies the Solaris image path

    For example:

    #luupgrade -u -n BE2 -s /net/ins3525-svr/export2/s10u4/dvds/latest
    
    159376 blocks
    miniroot file system is <lofs>
    Mounting miniroot at </net/ins3525-svr/export2/s10u4/dvds/latest/Solaris_10/Tools/Boot>
    Validating the contents of the media </net/ins3525-  svr/export2/s10u4/dvds/latest>.
    The media is a standard Solaris media.
    The media contains an operating system upgrade image.
    The media contains <Solaris> version <10>.
    Constructing upgrade profile to use.
    Locating the operating system upgrade program.
    Checking for existence of previously scheduled Live Upgrade requests.
    Creating upgrade profile for BE <BE2>.
    Determining packages to install or upgrade for BE <BE2>.
    Performing the operating system upgrade of the BE <BE2>.
    CAUTION: Interrupting this process may leave the boot environment unstable 
    or unbootable.
    Upgrading Solaris: 100% completed
    Installation of the packages from this media is complete.
    Updating package information on boot environment <BE2>.
    Package information successfully updated on boot environment <BE2>.
    Adding operating system patches to the BE <BE2>.
    The operating system patch installation is complete.
    INFORMATION: The file </var/sadm/system/logs/upgrade_log> on boot 
    environment <BE2> contains a log of the upgrade operation.
    INFORMATION: The file </var/sadm/system/data/upgrade_cleanup> on boot 
    environment <BE2> contains a log of cleanup operations required.
    WARNING: <1> packages failed to install properly on boot environment <BE2>.
    INFORMATION: The file </var/sadm/system/data/upgrade_failed_pkgadds> on
    boot environment <BE2> contains a list of packages that failed to upgrade 
    or install properly.
    INFORMATION: Review the files listed above. Remember that all of the files 
    are located on boot environment <BE2>. Before you activate boot 
    environment <BE2>, determine if any additional system maintenance is 
    required or if additional media of the software distribution must be 
    installed.
    The Solaris upgrade of the boot environment <BE2> is partially complete.
    
  11. (Optional) To troubleshoot any problems, use the log files.

    The output files and results of the upgrade process are stored in a number of log files. These files help to determine any problems that are encountered and if any cleanup operation is necessary, following an upgrade. The log files are stored in the global zones and the global zone administrator has access to these log files. The following examples show sample log files with some entries:

    • /var/sadm/system/logs/upgrade_cleanup

    • /var/sadm/system/logs/upgrade_log

      A sample entry in the upgrade_log file for the global zone is as follows:

      Doing pkgadd of SUNWcsu to /
      29329 blocks
      Doing pkgadd of SUNWcsu
      
      Installation of SUNWcsu was successful
      

      A sample entry in the upgrade_log file for the non-global zones is as follows:

      Doing pkgadd of SUNWcsu to /
      31722 blocks
      
      Installation of SUNWcsu was successful.
      Installation of SUNWcsu on zone <SUNWlu-zone1> was successful.
      Installation of SUNWcsu on zone <SUNWlu-zone2> was successful
      

      A sample of a failure entry in the upgrade_log file for a non-global zone is as follows:

      Removal of SUNWgttf from zone <SUNWlu-zone1> failed.
      

    Note - Solaris Live Upgrade is not compatible with VxVM. Solaris Live Upgrade should be used with Solaris Volume Manager.

  12. Ensure that the new boot environment is upgraded successfully.

    After the luupgrade command is successfully complete, activate BE2 and verify that all the zones are upgraded correctly.

    Note - Ignore the following messages on the console. This is a known issue.

    Sep 12 04:29:32 inetd[515]: Failed to update state of instance
    svc:/network/rpc-100083_1/  rpc_tcp:default in repository: entity not found
    Sep 12 04:29:32 inetd[515]: Failed to update state of instance
    svc:/network/rpc-100083_1/  rpc_tcp:default in repository: No such file or directory
    Sep 12 04:29:32 inetd[515]: Failed to update state of instance
    svc:/network/rpc-100068_2-5/   rpc_udp:default in repository: entity not found
    Sep 12 04:29:32 inetd[515]: Failed to update state of instance
    svc:/network/rpc-100068_2-5/  rpc_udp:default in repository: No such file or directory
    

Where to Find More Information About Solaris Live Upgrade

Table 1 Solaris Live Upgrade References
Description
For More Information
The Solaris 10 8/07 Installation Guide: Solaris Live Upgrade and Upgrade Planning contains everything you need to know about using this tool.
For more information about patching with Solaris Live Upgrade:
With the Solaris 10 1/06 release, Sun includes a new patching tool, Sun Update Connection. This tool analyzes your system and then applies the appropriate patches. The September 2006 release 1.0.8 of this tool set provides various options for working with Solaris Live Upgrade.
The Patching Best Practices web site provides many other FAQs, articles, and information about patching the Solaris OS.
Support sites
The System Administration Guide: Solaris Containers-Resource Management and Solaris Zones Guide contains information about Solaris Zones.
Discussions
Sun training courses:
  • Make the transition to the Solaris 10 operating system (VC-SA-210-S10)

  • Solaris 10 features for experienced Solaris system administrators (SA-225-S10)


Updates

March 2009: Removed references to 72099 and replaced with 206844.


Comments (latest comments first)

Discuss and comment on this resource in the BigAdmin Wiki

Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.


Left Curve
Popular Downloads
Right Curve
Untitled Document
Left Curve
More Systems Downloads
Right Curve