Movatterモバイル変換


[0]ホーム

URL:


Go to main content
oracle home

Creating and Using Oracle® Solaris Kernel Zones

Exit Print View

 
Search Scope:
  »  ...Documentation Home  »  Oracle Solaris 11.3 Information Library  »  Creating and Using Oracle® ...  »  Administering Oracle Solaris Kernel Zones  »  Managing Removable Devices on the Kernel Zone
Updated: December 2018
 
 

Managing Removable Devices on the Kernel Zone

You can configure a removable loopback filelofidevice, which works as a virtual CD-ROM device, on the kernel zone.

How to Add a Virtual CD-ROM Device to a Kernel Zone

  1. Assume theroot role.

    For more information, seeUsing Your Assigned Administrative Rights inSecuring Users and Processes in Oracle Solaris 11.3.

  2. Create an empty removable read-onlylofi device in the global zone.
    #lofiadm -r

    The following example shows sample output.

    global#lofiadm -r/dev/lofi/1
  3. Add thelofi device to the kernel zone configuration.

    An administrator with the Zone Migration rights profile can perform thezonecfg andzoneadm steps. For more information, seeAssigning Rights to Non-Root Users to Manage Zones inCreating and Using Oracle Solaris Zones.

    $zonecfg -zzonename

    The following example demonstrates adding thelofi device located at/dev/lofi/1 to the kernel zonekzone1:

    global$zonecfg -z kzone1zonecfg:kzone1>add devicezonecfg:kzone1:device>set match=/dev/lofi/1zonecfg:kzone1:device>endzonecfg:kzone1>exit
  4. Reboot the kernel zone to have the configuration changes take effect.
    $zoneadm -zzonename reboot
  5. Log in to the kernel zone.
    #zloginzonename
  6. On the kernel zone, update the device file system (devfs) and restart the hardware abstraction layer (hal) so that thehal service will see the virtual CD-ROM device.
    zonename#devfsadm -i zvblkzonename#svcadm restart hal
  7. List the removable devices on the kernel zone.
    zonename#rmformat -l

    For example, the following example lists the removable devices on the kernel zonekzone1:

    kzone1#rmformat -lLooking for devices...     1. Logical Node: /dev/rdsk/c1d0p0        Physical Node: /zvnex/zvblk@0        Connected Device: kz       vDisk            0        Device Type: Removable        Bus: <Unknown>        Size: 16.4 GB        Label: <Unknown>        Access permissions: <Unknown>     2. Logical Node: /dev/rdsk/c1d1p0        Physical Node: /zvnex/zvblk@1        Connected Device: kz       vCDROM           0        Device Type: CD Reader        Bus: <Unknown>        Size: 0.0 MB        Label: <Unknown>        Access permissions: <Unknown>
  8. In the global zone, specify a path to an ISO image file to associate with the removable loopback device.
    global#lofiadm -rimage-pathdevice-path

    The following example demonstrates associating the image path/root/sol-11_3-repo.full.iso with thelofi device/dev/lofi/1:

    global#lofiadm -r /root/sol-11_3-repo-full.iso /dev/lofi/1global#lofiadmBlock Device             File                           Options/dev/lofi/1              /root/sol-11_3-repo-full.iso        Removable,Readonly
  9. Mount the CD-ROM device in the kernel zone.
    #mount -F hsfsdevice-location /mnt

    The following example mounts the virtual CD-ROM device located at/dev/dsk/c1d1p0.

    kzone1#mount -F hsfs /dev/dsk/c1d1p0 /mnt
  10. When you are finished using the virtual CD-ROM, unmount it from the mount point in the kernel zone.
    kzone1#umount /mnt
  11. Eject the CD-ROM virtual device in the kernel zone.
    kzone1#eject cdrom
  12. Verify that the ISO image is no longer associated with the lofi device in the global zone.
    #lofiadm

    For example:

    global#lofiadmBlock Device             File                           Options/dev/lofi/1              -                              Removable,Readonly
Copyright © 2014, 2018, Oracle and/or its affiliates. All rights reserved. 
Previous
Next

[8]ページ先頭

©2009-2025 Movatter.jp