[libvirt] [PATCH v3] Add host UUID (to libvirt capabilities)

Daniel P. Berrange berrange at redhat.com
Tue May 25 15:04:25 UTC 2010


On Tue, May 25, 2010 at 05:01:48PM +0200, Matthias Bolte wrote:
> 2010/5/25 Daniel P. Berrange <berrange at redhat.com>:
> > On Mon, May 24, 2010 at 02:57:33PM -0400, Stefan Berger wrote:
> >> This patch adds the host UUID (to the capabilities of libvirt). The user
> >> may provide it in libvirtd.conf overriding whatever sysfs may
> >> return. If none or no valid UUID is provided in libvirtd.conf, reading the
> >> UUID from sysfs is attempted. If that function doesn't provide a valid
> >> (not all digits may be equal), generate a temporary one.
> >> virSetHostUUIDStr() should be called first with the UUID read from
> >> libvirtd.conf, but may only be called once. Subsequently the function
> >> virGetHostUUID() can be called to get the UUID of the host.
> 
> >
> > We'll need a different solution for things like VMWare/VirtualBox/Phyp/etc,
> > so for now they don't get any host UUID in XML.
> >
> 
> Regarding VMware: The vSphere API exposes the BIOS UUID.
> 
> I'm a bit short on testing hardware right now, but I looked up the
> host UUIDs for an ESXi and a GSX server: The ESXi server has a valid
> one but the GSX server had an empty one. The problem is that in case
> the host UUID is not valid there's nothing the ESX driver could do
> about that. Because if I wanted to generate a random host UUID for the
> GSX server I would need to store it somewhere on the GSX server in
> order to achieve a consistent mapping. But the vSphere API doesn't
> provide such capabilities.

Just add the BIOS UUID to the capabilities data if one is present/valid,
otherwise leave it unset. IMHO better to have it unset than generate
a random one ourselves.

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




More information about the libvir-list mailing list