[libvirt] [PATCH 0/1] power: add support for vm,uuid file

On POWER systems, qemu exports uuid as a firmware devicetree node vm,uuid. Use that in a similar manner to the product_uuid file as on DMI based (x86) machines. Dimitri John Ledkov (1): viruuid: On POWER, qemu exports uuid as 'vm,uuid' devicetree node. src/util/viruuid.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1

Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com> --- src/util/viruuid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/viruuid.c b/src/util/viruuid.c index 0c12ddcc3e..8553a68965 100644 --- a/src/util/viruuid.c +++ b/src/util/viruuid.c @@ -1,3 +1,4 @@ + /* * viruuid.c: helper APIs for dealing with UUIDs * @@ -201,6 +202,7 @@ getDMISystemUUID(char *uuid, int len) const char *paths[] = { "/sys/devices/virtual/dmi/id/product_uuid", "/sys/class/dmi/id/product_uuid", + "/sys/firmware/devicetree/base/vm,uuid", NULL }; -- 2.20.1

On Mon, Apr 15, 2019 at 4:16 PM Dimitri John Ledkov <xnox@ubuntu.com> wrote:
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com> --- src/util/viruuid.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/util/viruuid.c b/src/util/viruuid.c index 0c12ddcc3e..8553a68965 100644 --- a/src/util/viruuid.c +++ b/src/util/viruuid.c @@ -1,3 +1,4 @@ + /* * viruuid.c: helper APIs for dealing with UUIDs * @@ -201,6 +202,7 @@ getDMISystemUUID(char *uuid, int len) const char *paths[] = { "/sys/devices/virtual/dmi/id/product_uuid", "/sys/class/dmi/id/product_uuid", + "/sys/firmware/devicetree/base/vm,uuid",
This will only be available in KVM guests, so while correct and useful there will only help for nested cases. I was concerned about that, but Dimitri and I discussed that on IRC and he was aware of that and the intention is indeed just for nested. That said while I think the overall share of systems making use of that will be low it seems ok to me. Thanks for also pushing a similar change to systemd [1], that way down the road old-libvirt+new-systemd setups will still benefit as machine-id is a fallback for the system UUID. P.S. do you have (or need) a test build of libvirt with the change setting the host-id accordingly to show the function here? Reviewed-by: Christian Ehrhardt <christian.ehrhardt@canonical.com> [1]: https://github.com/systemd/systemd/pull/12321
NULL };
-- 2.20.1
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd
participants (2)
-
Christian Ehrhardt
-
Dimitri John Ledkov