System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones

Chapter 38 Administering and Running Applications in lx Branded Zones (Tasks)

This chapter contains material on running applications in an lx branded zone.

About Maintaining a Supported Configuration

When you installed a zone with a supported CentOS or Red Hat Enterprise Linux distribution, you created a supported zone. If you add packages from different versions to this zone, it is possible to create a branded zone that cannot be supported.

Upgrading the Distribution and Adding Packages

ProcedureHow to Upgrade a CentOS 3.x Distribution

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

  1. Upgrade a CentOS 3.x distribution to a different version by using yum upgrade or up2date.

    For instructions, see the documentation available at http://www.centos.org.

ProcedureHow to Upgrade a Red Hat 3.x Distribution

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

  1. Update a Red Hat Enterprise Linux 3.x distribution to a different version by using up2date.

    For instructions, see the documentation available at http://www.redhat.com.

ProcedureHow to Upgrade a Package

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

  1. To update a package, use one of the following methods.

    • yum update package_name

    • rpm -U package_name

Using yum and rpm

yum:

rpm:

How to Install an Application in an lx Branded Zone

Applications are installed as they are on a Linux system, by mounting the CD and running the installation program. This section covers a typical application installation in an lx branded zone.


Tip –

If you know you will be using CDs or DVDs to install applications in an lx branded zone, add read-only access to CD or DVD media in the global zone when you initially configure the branded zone. See step 7 in How to Install MATLAB 7.2 Using CDs.


About MATLAB

MATLAB is a high-level language and interactive environment that enables you to perform computationally intensive tasks quickly. The product was developed by The MathWorks. See http://www.mathworks.com for more information.

ProcedureHow to Install MATLAB 7.2 Using CDs

  1. Obtain the MATLAB 7.2 CDs .

    There are three CDs in the MATLAB/Simulink package. Only discs 1 and 3 are needed for a simple MATLAB installation.

  2. Create and install an lx branded zone as described in How to Configure, Verify, and Commit the lx Branded Zone and Installing and Booting lx Branded Zones.

  3. If the Volume Management file system is not running in the global zone, start it.


    global# svcadm volfs enable
    
  4. Insert the media.

  5. Check for media in the drive.


    global# volcheck
    
  6. Test whether the CD is automounted.


    global# ls /cdrom
    

    You will see a display similar to the following:


    cdrom   cdrom1   mathworks_2006a1
  7. Loopback mount the file system with the options ro,nodevices (read-only and no devices) in the non-global zone.


    global# zonecfg -z lx-zone
    zonecfg:lx-zone> add fs
    zonecfg:lx-zone:fs> set dir=/cdrom
    zonecfg:lx-zone:fs> set special=/cdrom
    zonecfg:lx-zone:fs> set type=lofs
    zonecfg:lx-zone:fs> add options [ro,nodevices]
    zonecfg:lx-zone:fs> end
    zonecfg:lx-zone> commit
    zonecfg:lx-zone> exit
    
  8. Reboot the non-global zone.


    global# zoneadm -z lx-zone reboot
    
  9. Use the zoneadm list command with the -v option to verify the status.


    global# zoneadm list -v
    

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


    ID  NAME     STATUS       PATH                           BRAND      IP
     0  global   running      /                              native     shared
     1  lx-zone  running      /export/home/lx-zone           lx         shared
  10. Log in to the lx zone.


    global# zlogin lx-zone
    
  11. Verify the CD-ROM mount.


    lx-zone# ls /cdrom
    

    You will see a display similar to this:


    cdrom   cdrom1   mathworks_2006a1
  12. Create the license file as described in the MATLAB documentation.

  13. Install the product as described in the product installation guide.


    lx-zone# /mnt/install
    
  14. Exit the zone.


    lx-zone# exit
    

    Tip –

    You might want to retain the /cdrom file system in your non-global zone. The mount will always reflect the current contents of the CD-ROM drive, or an empty directory if the drive is empty.


  15. (Optional) If you want to remove the /cdrom file system from the non-global zone, use the following procedure.


    global# zonecfg -z lx-zone
    zonecfg:lx-zone> remove fs dir=/cdrom
    zonecfg:lx-zone> commit
    zonecfg:lx-zone> exit
    

ProcedureHow to Install MATLAB 7.2 Using ISO Images

Before You Begin

Note that this method consumes considerable disk space.

  1. Obtain the MATLAB 7.2 CDs .

    There are three CDs in the MATLAB/Simulink package. Only discs 1 and 3 are needed for a simple MATLAB installation.

  2. Create and install an lx branded zone as described in How to Configure, Verify, and Commit the lx Branded Zone and Installing and Booting lx Branded Zones.

  3. Copy the data from each CD to a .iso file.


    global# /usr/bin/dd if=/dev/rdsk/c1d0s2 of=disk1.iso
    

    This copies the data from the first CD to the file disk1.iso. Repeat, using a different file name such as disk3.iso, for the third CD.

  4. From the global zone, lofi-mount the first .iso file in the lx zone.


    global# lofiadm -a /zpool/local/disk1.iso
    global# mount -F hsfs /dev/lofi/1 /zones/lx-zone/root/mnt
    
  5. Log in to the lx zone.


    global# zlogin lx-zone
    
  6. Use X forwarding to redirect the display to your desktop:


    lx-zone# ssh -X root@lx-zone
    
  7. Create the license file as described in the MATLAB documentation.

  8. Install the product as described in the product installation guide.


    lx-zone# /mnt/install
    
  9. When prompted to insert CD 3, go back to the global zone terminal window and mount disk3.isofile in place of the first.


    global# umount /zones/lx-zone/root/mnt
    	global# lofiadm -d /dev/lofi/1
    	global# lofiadm -a /zpool/local/disk3.iso
    	global# mount -F hsfs /dev/lofi/1 /zones/lx-zone/root/mnt
    

    The installation will finish.

Backing Up lx Branded Zones

For information on zone backup, see About Backing Up a Solaris System With Zones Installed, Determining What to Back Up in Non-Global Zones, About Restoring Non-Global Zones, and Restoring a Non-Global Zone.

Features That Are Not Supported in an lx Branded Zone

Only the shared-IP network configuration is supported in an lx branded zone.

The chroot command is not supported in a Linux zone. If used on a process, that process would no longer be able to see the Solaris libraries it needs to run.

Although you can configure and install lx branded zones on a Trusted Solaris system that has labels enabled, you cannot boot lx branded zones on this system configuration.

You cannot add local Linux file systems using the fs resource property of the zonecfg command.