mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-04-25 15:35:57 +03:00
[GH-ISSUE #241] 'virConnect' object has no attribute 'getDomainCapabilities' #160
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/webvirtcloud#160
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 @markx1916 on GitHub (Jun 10, 2019).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/241
I used the lastest repo build for a docker image.
my libvirtd version is 4.10
libvirtd -V
libvirtd (libvirt) 4.10.0
when I click the instance url ,I got this error :
'virConnect' object has no attribute 'getDomainCapabilities'
anyone meet this issues ?
Environment:
Request Method: GET
Request URL: http://10.188.0.20:80/instances/3/1.1.1.1/
Django Version: 1.11.20
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'computes',
'console',
'networks',
'storages',
'interfaces',
'nwfilters',
'instances',
'secrets',
'logs',
'accounts',
'create',
'datasource')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.RemoteUserMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
Traceback:
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "/srv/webvirtcloud/instances/views.py" in instance
308. busses = conn.get_disk_bus_types()
File "/srv/webvirtcloud/vrtManager/connection.py" in get_disk_bus_types
468. return util.get_xml_path(self.get_dom_cap_xml(), func=get_bus_list)
File "/srv/webvirtcloud/vrtManager/connection.py" in get_dom_cap_xml
362. return self.wvm.getDomainCapabilities(emulatorbin, arch, machine, virttype)
Exception Type: AttributeError at /instances/3/1.1.1.1/
Exception Value: 'virConnect' object has no attribute 'getDomainCapabilities'
@markx1916 commented on GitHub (Jun 10, 2019):
also in /var/log/webvirtcloud.log ,I found this :
libvirt: Storage Driver error : Storage volume not found: no storage vol with matching path '/home/vmdata/vm1.1.1.1/1.1.1.1.sys.img'
libvirt: Storage Driver error : Storage volume not found: no storage vol with matching path '/home/vmdata/vm1.1.1.1/1.1.1.1.data.img'
libvirt: Network Driver error : Network not found: no network with matching name 'br0'
Internal Server Error: /instances/3/1.1.1.1/
Traceback (most recent call last):
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/webvirtcloud/venv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/srv/webvirtcloud/instances/views.py", line 308, in instance
busses = conn.get_disk_bus_types()
File "/srv/webvirtcloud/vrtManager/connection.py", line 468, in get_disk_bus_types
return util.get_xml_path(self.get_dom_cap_xml(), func=get_bus_list)
File "/srv/webvirtcloud/vrtManager/connection.py", line 362, in get_dom_cap_xml
return self.wvm.getDomainCapabilities(emulatorbin, arch, machine, virttype)
AttributeError: 'virConnect' object has no attribute 'getDomainCapabilities'
@catborise commented on GitHub (Jun 10, 2019):
can you please check version of kvm host's libvirt.

@markx1916 commented on GitHub (Jun 10, 2019):
em.. My host libvirt version is also libvirtd (libvirt) 4.10.0, this page you show is working well ,but the page of inside vm is not ok . I have a comment on this line of vrtManager/connection.py , and the page show well ,but some function like clone /resize can not use ,and show 500 error !
#return self.wvm.getDomainCapabilities(emulatorbin, arch, machine, virttype)
@catborise commented on GitHub (Jun 10, 2019):
getDomainCapabilities function available since libvirt version 2.
if you are using libvirt 4.10 there shouldnt be a problem.
please run that command on kvm host and webvirtcloud(docker):
virsh version
ps: did you restart libvirtd and vm instance after installing new version qemu&libvirt (new version of qemu or libvirt does not activate before stop&start)
@markx1916 commented on GitHub (Jun 11, 2019):
en,I find out that the docker didn't have a virsh command , I follow the step and install it in a centos os ,that's goes well . maybe some steps missed in the dockerfile ?
I hava restart the libvirt and vm ,but not work .
@catborise commented on GitHub (Jun 20, 2019):
@Damien9527 thanks damien. I did never use docker because of that i missed the error. The ubuntu image was very old(14.04), i update it to 18.04. Problem solved.
in 14.04, libvirt version is 1.22
in 18.04, libvirt version is 4.00
i update the docker file. I will send pull request to retspen