[et-mgmt-tools] [PATCH] virt-manager: List VM 'hostdev' devices

Cole Robinson crobinso at redhat.com
Wed Jan 21 15:35:10 UTC 2009


Daniel P. Berrange wrote:
> On Tue, Jan 20, 2009 at 05:41:48PM -0500, Cole Robinson wrote:
>> The attached patch adds support for listing, viewing details of, and
>> removing VM 'hostdev' devices. libvirt currently supports usb and pci
>> host devices, so I tried to tackle all the variants for each. Some
>> example screeenshots:
>>
>> http://fedorapeople.org/~crobinso/virt-manager/vmm-show-hostdev1.png
>> http://fedorapeople.org/~crobinso/virt-manager/vmm-show-hostdev2.png
>>
>> A couple particulars:
>>
>> - There is no icon for a 'hostdev' in the VM's hardware list. We've been
>> stretching use of gtk stock icons pretty thin, and there really isn't
>> anything available that makes sense. This will be addressed when we
>> integrate custom icons (next release).
>>
>> - The parameter differences between PCI, USB by vendor/product, and USB
>> by bus/device number are pretty large. Rather than have 10 different GUI
>> fields, populating only what is appropriate and hiding the others, I
>> just generate a single line listing for the device details section (ex.
>> "Bus: 001, Device: 002". This is shown in the screenshots. It's a bit
>> uglier this way, but much simpler, and conveys all the same information.
> 
> I'd just use the formatted address syntax shown by lspci/lsusb, eg
> 
>   USB      001:002
>   PCI      0000:01:3f.0
> 
> Given the PCI / USB address you ought to be able to use the host 
> device enumeration patches to find the matching device on the host.
> Once you have that you get the friendly Vendor + Product name 
> which would be more useful to display
> 

Updated patch attached, addressing the above comment. New screenshots
say it all:

http://fedorapeople.org/~crobinso/virt-manager/vmm-show-hostdev1v2.png
http://fedorapeople.org/~crobinso/virt-manager/vmm-show-hostdev2v2.png

Thanks,
Cole

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vmm-list-hostdevs-2.patch
Type: text/x-patch
Size: 137513 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/et-mgmt-tools/attachments/20090121/3546f937/attachment.bin>


More information about the et-mgmt-tools mailing list