Bug 467548 - Creating a new vm failes if image-file location outside default
Creating a new vm failes if image-file location outside default
Status: CLOSED DUPLICATE of bug 467228
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Berrange
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-10-18 07:59 EDT by Sven Lankes
Modified: 2008-10-20 10:02 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-20 10:02:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sven Lankes 2008-10-18 07:59:31 EDT
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 00:25:44 EDT
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 10:02:37 EDT
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.