Creating and Using Oracle Solaris Kernel Zones Administering Oracle Solaris Kernel Zones Managing Removable Devices on the Kernel Zone How to Add a Virtual CD-ROM Device to a Kernel Zone How to Add a Virtual CD-ROM Device to a Kernel Zone Perform this task to add a virtual CD-ROM device to a kernel zone. Become a zone administrator. For more information, see Using Rights Profiles to Install and Manage Zones in Creating and Using Oracle Solaris Zones. Create an empty removable read-only lofi device in the global zone.global$ pfbash lofiadm -r The following example shows sample output. global$ lofiadm -r /dev/lofi/1 Add the lofi device to the kernel zone. Output is similar to the following: global$ zonecfg -z kzone zonecfg:kzone> add device zonecfg:kzone:device> set storage=dev:path-to-device zonecfg:kzone:device> end zonecfg:kzone> exit Reboot the kernel zone to apply the configuration changes.global$ zoneadm -z kzone reboot Log in to the kernel zone.global$ zlogin kzone On the kernel zone, update the device file system (devfs) and restart the hardware abstraction layer (hal). This step enables the hal service to see the virtual CD-ROM device. kzone$ pfbash devfsadm -i zvblk kzone$ svcadm restart hal On the kernel zone, list the removable devices. Output is similar to the following: kzone$ 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> … In the global zone, specify a path to an ISO image file to associate with the removable loopback device.global$ lofiadm -r image-path device-path The following example demonstrates associating the CD-ROM image /root/sol-11_3-repo.full.iso to 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 In the kernel zone, mount the CD-ROM device.kzone$ mount -F hsfs device-location /mnt When you are finished using the virtual CD-ROM, unmount it from the mount point in the kernel zone.kzone$ umount /mnt Eject the CD-ROM virtual device in the kernel zone.kzone$ eject cdrom In the global zone, verify that the ISO image is no longer associated with the lofi device. Output is similar to the following: global$ lofiadm Block Device File Options /dev/lofi/1 - Removable,Readonly