KVM guest fails to read the physical DVD-ROM media in the host

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 6
  • qemu-kvm

Issue

  • When a KVM guest tries to read the physical DVD-ROM media in the host, the following error may occur and the
    guest cannot read the host's DVD-ROM.

    attempt to access beyond end of device
    sr0: rw=0 want=3904520, limit=2097148
    Buffer I/O error on device sr0, logical block 976129
    

When this issue occurs, the df command shows the correct size in /dev/sr0, but the lsblk command does not.

# df
Filesystem           1K-blocks    Used Available Use% Mounted on
/dev/sr0               3762278 3762278         0 100% /mnt

# lsblk
sr0                           11:0    1 1024M  0 rom  /mnt

Resolution

This is NOT recommended to use the physical DVD/CD-ROM from KVM guests since passing the host CD device
to the guest is riddled with several problems. Red Hat disable this feature in RHEL7 entirely due to the problems
associated.

Workaround is create an ISO file from the physical DVD/CD-ROM media as described in the following article:
<https://access.redhat.com/solutions/1185913>


This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.