mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-26 08:05:54 +03:00
[GH-ISSUE #307] IndexError: list index out of range #240
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AlexH-HankIT on GitHub (May 13, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/307
ERROR:django.request:Internal Server Error: /instance/1/EXTest01/ Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/var/www/webvirtmgr/instance/views.py", line 472, in instance networks = conn.get_net_device() File "/var/www/webvirtmgr/vrtManager/instance.py", line 177, in get_net_device return util.get_xml_path(self._XMLDesc(0), func=networks) File "/var/www/webvirtmgr/vrtManager/util.py", line 104, in get_xml_path result = func(ctx) File "/var/www/webvirtmgr/vrtManager/instance.py", line 169, in networks nic_host = net.xpathEval('source/@network|source/@bridge|source/@dev')[0].content IndexError: list index out of rangeI get this error if i click on a running virtual machine. Once the machine is shutdown i can normal access the menu. My webvirtmgr is configured with two bridges.
@retspen commented on GitHub (May 13, 2014):
Could you show your VM xml?
@AlexH-HankIT commented on GitHub (May 13, 2014):
Of course:
http://pastebin.com/nLjzCCMW
It isn't working on any running virtual machine. If i shut it down i can access the menu normaly. If i start it everything is working fine, until i restart the libvirt-bin service (I'm using debian wheezy x64). Then i get the error.
@retspen commented on GitHub (May 13, 2014):
Change in file settings.py:
DEBUG = False to DEBUG = True
restart supervisor and show debug error.
@AlexH-HankIT commented on GitHub (May 14, 2014):
It's nearly the same error again:
http://pastebin.com/aaE10nMt
I think I will try to reinstall webvirtmgr.
Edit: I reinstalled webvirtmgr and libvirt-bin, i deleted every VM and added it again, but still the same error :/
@retspen commented on GitHub (May 14, 2014):
Do you add VM through WebVirtMgr?
@AlexH-HankIT commented on GitHub (May 14, 2014):
yes, it's the only managment tool i've installed.
@retspen commented on GitHub (May 14, 2014):
Could you create simple VM without bridge and check error?
@AlexH-HankIT commented on GitHub (May 14, 2014):
I've created an VM with an "isolated" network and it's working. So the bridges must cause this error. I deleted them and now i can't add them again. I get the error: "Das folgende Format muss verwendet werden: ". I normally write my bridges in uppercases. Are there any new restrictions?
@retspen commented on GitHub (May 14, 2014):
Create Network Pool - put name 'bridge' and device 'your_device' and choose type forwarding: 'BRIDGE' and then add next line to VM xml:
@AlexH-HankIT commented on GitHub (May 14, 2014):
It's working until i add the line for the bridge, then i get the error again. This is my bridge.xml config file:
http://pastebin.com/RiuFznxQ
I renamed my bridge from "LAN" to "lan" without any success...
@retspen commented on GitHub (May 15, 2014):
I will try to create environment like you have and I will be testing.
@AlexH-HankIT commented on GitHub (May 15, 2014):
I've created a Guest with the following command:
I can normally manage this VM in webvirtmgr without any errors.
XML File of the working machine:
http://pastebin.com/0TAURJmX
XML File of the non-working VM created through webvirtmgr:
http://pastebin.com/ieNfW9w4
There is a difference between the network parts. Maybe thats what causes this error?
@retspen commented on GitHub (May 15, 2014):
Remove next line and test:
@AlexH-HankIT commented on GitHub (May 15, 2014):
I deleted it, but i still get the error...
@retspen commented on GitHub (May 15, 2014):
Ok, change network device:
@AlexH-HankIT commented on GitHub (May 15, 2014):
It's working.
@retspen commented on GitHub (May 15, 2014):
Ok, add this:
test this if is it ok show your xml
@AlexH-HankIT commented on GitHub (May 15, 2014):
Still working.
@retspen commented on GitHub (May 15, 2014):
What has change with the first xml - http://pastebin.com/nLjzCCMW ?
@AlexH-HankIT commented on GitHub (May 15, 2014):
Good question. As far as I can see, only the mac address and some normal differences. I will compare this files with another webvirtmgr installation.
@AlexH-HankIT commented on GitHub (May 15, 2014):
Maybe i got something:
If the machine is running, the network config in the xml file looks like this:
http://pastebin.com/TF4B9rPa
If the machine is shutdown it looks like this:
http://pastebin.com/hPYkhtB5
Why is the interface type "bridge" while the machine is running and "network" if it's shutdown?
I checked on another installation of webvirtmgr and the type is always "network". Even if the VM is running. It seems like my Webvirtmgr is change the type from "network" to "bridge". Maybe this causes trouble when libvirt-bin is restarted?
@retspen commented on GitHub (May 15, 2014):
You can use network type: network or bridge. When you use type: network you need to choose 'Network Pool', for type: bridge need to choose interface device like br0 (bridge configuration).
Maybe you have wrong bridge settings. http://wiki.libvirt.org/page/Networking#Bridged_networking_.28aka_.22shared_physical_device.22.29
@AlexH-HankIT commented on GitHub (May 15, 2014):
Hm, thats weird. I'm always using a bridged configuration and yet the other system says "network" as interface type. Something like this:
http://pastebin.com/0ZY5mmAC
The interface type is always "network" even if it's bridged. Only my webvirtmgr is changing from network to bridge. I think I will just reinstall the KVM Host and Webvirtmgr and hope for the best.
Many thanks for your help. Just send you a donation :)
@retspen commented on GitHub (May 16, 2014):
Thanks! WebVirtMgr can't change xml automatically this do libvirt.