Description of problem: The UUID in the SMBios data is often found to be bogus, or non-unique. On systemd based hosts, there is a unique UUID located in /etc/machine-id, which we can use as libvirt's host UUID. So we should try to load that file first, and fallback to SMBIOS if not found Version-Release number of selected component (if applicable): 0.10.2
The UUID referenced here is what we report as the <uuid> in 'virsh capabilities' output. The function that currently handles this is src/util/viruuid.c virSetHostUUIDStr ; if the user doesn't request a hardcoded one from libvirtd.conf, it will get it from smbios/dmi In virSetHostUUIDStr we should use virFileExists to see if /etc/machine-id is present on the host, and if so, use virFileReadAll to read its contents. /etc/machine-id is basically a standard UUID string, but without any '-' in it, but I think virUUIDParse will already handle that correctly. https://www.freedesktop.org/software/systemd/man/machine-id.html
Patch was posted upstream: http://www.redhat.com/archives/libvir-list/2016-April/msg01656.html
Upstream now: commit 6fe81c3a71e0e8cccb151cb08c62d4d5961170a2 Author: Nikolay Shirokovskiy <nshirokovskiy> Date: Tue May 3 12:12:41 2016 +0300 daemon: add option to read host uuid from /etc/machine-id Daemon config parameter switch between reading host uuid either from smbios or machine-id: host_uuid_source = "smbios|machine-id" Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy>