Bug 467354 - Can't create Virtual Machine Guest
Can't create Virtual Machine Guest
Status: CLOSED DUPLICATE of bug 467228
Product: Fedora
Classification: Fedora
Component: python-virtinst (Show other bugs)
rawhide
x86_64 Linux
urgent Severity urgent
: ---
: ---
Assigned To: Daniel Berrange
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-16 22:57 EDT by Russell Doty
Modified: 2013-01-09 23:51 EST (History)
7 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Russell Doty 2008-10-16 22:57:37 EDT
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 13:00:59 EDT
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 03:00:45 EDT

*** This bug has been marked as a duplicate of bug 467228 ***
Comment 3 Bernardo Garcia 2011-04-13 11:09:36 EDT
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.