[GH-ISSUE #138] VNC (webvirtmgr on another host than kvm) #114

Closed
opened 2026-02-27 16:37:59 +03:00 by kerem · 11 comments
Owner

Originally created by @kokel on GitHub (Oct 30, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/138

Hello,

I have webvirtmgr running on another host than the kvm hypervisor. What do I have to do on the hypervisor to get the vnc part working?

Regards, Kokel

Originally created by @kokel on GitHub (Oct 30, 2013). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/138 Hello, I have webvirtmgr running on another host than the kvm hypervisor. What do I have to do on the hypervisor to get the vnc part working? Regards, Kokel
kerem closed this issue 2026-02-27 16:38:00 +03:00
Author
Owner

@retspen commented on GitHub (Oct 30, 2013):

Hello,

On hypervisor uncoment line in file /etc/libvirt/qemu.comf:
vnc_listen = "0.0.0.0"

<!-- gh-comment-id:27435072 --> @retspen commented on GitHub (Oct 30, 2013): Hello, On hypervisor uncoment line in file /etc/libvirt/qemu.comf: vnc_listen = "0.0.0.0"
Author
Owner

@kokel commented on GitHub (Oct 31, 2013):

Yes, I already have this and restarted libvirt without success. If I want to connect to a console I get this message:

Shuttoff VM and set VNC password

If I do this via webvirtmgr I get this error:
Oops!
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete you request.

Running webvirtmgr in debug mode I get this:

[31/Oct/2013 21:03:03] "POST /instance/1/S1-DNS/ HTTP/1.1" 500 1933

<!-- gh-comment-id:27515798 --> @kokel commented on GitHub (Oct 31, 2013): Yes, I already have this and restarted libvirt without success. If I want to connect to a console I get this message: Shuttoff VM and set VNC password If I do this via webvirtmgr I get this error: Oops! 500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete you request. Running webvirtmgr in debug mode I get this: [31/Oct/2013 21:03:03] "POST /instance/1/S1-DNS/ HTTP/1.1" 500 1933
Author
Owner

@retspen commented on GitHub (Nov 1, 2013):

Change in file settings.py:
DEBUG = False to DEBUG = True

What show ? And you create VM on WebVirtMgr?

<!-- gh-comment-id:27550170 --> @retspen commented on GitHub (Nov 1, 2013): Change in file settings.py: DEBUG = False to DEBUG = True What show ? And you create VM on WebVirtMgr?
Author
Owner

@cjsoftuk commented on GitHub (Nov 1, 2013):

@retspen - Just ran into this one (actually looking at the right branch now).

Environment:

Request Method: POST
Request URL: http://vmm/instance/1/jcrmplus_stage/

Django Version: 1.5.4
Python Version: 2.7.3
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'instance',
'gunicorn']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/opt/webvirtmgr/environment/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/opt/webvirtmgr/src/instance/views.py" in instance
  2.                     vnc_pass = Instance.objects.get(vname=vname)
    
    File "/opt/webvirtmgr/environment/local/lib/python2.7/site-packages/django/db/models/manager.py" in get
  3.     return self.get_query_set().get(_args, *_kwargs)
    
    File "/opt/webvirtmgr/environment/local/lib/python2.7/site-packages/django/db/models/query.py" in get
  4.             self.model._meta.object_name)
    

Exception Type: DoesNotExist at /instance/1/jcrmplus_stage/
Exception Value: Instance matching query does not exist.

Hope this helps?

<!-- gh-comment-id:27573632 --> @cjsoftuk commented on GitHub (Nov 1, 2013): @retspen - Just ran into this one (actually looking at the right branch now). Environment: Request Method: POST Request URL: http://vmm/instance/1/jcrmplus_stage/ Django Version: 1.5.4 Python Version: 2.7.3 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'instance', 'gunicorn'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/opt/webvirtmgr/environment/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 1. response = callback(request, _callback_args, *_callback_kwargs) File "/opt/webvirtmgr/src/instance/views.py" in instance 2. vnc_pass = Instance.objects.get(vname=vname) File "/opt/webvirtmgr/environment/local/lib/python2.7/site-packages/django/db/models/manager.py" in get 3. return self.get_query_set().get(_args, *_kwargs) File "/opt/webvirtmgr/environment/local/lib/python2.7/site-packages/django/db/models/query.py" in get 4. self.model._meta.object_name) Exception Type: DoesNotExist at /instance/1/jcrmplus_stage/ Exception Value: Instance matching query does not exist. Hope this helps?
Author
Owner

@retspen commented on GitHub (Nov 1, 2013):

Undefine VM without delete HDD and create custom with exist hdd image. (Copy MAC and change if need)

<!-- gh-comment-id:27574258 --> @retspen commented on GitHub (Nov 1, 2013): Undefine VM without delete HDD and create custom with exist hdd image. (Copy MAC and change if need)
Author
Owner

@cjsoftuk commented on GitHub (Nov 1, 2013):

@retspen - Thanks - looks like this is an artefact of "upgrading" from master to develop branch....

<!-- gh-comment-id:27574488 --> @cjsoftuk commented on GitHub (Nov 1, 2013): @retspen - Thanks - looks like this is an artefact of "upgrading" from master to develop branch....
Author
Owner

@kokel commented on GitHub (Nov 1, 2013):

I forgot to mention that I added a kvm hypervisor with a lot of existing vms all created manually on cli.
If I define a new vm via webvirtmgr I can successfully connect to console.

Error:

Internal Server Error: /instance/1/OLD-SECURITYTUBE/
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 194, in instance
vnc_pass = Instance.objects.get(vname=vname)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 143, in get
return self.get_query_set().get(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 404, in get
self.model._meta.object_name)
DoesNotExist: Instance matching query does not exist.
[02/Nov/2013 00:09:24] "POST /instance/1/OLD-SECURITYTUBE/ HTTP/1.1" 500 67375

What problem webvirtmgr has with vms not created itself or vnc settings not coming from itself?

<!-- gh-comment-id:27605917 --> @kokel commented on GitHub (Nov 1, 2013): I forgot to mention that I added a kvm hypervisor with a lot of existing vms all created manually on cli. If I define a new vm via webvirtmgr I can successfully connect to console. Error: Internal Server Error: /instance/1/OLD-SECURITYTUBE/ 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 194, in instance vnc_pass = Instance.objects.get(vname=vname) File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", line 143, in get return self.get_query_set().get(_args, *_kwargs) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 404, in get self.model._meta.object_name) DoesNotExist: Instance matching query does not exist. [02/Nov/2013 00:09:24] "POST /instance/1/OLD-SECURITYTUBE/ HTTP/1.1" 500 67375 What problem webvirtmgr has with vms not created itself or vnc settings not coming from itself?
Author
Owner

@cjsoftuk commented on GitHub (Nov 1, 2013):

When I looked at this further earlier, it appears to be the case that when creating on command line, the webvirtmgr doesn't create an Instance object for it, and so therefore, we don't have any information in the webvirtmgr database.....

<!-- gh-comment-id:27607060 --> @cjsoftuk commented on GitHub (Nov 1, 2013): When I looked at this further earlier, it appears to be the case that when creating on command line, the webvirtmgr doesn't create an Instance object for it, and so therefore, we don't have any information in the webvirtmgr database.....
Author
Owner

@retspen commented on GitHub (Nov 1, 2013):

Yes, Instance object not created and xml config not readable for WebVirtMgr (can't normal parse xml) if VM create in console or virt-mangaer.

<!-- gh-comment-id:27607577 --> @retspen commented on GitHub (Nov 1, 2013): Yes, Instance object not created and xml config not readable for WebVirtMgr (can't normal parse xml) if VM create in console or virt-mangaer.
Author
Owner

@kokel commented on GitHub (Nov 3, 2013):

Thanks retspen! Now I can set the VNC parameters via webvirtmgr.
Is there a good current practice to migrate VMs which were not created by webvirtmgr?

<!-- gh-comment-id:27644812 --> @kokel commented on GitHub (Nov 3, 2013): Thanks retspen! Now I can set the VNC parameters via webvirtmgr. Is there a good current practice to migrate VMs which were not created by webvirtmgr?
Author
Owner

@retspen commented on GitHub (Nov 3, 2013):

Only delete VM without deleting HDD image and create custom with HDD image.

<!-- gh-comment-id:27646342 --> @retspen commented on GitHub (Nov 3, 2013): Only delete VM without deleting HDD image and create custom with HDD image.
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#114
No description provided.