[Ovirt-devel] [PATCH] Changed the source for UUID to be dmidecode for now.
Chris Lalancette
clalance at redhat.com
Thu Jun 26 08:24:34 UTC 2008
Chris Lalancette wrote:
> OK. I think this is almost right, but still needs to be changed a little, since
> we should always send over a UUID. So something like this:
>
> VENDOR=`dmidecode | awk ' /Vendor/{ print $2; } '`
> UUID=`dmidecode | awk ' /UUID/{ print $2; } '`
> if [ -z "$UUID" -o "$VENDOR" = "QEMU" ]; then
> UUID=get_my_hostname
> fi
>
> ovirt-identify-node -s $SRV_HOST -p $SRV_PORT -u $UUID
>
> That way you always have some UUID, either the value from the DMI tables in the
> case of bare-metal, or the hostname in the case of QEMU/KVM guest or missing
> UUID in bare-metal.
And just in case anyone thinks that I'm making stuff up about the UUID's missing
on bare-metal, of the 4 pieces of hardware that I have locally, only 1 of them
has a valid UUID. The other 3 either have:
UUID: Not Settable
or
UUID: Not Present
Chris Lalancette
More information about the ovirt-devel
mailing list