[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH] Allow watching for USB devices hotplug and attaching them to VMs

Well, are you planning to add those features to libvirt itself?
The idea was to allow multiple interfaces and user can select which one to use.
Currently HAL (code is similar like in netdevhelper.py) is supported and
udev type - the udev type is establishing an inotifier for python to /dev tree
and watching for changes. It's working fine with adding the devices to VMs,
for udev it uses udevadm (if no HAL connection can be established at the time
since DeviceKit is not supported yet).

The idea is that Cole wrote me I should have a look at this one if I am
interested so I did. I didn't know you would like to add this functionality
to libvirt itself.


----- Original Message -----
From: "Daniel P. Berrange" <berrange redhat com>
To: "Michal Novotny" <minovotn redhat com>
Cc: "virt-tools-list" <virt-tools-list redhat com>
Sent: Thursday, August 13, 2009 3:52:00 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: [virt-tools-list] [PATCH] Allow watching for USB devices hotplug and attaching them to VMs

On Thu, Aug 13, 2009 at 09:43:53AM -0400, Michal Novotny wrote:
> Hi all,
> this is the patch to check for the USB device hotplugging, it currently
> allows 2 types of watching for USB device hotplug - using HAL and udev
> itself. There is a plan for DeviceKit support but I am not currently
> having option to make it for DeviceKit so this option will be added in
> time. Nevertheless the HAL and udev implementations are working now
> but you may have to choose the desired type in the Preferences menu.
> UDev type is working by watching for /dev tree changes using pyinotify
> and querying udevadm so if you want to use udev type, you need to have
> pyinotify module installed.

Talking directly to HAL, DeviceKit or sysfs from virt-manager is not
really that nice. virt-manager has done this in the past, but we've
wanted to move all this functionality into libvirt itself, since that's
the only way it will be able to work for remove hypervisors. libvirt
already exposes information about all host USB devices. All that's
missing is an API that notifies you when one is created/deleted, so
you can avoid polling on libvirt all the time. 

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]