Red Hat Bugzilla – Bug 849450
f17 cannot add an IDE cdrom to a guest (storage parameter error) after removing it
Last modified: 2012-10-14 00:33:41 EDT
Created attachment 605505 [details]
dialog that generates the error
Description of problem:
If one removes the IDE cdrom from the guest, it is not possible
to add it back with virt-manager.
The options in "add hardware" > "storage" contains "ide cdrom" but it gives
"storage parameter error" and "cannot create storage for cdrom".
Note that it also applies to floppy disk too.
As the dialog is presented, it seems to be te proper way to add either a
cdrom or a floppy.
I will attach screenshots.
Version-Release number of selected component (if applicable):
Fedora 17 (3.5.1-1.fc17.x86_64)
virt-manager.noarch 0.9.4-1.fc17 @updates-testing
virt-manager-common.noarch 0.9.4-1.fc17 @updates-testing
Steps to Reproduce:
1. delete the "ide cdrom" from a guest
2. "add hardware" > "storage" > change "device type" to "ide cdrom"
3. "finish" > "storage parameter error" and "cannot create storage for cdrom" (or floppy)
Cannot re-add a cdrom to a guest after removing the cdrom device from that guest.
removing and adding hw should work too for cdroms and floppies.
Created attachment 605506 [details]
affected guest, without cdrom
Created attachment 605507 [details]
tried several trics, to check if the ui let me do it
If i press finish in this screenshot, i get:
Uncaught error validating hardware input: coercing to Unicode: need string or buffer, NoneType found
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/addhardware.py", line 877, in finish
if self.validate(notebook.get_current_page()) == False:
File "/usr/share/virt-manager/virtManager/addhardware.py", line 1196, in validate
File "/usr/share/virt-manager/virtManager/addhardware.py", line 1316, in validate_page_storage
File "/usr/share/virt-manager/virtManager/uihelpers.py", line 893, in check_path_search_for_qemu
broken_paths = VirtualDisk.check_path_search_for_user(conn.vmm, path, user)
File "/usr/lib/python2.7/site-packages/virtinst/VirtualDisk.py", line 397, in check_path_search_for_user
File "/usr/lib64/python2.7/genericpath.py", line 41, in isdir
st = os.stat(s)
TypeError: coercing to Unicode: need string or buffer, NoneType found
Also, there is a secondary effect, there is no more keyboard input for the entire virt-manager program. It is mandatory to close and reopen virt-manager. This applies to comment #1.
I had to edit the xml file and add both the controller and the disk. Then i restarted libvirtd.service
Thanks for the report Reartes.
Comment #2 is tracked at #859344
Please file a separate bug report for Comment #3
However the message you report in Comment #1 is intended: you aren't supposed to be able to create a new disk image for a cdrom or floppy, because it doesn't really make sense. The only valid choices are selecting an existing file, or leaving the path bar empty (which is broken as noted in Comment #2).
You should be able to readd a CDROM in the meantime by pointing at an existing file with browse->browse local. Then you can 'eject' that file from the VM CDROM screen afterwards.
So besides the existing bug report #859344, it sounds like things are functioning as normal, so closing as NOTABUG. Please reopen if I've missed something.