Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#39017 - [virt-manager] doesn't create an LXC connection properly

Attached to Project: Community Packages
Opened by David Palma (mistofvongola) - Sunday, 23 February 2014, 23:41 GMT
Last edited by Daniel Micay (thestinger) - Friday, 28 March 2014, 00:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
When creating an LXC connection in virt-manager, via , the generated URI is incorrect (qemu:/// instead of lxc:///). This causes the connection to fail to connect with following error output:

====
Unable to connect to libvirt.

internal error: unexpected QEMU URI path '/', try qemu:///system

Libvirt URI is: qemu:///

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 1004, in _open_thread
self._backend.open(self._do_creds_password)
File "/usr/share/virt-manager/virtinst/connection.py", line 156, in open
open_flags)
File "/usr/lib/python2.7/site-packages/libvirt.py", line 105, in openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: internal error: unexpected QEMU URI path '/', try qemu:///system
====

Tested and older version (Debian, virt-manager: 0.9.1) and the issue does not exit there. It looks like the issue lies in /usr/share/virt-manager/virtManager/connect.py, lines 364-370 (in def generate_uri). LXC is in an else block rather than being explicitly set. My hunch is that HV_QEMU or HV_QEMU_SESSION is set because I also have an active QEMU connection, so the hvstr is defaulting to qemu.

Additional info:
* virt-manager: 1.0.0-2
* libvirt: 1.2.1-4
* qemu: 1.7.0-2
* lxc: 1:1.0.0-1

Steps to reproduce:
Open virt-manager, File -> Add Connection -> Hypervisor: LXC

Connection URI should lxc:/// not qemu:///.
   virt.png (57.7 KiB)
This task depends upon

Closed by  Daniel Micay (thestinger)
Friday, 28 March 2014, 00:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 1.0.1.
Comment by Andrej Podzimek (andrej) - Tuesday, 11 March 2014, 20:11 GMT
The same problem here... Is there any workaround / quick hack for this?
Comment by Daniel Micay (thestinger) - Tuesday, 25 March 2014, 03:27 GMT
Is this fixed in 1.0.1?
Comment by Andrej Podzimek (andrej) - Thursday, 27 March 2014, 19:23 GMT
Yes, it seems to be fixed. The connection to remote LXC hosts works for me now in virt-manager 1.0.1.

For some reason libvirt loses track of the running LXC guests after some time, so virt-manager reports them as switched off and gets into an inconsistent state from which the guets cannot be respawned due to some weird socket and virtual interface conflicts. But that's most likely a completely different (unrelated) bug. (Because the host runs Fedora, it may not be affecting ArchLinux at all.)

Loading...