Skip to content

sysfs.GetSystemUUID may not report properly (if ever) the VM UUID in Xen guests #3783

@TSnake41

Description

@TSnake41

Xen PV/PVH guests don't have a SMBIOS table, causing the current logic to fail. Aside these guest types (in case we have a SMBIOS table), there are some quirks which may cause it to be wrong (see hvmloader: Update to SMBIOS 2.6 which attempts to fix it).
Linux provides a canonical way of getting the VM UUID under Xen (/sys/hypervisor/uuid), which works regardless of SMBIOS existence and avoid some quirks.

It is documented as stable Linux ABI : https://github.com/torvalds/linux/blob/master/Documentation/ABI/stable/sysfs-hypervisor-xen#L91-L96

What:		/sys/hypervisor/uuid
Date:		March 2009
KernelVersion:	2.6.30
Contact:	xen-devel@lists.xenproject.org
Description:	If running under Xen:
		UUID of the guest as known to the Xen hypervisor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions