Bug 467548 - Creating a new vm failes if image-file location outside default
Summary: Creating a new vm failes if image-file location outside default
Status: CLOSED DUPLICATE of bug 467228
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Daniel Berrange
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-10-18 11:59 UTC by Sven Lankes
Modified: 2008-10-20 14:02 UTC (History)
4 users (show)

Clone Of:
Last Closed: 2008-10-20 14:02:37 UTC

Attachments (Terms of Use)

Description Sven Lankes 2008-10-18 11:59:31 UTC
Description of problem:

Creating a new virtual machine (install from iso, kvm i686) fails for me if I  change the "File Location" under Simple File in the "Assigning storage space" dialog to anything outside of '/var/lib/libvirt/images'.

Creating a symlink for /var/lib/libvirt/images to the desired destination works around this error.

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1. create new virtual machine inside virt-manager
2. choose simple file-dir outside of /var/lib/libvirt/images/
3. choose forward
Actual results:

Error: Uncaught error validating input: local variable 'verr' referenced before assignment

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 303, in forward
    if(self.validate(notebook.get_current_page()) != True):
  File "/usr/share/virt-manager/virtManager/create.py", line 1009, in validate
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 135, in __init__
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 369, in __validate_params
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 348, in __check_if_path_managed
    "connection: %s" % (self.path, verr))
UnboundLocalError: local variable 'verr' referenced before assignment

Comment 1 John Ruemker 2008-10-20 04:25:44 UTC
I get this error even when using the default path.  


This corrected it for me:

diff -up virtinst-0.400.0/virtinst/VirtualDisk.py.org virtinst-0.400.0/virtinst/VirtualDisk.py
--- virtinst-0.400.0/virtinst/VirtualDisk.py.org	2008-10-19 00:18:29.000000000 -0400
+++ virtinst-0.400.0/virtinst/VirtualDisk.py	2008-10-19 00:18:34.000000000 -0400
@@ -302,7 +302,7 @@ class VirtualDisk(VirtualDevice):
     def __check_if_path_managed(self):
         vol = None
-        err = None
+        verr = None
         pool = util.lookup_pool_by_path(self.conn,
         if pool:

Comment 2 Cole Robinson 2008-10-20 14:02:37 UTC
Thanks for the patch, identical fix was already upstream. Building a new rawhide package now.

*** This bug has been marked as a duplicate of bug 467228 ***

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