On 12/04/2014 05:08 AM, Cédric Bosdonnat wrote:
From: Cédric Bosdonnat <cedric.bosdonnat@xxxxxxx> The default URI is set to lxc:/// if libvirt's lxc driver is installed locally, but only if there is no kvm/xen URI to default to. --- virtManager/connect.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/virtManager/connect.py b/virtManager/connect.py index 9c997da..ddda173 100644 --- a/virtManager/connect.py +++ b/virtManager/connect.py @@ -115,6 +115,10 @@ class vmmConnect(vmmGObjectUI): return "qemu:///system" else: return "qemu:///session" + + if (os.path.exists("/usr/lib/libvirt/libvirt_lxc") or + os.path.exists("/usr/lib64/libvirt/libvirt_lxc")): + return "lxc:///" return None def cancel(self, ignore1=None, ignore2=None):
RH distros use /usr/libexec/libvirt_lxc, so we'd want to add that as well. I can fix that when applying though
Are you adding this patch for completeness, or because it's something that's needed/wanted in suse?
Personally I don't think this is a good idea though. While virt-manager can drive LXC, it's very different from qemu/xen particularly when creating VMs. I'm afraid a clueless user would run virt-manager for the first time, inadvertently end up connected to lxc, try to create a VM, and be confused like 'wheres the option for CDROM install? etc.
In practice I don't know how likely that is on Fedora though, not sure why a random user would end up with libvirt-lxc installed but not qemu unless it was done deliberately.
So I'd say if this is just a patch for completeness, it shouldn't go in. But if you guys are going to carry it regardless, then we can apply this, and I can add a 'python setup.py configure' option like --default-hypervisors to limit what virt-manager will connect to by default. That's probably useful to do anyways for freebsd bhyve guys at least
- Cole _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list