Hide Forgot
Description of problem: Create a qcow2 format image in default libvirt pool and let it point at an iscsi storage(/dev/sdb) or USB stoage. Then logout the iscsi or USB storage. When create a new guest via virt-manager, the Browse dialog of "Select managed or other existing storage" can not open. BTW, check the Connection Detail and select the Storage tab, the default pool only show up an error message: "Error selecting pool: cannot stat file '/dev/sdb':No such file or directory" maybe this's an expect result since there's an broken image locate at this pool. Version-Release number of selected component (if applicable): How reproducible: libvirt-0.9.8-1.el6.x86_64 virt-manager-0.9.0-7.el6.x86_64 Steps to Reproduce: 1. Create a qcow2 format image and point at an iscsi storage #qemu-img create -f qcow2 -o backing_file=/dev/sdb /var/lib/libvirt/images/test.qcow2 2. Logout the storage iscsiadm -m node -T iqn.2011-12.com.redhat:ydu.target0 --logout 3. Create a new guest via virt-manager, and browse existing storage for the guest. Actual results: Step3, Browse dialog can't open, and --debug output the following message: Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/create.py", line 1240, in browse_storage self._browse_file(set_path, is_media=False) File "/usr/share/virt-manager/virtManager/create.py", line 2122, in _browse_file self.storage_browser.show(self.topwin, self.conn) File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 74, in show self.reset_state(conn) File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 183, in reset_state self.pool_selected() File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 257, in pool_selected self.populate_storage_volumes() File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 322, in populate_storage_volumes path = vol.get_target_path() File "/usr/share/virt-manager/virtManager/storagevol.py", line 49, in get_target_path return util.xpath(self.get_xml(), "/volume/target/path") File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 93, in get_xml self.refresh_xml() File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 105, in refresh_xml self._xml = self._XMLDesc(self._active_xml_flags) File "/usr/share/virt-manager/virtManager/storagevol.py", line 35, in _XMLDesc return self.vol.XMLDesc(flags) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2002, in XMLDesc if ret is None: raise libvirtError ('virStorageVolGetXMLDesc() failed', vol=self) libvirt.libvirtError: cannot stat file '/dev/sdb': No such file or directory Expected results: Browse dialog of "Select managed or other existing storage" can open. Additional info: There's a workaround. If there's a boot-scratch libvirt pool, the dialog can open, and all volumes expect the broken image can be listed out. # virsh pool-list Name State Autostart ----------------------------------------- boot-scratch active yes default active yes # virsh pool-dumpxml boot-scratch <pool type='dir'> <name>boot-scratch</name> <uuid>8f8f4527-7600-7a67-e2f3-2a3a016cf49d</uuid> <capacity>42275766272</capacity> <allocation>2492018688</allocation> <available>39783747584</available> <source> </source> <target> <path>/var/lib/libvirt/boot</path> <permissions> <mode>0700</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool>
When i reproduced this bug, i got different result with the "additional info" content in the bug description. If there's a boot-scratch libvirt pool, the dialog can open, but all volumes could not be listed out. #virt-manager --debug ... None Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 257, in pool_selected self.populate_storage_volumes() File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 322, in populate_storage_volumes path = vol.get_target_path() File "/usr/share/virt-manager/virtManager/storagevol.py", line 49, in get_target_path return util.xpath(self.get_xml(), "/volume/target/path") File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 93, in get_xml self.refresh_xml() File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 105, in refresh_xml self._xml = self._XMLDesc(self._active_xml_flags) File "/usr/share/virt-manager/virtManager/storagevol.py", line 35, in _XMLDesc return self.vol.XMLDesc(flags) File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2002, in XMLDesc if ret is None: raise libvirtError ('virStorageVolGetXMLDesc() failed', vol=self) libvirt.libvirtError: cannot stat file '/dev/sdc': No such file or directory # virsh pool-list Name State Autostart ----------------------------------------- boot-scratch active yes default active yes
(In reply to comment #2) > When i reproduced this bug, i got different result with the "additional info" > content in the bug description. > > If there's a boot-scratch libvirt pool, the dialog can open, but all volumes > could not be listed out. > > #virt-manager --debug > ... > None > Traceback (most recent call last): > File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 257, in > pool_selected > self.populate_storage_volumes() > File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 322, in > populate_storage_volumes > path = vol.get_target_path() > File "/usr/share/virt-manager/virtManager/storagevol.py", line 49, in > get_target_path > return util.xpath(self.get_xml(), "/volume/target/path") > File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 93, in > get_xml > self.refresh_xml() > File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 105, in > refresh_xml > self._xml = self._XMLDesc(self._active_xml_flags) > File "/usr/share/virt-manager/virtManager/storagevol.py", line 35, in > _XMLDesc > return self.vol.XMLDesc(flags) > File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2002, in XMLDesc > if ret is None: raise libvirtError ('virStorageVolGetXMLDesc() failed', > vol=self) > libvirt.libvirtError: cannot stat file '/dev/sdc': No such file or directory > > # virsh pool-list > Name State Autostart > ----------------------------------------- > boot-scratch active yes > default active yes To be clear, this bug could be reproduced, only got different "addional info" result when i reproduced it.
Fixed upstream: http://git.fedorahosted.org/git?p=virt-manager.git;a=commit;h=22307913a64fb2cc0963f128ea08570a2f896454