Bug 1133207

Summary: fdisk -l shows the error "cannot open /dev/sr0: No medium found" in virtual manager
Product: [Fedora] Fedora Reporter: Natesh <nsharma>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 23CC: agedosier, amit.shah, berrange, cfergeau, clalancette, crobinso, dwmw2, itamar, jforbes, laine, libvirt-maint, pbonzini, rjones, scottt.tw, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-14 15:46:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Natesh 2014-08-23 09:14:37 UTC
Description of problem:

fdisk -l throws the error "cannot open /dev/sr0: No medium found" if on the physical machine ISO is mounted and after new installation of virtual machine fdisk -l command is ran.
  
Version-Release number of selected component (if applicable):

Fedora 21

How reproducible:
Always

Steps to Reproduce:
1. Mount ISO on the physical machine.
2. Install Fedora in the virtual machine from the ISO.
3. Remove the ISO from the virtual machine.
3. Boot the  virtual machine.
4. Run fdisk -l

Actual results:

We get the below error:

fdisk: cannot open /dev/sr0: No medium found


Expected results:
It should not throw the error. 

Additional info:

Sometimes it does not even show the list of disk available. 

Workaround:1:
1. Re-connect the ISO to virtual machine.
2. Run fdisk -l which will not throw the error.
3. Remove the ISO to virtual machine.

Workaround:2:
1. Remove the file from the below command:
  # rm -rf /dev/sr0
2. Now run the command:
  # udevadm trigger
3. Run fdisk -l which will not throw the error.

Comment 1 Cole Robinson 2015-10-14 15:46:34 UTC
I can't reproduce on f23. There's been many fixes in the ide layer in the past few qemu releases so maybe this was fixed.