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.