[virt-tools-list] [PATCH 1/2] Default connection URI if libvirt-daemon-driver-lxc is installed

Cole Robinson crobinso at redhat.com
Mon Apr 6 20:35:44 UTC 2015


On 12/05/2014 09:49 AM, Cole Robinson wrote:
> On 12/04/2014 05:08 AM, Cédric Bosdonnat wrote:
>> From: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
>>
>> 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
> 

I pushed a patch with setup.py configure --default-hvs now:

commit ef5552d0aabb000ab81207980040374436ae692b
Author: Cole Robinson <crobinso at redhat.com>
Date:   Mon Apr 6 16:29:28 2015 -0400

    configure: Add --default-hvs, kill --with-bhyve

- Cole





More information about the virt-tools-list mailing list