Virtual SCSI-attached CD/DVD drives
The KVM hypervisor might provide virtual SCSI-attached CD/DVD drives to your KVM guest.
Virtual SCSI-attached CD/DVD drives have device nodes of the form
/dev/sr<n>, where <n> is an integer
that identifies an individual device. The node for the first drive is
/dev/sr0.
Issue the following command to list all device nodes for CD/DVD
drives:
# ls /dev/sr*
You can also use the lsscsi command
to list all your SCSI-attached devices, including SCSI-attached CD/DVD drives.
# lsscsi
[0:0:0:0] cd/dvd QEMU QEMU CD-ROM 2.3. /dev/sr0
You can use the isoinfo command with the -i option to find out if a
drive contains media.
Example:
This command returns an error if no media is present.# isoinfo -i /dev/sr0
You can use the
mount command to mount the content of media in the drive on the file system.
Example:
Your distribution might provide a udev rule to mount the media content for you.# mount /dev/sr0 /mnt/media
Unmount
the content of the media to release it.
Example:
# unmount /dev/sr0
You depend on the KVM hypervisor to eject and insert media.