[systemd-devel] systemd-detect-virt and vendors
Lennart Poettering
lennart at poettering.net
Wed Oct 8 06:46:15 PDT 2014
On Wed, 08.10.14 09:38, Rahul Sundaram (metherid at gmail.com) wrote:
> Hi
>
> Bringing up here for discussion as suggested in
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1150477
>
> Just for the background, I was checking to see if systemd-detect-virt
> supported virtualbox and grepped the man page and concluded it didn't since
> I didn't find the term. I was going to write up a patch to support it but
> a recheck in the man page showed support for "oracle" and "microsoft".
> Grepping through the source, confirmed this actually means virtualbox and
> hyper-v respectively.
>
> Using vendor names like this is pretty confusing. Not everyone knows that
> say virtualbox is owned by Oracle (It was a startup, acquired by Sun which
> itself was acquired by Oracle) and worse still, Oracle supports multiple
> virtualization technologies included a variant of Xen rebranded as Oracle
> VM. We really should be more specific and call it virtualbox and hyper-v
> instead, similar to say virt-what and other similar tools. I will be happy
> write the patches if this makes sense.
These things changed names a couple of times. As such I tried to stay
out of any such games, and just named it after the primary company,
under the assumption that would be slightly more stable.
The IDs are ultimately just tokens to identify things with, they are
not "pretty", descriptive strings that are supposed to be shown to the
users. They also are API, since people use them in unit files
(ConditionVirtualization=) and shell scripts, as such I am not too
enthusiastic about changing them.
I think what would make a lot of sense though is to add a section to
the man page somewhere, that explains which ID refers to which
software from which vendor. Also, it might make sense to add a new
switch to the tool, that dumps the table of known identifiers plus
some description.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list