[Pkg-libvirt-maintainers] Bug#533539: virtinst: creating a new guest fails with (create:466) Generating macaddr failed
Andreas Unterkircher
unki at netshadow.at
Thu Jun 18 14:07:34 UTC 2009
Package: virtinst
Version: 0.400.2
Severity: normal
Output from virt-manager --no-fork --debug:
2009-06-18 15:45:14,430 (create:711): Guest type set to os_type=hvm, arch=x86_64, dom_type=kvm
2009-06-18 15:45:14,457 (create:466): Generating macaddr failed: invalid literal for int() with base 10: 'n'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/create.py", line 463, in set_conn_state
net.setup(self.conn.vmm)
File "/var/lib/python-support/python2.5/virtinst/VirtualNetworkInterface.py", line 130, in setup
self.bridge = _util.default_bridge()
File "/var/lib/python-support/python2.5/virtinst/util.py", line 106, in default_bridge
defn = int(rt[-1])
ValueError: invalid literal for int() with base 10: 'n'
Problem occurs in default_bridge() function. It invokes default_route()
to find out default-route's network device. I used 'brlan' as interface
name for the bridge device, the default-route is pointing to dev brlan.
unki at srv-gdo-vm01:~$ ip addr sh dev brlan
6: brlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/ether 00:22:64:fa:cb:b2 brd ff:ff:ff:ff:ff:ff
inet 10.1.128.27/20 brd 10.1.143.255 scope global brlan
inet6 fe80::222:64ff:fefa:cbb2/64 scope link
valid_lft forever preferred_lft forever
unki at srv-gdo-vm01:~$ ip ro sh dev brlan
10.1.128.0/20 proto kernel scope link src 10.1.128.27
default via 10.1.128.1
If I rename the bridge to br0, it works, as the code in line 107:
defn = int(rt[-1])
does not permitted a letter at the end of the device name.
A quick fix:
unki at srv-gdo-vm01:/usr/share/python-support/virtinst/virtinst$ diff -u util.py.orig util.py
--- util.py.orig 2009-06-18 16:03:06.426793000 +0200
+++ util.py 2009-06-18 16:03:24.146793189 +0200
@@ -105,12 +105,12 @@
if rt is None:
defn = None
else:
- defn = int(rt[-1])
+ defn = rt
if defn is None:
return "xenbr0"
else:
- return "xenbr%d"%(defn)
+ return "xenbr%s"%(defn)
def default_network(conn):
if platform.system() == 'SunOS':
to get it working, but I do not know, what deeper impact this change has.
Cheers,
Andreas
-- System Information:
Debian Release: 5.0.1
APT prefers stable
APT policy: (990, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages virtinst depends on:
ii python 2.5.2-3 An interactive high-level object-o
ii python-libvirt 0.6.4-1 libvirt Python bindings
ii python-libxml2 2.6.32.dfsg-5 Python bindings for the GNOME XML
ii python-support 0.8.4 automated rebuilding support for P
ii python-urlgrabber 3.1.0-4 A high-level cross-protocol url-gr
Versions of packages virtinst recommends:
ii qemu 0.9.1-10lenny1 fast processor emulator
ii virt-viewer 0.0.3-2 Displaying the graphical console o
virtinst suggests no packages.
-- no debconf information
More information about the Pkg-libvirt-maintainers
mailing list