[libvirt] dmidecode dependency

Jason Helfman jgh at FreeBSD.org
Thu Feb 19 21:11:37 UTC 2015


On Thu, Feb 19, 2015 at 12:23 PM, Daniel P. Berrange <berrange at redhat.com>
wrote:

> On Thu, Feb 19, 2015 at 11:49:14AM -0800, Jason Helfman wrote:
> > Hello All,
> >
> > I was wondering if it may be possible to call sysctl, instead of
> requiring
> > dmidecode to be installed for getting the uuid of a system?
> >
> > According to the user that filed the bug below, dmidecode needs to be
> > installed to get the uuid, or errors will  be printed in logs to get the
> > uuid.
> >
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196733
> >
> > I was wondering if sysctl can be called to get this information for
> > FreeBSD? I am not sure if Linux would give similar information, but would
> > think it might. Beyond this, I am not sure if dmidecode is used for other
> > aspects beyond uuid where it is required where sysctl doesn't give the
> > information needed.
> >
> > $ sudo dmidecode |grep -i uuid
> >         UUID: 42355DE8-C55C-E487-8E16-509A78EB5EE1
> > $ sysctl kern.hostuuid
> > kern.hostuuid: 42355de8-c55c-e487-8e16-509a78eb5ee1
>
> On modern systems we could probably use the sysctl, but on older linux
> platforms at least dmidecode is the only way to get the info we need.
> Regardless it is fine to use whatever approach works best on FreeBSD.
> Getting host UUIDs is not covered by anything in POSIX, so it will all
> be OS specific code.
>
>
I'm uncertain how to patch libvirt, but in the meanwhile I will add
dmidecode as a dependency.

-jgh

-- 
Jason Helfman          | FreeBSD Committer
jgh at FreeBSD.org     | http://people.freebsd.org/~jgh  | The Power to Serve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150219/bcb704c6/attachment-0001.htm>


More information about the libvir-list mailing list