Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 467354 - Can't create Virtual Machine Guest
Summary: Can't create Virtual Machine Guest
Keywords:
Status: CLOSED DUPLICATE of bug 467228
Alias: None
Product: Fedora
Classification: Fedora
Component: python-virtinst
Version: rawhide
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-17 02:57 UTC by Russell Doty
Modified: 2013-01-10 04:51 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-20 07:00:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Russell Doty 2008-10-17 02:57:37 UTC
Description of problem:

Can't create guest. After going through the steps to create a guest in Virtual Machine Manager, creation fails after clicking "finish"

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


How reproducible:
Every time.

Steps to Reproduce:
1. Start Virtual Machine Manager
2. Create a guest
3.
  
Actual results:

Unable to complete install '<type 'exceptions.UnboundLocalError'> local variable 'verr' referenced before assignment
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 722, in do_install
    dom = guest.start_install(False, meter = meter)
  File "/usr/lib/python2.5/site-packages/virtinst/Guest.py", line 730, in start_install
    self._prepare_install(meter)
  File "/usr/lib/python2.5/site-packages/virtinst/FullVirtGuest.py", line 314, in _prepare_install
    distro = self.os_distro)
  File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py", line 264, in prepare
    self._prepare_cdrom(guest, distro, meter)
  File "/usr/lib/python2.5/site-packages/virtinst/DistroManager.py", line 215, in _prepare_cdrom
    transient=True)
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 135, in __init__
    self.__validate_params()
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 369, in __validate_params
    self.__check_if_path_managed()
  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
'

Expected results:
Create a virtual machine.

Additional info:

Comment 1 Felix Kaechele 2008-10-19 17:00:59 UTC
I don't know if it's already fixed upstream but this is my patch for it:

--- VirtualDisk.py.orig	2008-10-19 18:59:54.000000000 +0200
+++ VirtualDisk.py	2008-10-19 18:57:04.000000000 +0200
@@ -302,7 +302,7 @@
 
     def __check_if_path_managed(self):
         vol = None
-        err = None
+        verr = None
         pool = util.lookup_pool_by_path(self.conn,
                                         os.path.dirname(self.path))
         if pool:

Comment 2 Jens Petersen 2008-10-20 07:00:45 UTC

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

Comment 3 Bernardo Garcia 2011-04-13 15:09:36 UTC
Anyone know how to fix this error? Same thing happened to me to create a virtual machine ubuntu. The host operating system is Cent0S-5.5 x86_64 with the following kernel 

[root@iTV-HostServer jdk1.6.0_24]# uname -a 
Linux iTV-HostServer 2.6.18-238.5.1.el5xen #1 SMP Fri Apr 1 19:35:13 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
 

This is the result wich gives the Xen in the Virtaul Machine Manager when the process of creation of the virtual machine finish 

------------------
Unable to complete install: 'POST operation failed: xend_post: error from xen daemon: (xend.err 'Device 768 (vbd) could not be connected. /etc/xen/scripts/block failed; error detected.')'

Details

Unable to complete install 'libvirt.libvirtError POST operation failed: xend_post: error from xen daemon: (xend.err 'Device 768 (vbd) could not be connected. /etc/xen/scripts/block failed; error detected.')
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 730, in do_install
    dom = guest.start_install(False, meter = meter)
  File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 541, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
  File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 633, in _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
  File "/usr/lib64/python2.4/site-packages/libvirt.py", line 1277, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: POST operation failed: xend_post: error from xen daemon: (xend.err 'Device 768 (vbd) could not be connected. /etc/xen/scripts/block failed; error detected.')
'


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