You can configure a removable loopback file lofi device, which works as a virtual CD-ROM device, on the kernel zone.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.
# lofiadm -r
The following example shows sample output.
global# lofiadm -r /dev/lofi/1
An administrator with the Zone Migration rights profile can perform the zonecfg and zoneadm steps. For more information, see Assigning Rights to Non-Root Users to Manage Zones in Creating and Using Oracle Solaris Zones.
$ zonecfg -z zonename
The following example demonstrates adding the lofi device located at /dev/lofi/1 to the kernel zone kzone1:
global$ zonecfg -z kzone1 zonecfg:kzone1> add device zonecfg:kzone1:device> set match=/dev/lofi/1 zonecfg:kzone1:device> end zonecfg:kzone1> exit
$ zoneadm -z zonename reboot
# zlogin zonename
zonename# devfsadm -i zvblk zonename# svcadm restart hal
zonename# rmformat -l
For example, the following example lists the removable devices on the kernel zone kzone1:
kzone1# rmformat -l Looking 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>
global# lofiadm -r image-path device-path
The following example demonstrates associating the image path /root/sol-11_3-repo.full.iso with the lofi device /dev/lofi/1:
global# lofiadm -r /root/sol-11_3-repo-full.iso /dev/lofi/1 global# lofiadm Block Device File Options /dev/lofi/1 /root/sol-11_3-repo-full.iso Removable,Readonly
# mount -F hsfs device-location /mnt
The following example mounts the virtual CD-ROM device located at /dev/dsk/c1d1p0.
kzone1# mount -F hsfs /dev/dsk/c1d1p0 /mnt
kzone1# umount /mnt
kzone1# eject cdrom
# lofiadm
For example:
global# lofiadm Block Device File Options /dev/lofi/1 - Removable,Readonly