Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: May 2015

How to Add Access to CD or DVD Media in a Non-Global Zone

This procedure enables you to add read-only access to CD or DVD media in a non-global zone. The Volume Management file system is used in the global zone for mounting the media. A CD or DVD can then be used to install a product in the non-global zone. This procedure uses a DVD named jes_05q4_dvd.

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. Determine whether the Volume Management file system is running in the global zone.
    global# svcs volfs
    STATE          STIME    FMRI
    online         Sep_29   svc:/system/filesystem/volfs:default
  3. (Optional) 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 DVD is automounted.
    global# ls /cdrom

    You will see a display similar to the following:

    cdrom   cdrom1   jes_05q4_dvd
  7. Loopback mount the file system with the options ro,nodevices (read-only and no devices) in the non-global zone.
    global# zonecfg -z my-zone
    zonecfg:my-zone> add fs
    zonecfg:my-zone:fs> set dir=/cdrom
    zonecfg:my-zone:fs> set special=/cdrom
    zonecfg:my-zone:fs> set type=lofs
    zonecfg:my-zone:fs> add options [ro,nodevices]
    zonecfg:my-zone:fs> end
    zonecfg:my-zone> commit
    zonecfg:my-zone> exit
  8. Reboot the non-global zone.
    global# zoneadm -z my-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      /                              solaris   shared
     1  my-zone  running      /zones/my-zone                 solaris   excl  
  10. Log in to the non-global zone.
    global# my-zone
  11. Verify the DVD-ROM mount.
    my-zone# ls /cdrom

    You will see a display similar to this:

    cdrom   cdrom1   jes_05q4_dvd
  12. Install the product as described in the product installation guide.
  13. Exit the non-global zone.
    my-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.
  14. (Optional) If you want to remove the /cdrom file system from the non-global zone, use the following procedure.
    global# zonecfg -z my-zone
    zonecfg:my-zone> remove fs dir=/cdrom
    zonecfg:my-zone> commit
    zonecfg:my-zone> exit