[GH-ISSUE #527] Webvirtmgr crashes if domain not found #395

Closed
opened 2026-02-27 16:39:08 +03:00 by kerem · 1 comment
Owner

Originally created by @sammcj on GitHub (Mar 19, 2015).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/527

I deleted the disk for a VM, then went to delete the VM, but I can't because it has no disk:

libvirt: QEMU Driver error : Domain not found: no domain with matching name 'Win7'
ERROR:django.request:Internal Server Error: /info/instusage/1/Win7/
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 201, in instusage
    for i, net in enumerate(networks):
TypeError: 'NoneType' object is not iterable
192.168.0.20 - - [19/Mar/2015:11:29:55] "GET /info/instusage/1/Win7/ HTTP/1.0" 500 - "http://192.168.0.71/instance/1/Win7/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0"
INFO:gunicorn.access:192.168.0.20 - - [19/Mar/2015:11:29:55] "GET /info/instusage/1/Win7/ HTTP/1.0" 500 - "http://192.168.0.71/instance/1/Win7/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0"
libvirt: QEMU Driver error : Domain not found: no domain with matching name 'Win7'
ERROR:django.request:Internal Server Error: /instance/1/Win7/
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 445, in instance
    instance = Instance(compute_id=host_id, name=vname, uuid=uuid)
UnboundLocalError: local variable 'uuid' referenced before assignment
192.168.0.20 - - [19/Mar/2015:11:29:59] "POST /instance/1/Win7/ HTTP/1.0" 500 - "http://192.168.0.71/instance/1/Win7/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0"
INFO:gunicorn.access:192.168.0.20 - - [19/Mar/2015:11:29:59] "POST /instance/1/Win7/ HTTP/1.0" 500 - "http://192.168.0.71/instance/1/Win7/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0"
Originally created by @sammcj on GitHub (Mar 19, 2015). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/527 I deleted the disk for a VM, then went to delete the VM, but I can't because it has no disk: ``` libvirt: QEMU Driver error : Domain not found: no domain with matching name 'Win7' ERROR:django.request:Internal Server Error: /info/instusage/1/Win7/ 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 201, in instusage for i, net in enumerate(networks): TypeError: 'NoneType' object is not iterable 192.168.0.20 - - [19/Mar/2015:11:29:55] "GET /info/instusage/1/Win7/ HTTP/1.0" 500 - "http://192.168.0.71/instance/1/Win7/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0" INFO:gunicorn.access:192.168.0.20 - - [19/Mar/2015:11:29:55] "GET /info/instusage/1/Win7/ HTTP/1.0" 500 - "http://192.168.0.71/instance/1/Win7/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0" libvirt: QEMU Driver error : Domain not found: no domain with matching name 'Win7' ERROR:django.request:Internal Server Error: /instance/1/Win7/ 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 445, in instance instance = Instance(compute_id=host_id, name=vname, uuid=uuid) UnboundLocalError: local variable 'uuid' referenced before assignment 192.168.0.20 - - [19/Mar/2015:11:29:59] "POST /instance/1/Win7/ HTTP/1.0" 500 - "http://192.168.0.71/instance/1/Win7/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0" INFO:gunicorn.access:192.168.0.20 - - [19/Mar/2015:11:29:59] "POST /instance/1/Win7/ HTTP/1.0" 500 - "http://192.168.0.71/instance/1/Win7/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0" ```
kerem closed this issue 2026-02-27 16:39:08 +03:00
Author
Owner

@sammcj commented on GitHub (Mar 24, 2015):

ty @retspen

<!-- gh-comment-id:85418628 --> @sammcj commented on GitHub (Mar 24, 2015): ty @retspen
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#395
No description provided.