RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 662606 - rhel guest attached with host /dev/sr0 can not auto mount
Summary: rhel guest attached with host /dev/sr0 can not auto mount
Keywords:
Status: CLOSED DUPLICATE of bug 647794
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Jes Sorensen
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580953
TreeView+ depends on / blocked
 
Reported: 2010-12-13 11:01 UTC by Shirley Zhou
Modified: 2015-03-05 00:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-21 03:28:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Shirley Zhou 2010-12-13 11:01:19 UTC
Description of problem:
Attach host /dev/sr0 with inserted cdrom, start previous installed rhel guest with host /dev/sr0 attached, after start guest, cdrom can not be auto mount in guest. While iso file can be auto mount in guest.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.125.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.insert DVD to host
[root@dhcp-91-145 ~]# mount|grep /dev/sr0
/dev/sr0 on /media/RHEL_6.0 x86_64 Disc 1 type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=501,gid=501,iocharset=utf8,mode=0400,dmode=0500)

2.start a previous installed RHEL6 guest with this host device
-drive file=/dev/sr0,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw 
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 

3.log in guest to check cdrom with X
Only file a blank DVD-ROM disc.


Actual results:
host device did not auto mount on rhel guest

Expected results:
host device should auto mount on rhel guest like iso file.

Additional info:

For iso file
CLI: -drive file=/home/szhou/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw 
-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 

cdrom in guest:
[root@dhcp-91-90 ~]# mount|grep sr0
/dev/sr0 on /media/RHEL_6.0 x86_64 boot type iso9660 (ro,nosuid,nodev,uhelper=udisks,uid=500,gid=500,iocharset=utf8,mode=0400,dmode=0500)

For host device, we can mount it manually.
[root@dhcp-91-90 ~]# mount /dev/sr0 /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@dhcp-91-90 ~]# ls /mnt
EFI   GPL               images    LargeFileSystem  media.repo  repodata          RPM-GPG-KEY-redhat-beta     Server
EULA  HighAvailability  isolinux  LoadBalance      Packages    ResilientStorage  RPM-GPG-KEY-redhat-release  TRANS.TBL

Comment 2 Alex Williamson 2010-12-21 19:17:10 UTC
When passing the guest the /dev/sr0 device directly, can the guest manually mount the device, or does it not see a cdrom drive at all?  Does it make a difference whether the host has the device mounted?

Comment 3 Shirley Zhou 2010-12-22 02:13:46 UTC
(In reply to comment #2)
> When passing the guest the /dev/sr0 device directly, can the guest manually
> mount the device, or does it not see a cdrom drive at all?  Does it make a
> difference whether the host has the device mounted?

Hi, Alex

When start guest with -cdrom /dev/sr0, the guest can not auto mount cdrom, and we can see blank dvd-cdrom disc on guest desktop. And guest can manually mount the device.

If I umount /dev/sr0 in host, then start guest with /dev/sr0, there is no difference.

Comment 4 Alex Williamson 2010-12-22 20:35:56 UTC
I'm getting different results, but something doesn't seem to be working right.  Using qemu-kvm-0.12.1.2-2.128.el6.x86_64 on a RHEL6.0 host, I get the following results:

RHEL6.0 guest:
/dev/sr0 - desktop shows blank DVD, disk utility shows the proper label, mounts it, creating another icon on the desktop that also refers to blank media, but opening it shows the proper CD contents.
iso image - behaves exactly the same

Fedora 13 guest:
Either works as expected, media icon on the desktop shows the name of the image.

This might end up being bug in the underpinnings of the desktop that's only exposed on qemu.

Comment 5 Jes Sorensen 2010-12-28 16:01:28 UTC
I can reproduce this with Fedora 14 as well, using virt-manager to
control the guests.

It could probably be either an issue with GNOME on the host polling the
device or keeping it open somehow, or QEMU not passing the device present
info through.

Shirley, whey you see this, are you logged in graphically on the host,
or is X and GNOME running in any way there?

Thanks,
Jes

Comment 6 Shirley Zhou 2010-12-29 02:57:11 UTC
(In reply to comment #5)
> I can reproduce this with Fedora 14 as well, using virt-manager to
> control the guests.
> 
> It could probably be either an issue with GNOME on the host polling the
> device or keeping it open somehow, or QEMU not passing the device present
> info through.
> 
> Shirley, whey you see this, are you logged in graphically on the host,
> or is X and GNOME running in any way there?
> 
Yes, I login host graphically.
> Thanks,
> Jes

Comment 7 Jes Sorensen 2011-01-03 07:40:26 UTC
Hi Shirley,

Could you try and run the test on a system where there is nobody logged
in graphically? Preferably the system running in runlevel 3?

Thanks,
Jes

Comment 8 Shirley Zhou 2011-01-04 02:51:23 UTC
(In reply to comment #7)
> Hi Shirley,
> 
> Could you try and run the test on a system where there is nobody logged
> in graphically? Preferably the system running in runlevel 3?
> 
> Thanks,
> Jes

Hi, Jes

I tries with and without login host graphically, both reproduce this bug.

Thanks,
Shirley

Comment 9 Mike Cao 2011-01-05 03:30:14 UTC
FYI.

Tried with iso files.
Can reproduce it with iso with guest init=5

while tried with guest init=3.
#mount /dev/sr0 /mnt
can see the resouces of cdrom in /mnt

Comment 11 Shirley Zhou 2011-02-21 03:28:05 UTC
Thanks a lot for Mike's information. Close as duplicate of bug 647794.

*** This bug has been marked as a duplicate of bug 647794 ***


Note You need to log in before you can comment on or make changes to this bug.