Bug 849450 - f17 cannot add an IDE cdrom to a guest (storage parameter error) after removing it
f17 cannot add an IDE cdrom to a guest (storage parameter error) after removi...
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Cole Robinson
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-08-19 11:07 EDT by Reartes Guillermo
Modified: 2012-10-14 00:33 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-10-14 00:33:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
dialog that generates the error (88.20 KB, image/png)
2012-08-19 11:07 EDT, Reartes Guillermo
no flags Details
affected guest, without cdrom (112.03 KB, image/png)
2012-08-19 11:08 EDT, Reartes Guillermo
no flags Details
tried several trics, to check if the ui let me do it (86.04 KB, image/png)
2012-08-19 11:10 EDT, Reartes Guillermo
no flags Details

  None (edit)
Description Reartes Guillermo 2012-08-19 11:07:11 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

How reproducible:

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)

Actual results:

Cannot re-add a cdrom to a guest after removing the cdrom device from that guest.

Expected results:
removing and adding hw should work too for cdroms and floppies.

Additional info:
Comment 1 Reartes Guillermo 2012-08-19 11:08:03 EDT
Created attachment 605506 [details]
affected guest, without cdrom
Comment 2 Reartes Guillermo 2012-08-19 11:10:00 EDT
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
    return self.validate_page_storage()
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1316, in validate_page_storage
    self.conn, disk.path)
  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
    if os.path.isdir(path):
  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
Comment 3 Reartes Guillermo 2012-08-19 11:17:08 EDT
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.
Comment 4 Reartes Guillermo 2012-08-19 13:05:39 EDT
I had to edit the xml file and add both the controller and the disk. Then i restarted libvirtd.service
Comment 5 Cole Robinson 2012-10-14 00:33:41 EDT
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.

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