[virt-tools-list] comment field in virthost.xml?

Cole Robinson crobinso at redhat.com
Mon Feb 15 15:49:51 UTC 2010


On 02/15/2010 05:21 AM, Harald Dunkel wrote:
> On 02/10/10 16:05, Cole Robinson wrote:
>>
>> Libvirt actually supports a <description> field for VMs, it just isn't
>> exposed via virt-manager (which I will do soon). Would that be sufficient?
>>
> 
> Forgive me if I am too blind to see, but I haven't found this
> "description" field on http://libvirt.org/formatdomain.html .
> 

Not blind, it seems undocumented (not for any good reason though).

> Actually it would be nice to distinguish between a human readable
> description and some locally defined attributes for the domain,
> anyway. I would like to have something like
> 
> 	my $uri = shift;
> 	my $attribute = shift;
> 	my $vmm = Sys::Virt->new(address => $uri);
> 	my @domains = $vmm->list_domains();
> 	foreach my $dom (@domains) {
> 		if (grep /$attribute/ @{$dom->get_attributes()}) {
> 			gotcha($dom);
> 		}
> 	}
> 

That's something you would need to ask for on the libvirt-list.

- Cole




More information about the virt-tools-list mailing list