[systemd-devel] systemd-detect-virt and vendors
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. Rahul ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-detect-virt and vendors
On Wed, 08.10.14 09:38, Rahul Sundaram (methe...@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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-detect-virt and vendors
Hi On Wed, Oct 8, 2014 at 9:46 AM, Lennart Poettering lenn...@poettering.net wrote: 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. Fair enough. I will see if I can do that. Would it be ok to add appropriate aliases to existing terms, virtualbox - oracle and hyperv - microsoft and mark the vendor names as deprecated? That way we retain compatibility while having the consistency (this is more than just about being pretty!) that everything is named after the technology and not the mismash of vendors names (oracle, microsoft) and technology names (kvm...) in a list. I will write up some patches to see if I can implement this cleanly and we will see how it goes. Rahul ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-detect-virt and vendors
On Wed, Oct 08, 2014 at 10:35:25AM -0400, Rahul Sundaram wrote: Hi On Wed, Oct 8, 2014 at 9:46 AM, Lennart Poettering lenn...@poettering.net wrote: 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. Fair enough. I will see if I can do that. Would it be ok to add appropriate aliases to existing terms, virtualbox - oracle and hyperv - microsoft and mark the vendor names as deprecated? That way we retain This would break compatibility, because systemd-detect-virt would have to start returning different strings. Zbyszek compatibility while having the consistency (this is more than just about being pretty!) that everything is named after the technology and not the mismash of vendors names (oracle, microsoft) and technology names (kvm...) in a list. I will write up some patches to see if I can implement this cleanly and we will see how it goes. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-detect-virt and vendors
Hi On Wed, Oct 8, 2014 at 10:37 AM, Zbigniew Jędrzejewski-Szmek wrote: This would break compatibility, because systemd-detect-virt would have to start returning different strings. Ah, I was thinking more about ConditionVirtualization but I guess we are kinda struck with what we already have for command line use. I guess I will just send some patches to clarify things in the man page and add a --list command and leave the rest as it is? Rahul ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-detect-virt and vendors
On Wed, Oct 08, 2014 at 10:42:21AM -0400, Rahul Sundaram wrote: Hi On Wed, Oct 8, 2014 at 10:37 AM, Zbigniew Jędrzejewski-Szmek wrote: This would break compatibility, because systemd-detect-virt would have to start returning different strings. Ah, I was thinking more about ConditionVirtualization but I guess we are kinda struck with what we already have for command line use. I guess I will just send some patches to clarify things in the man page and add a --list command and leave the rest as it is? Yeah, sounds good. Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-detect-virt and vendors
On Wed, 08.10.14 09:57, Rahul Sundaram (methe...@gmail.com) wrote: Hi On Wed, Oct 8, 2014 at 9:46 AM, Lennart Poettering wrote: 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. Fair enough. I will see if I can do that. Would it be ok to add appropriate aliases to existing terms, virtualbox - oracle and hyperv - microsoft and mark the vendor names as deprecated? That way we retain compatibility while having the consistency (this is more than just about being pretty!) that everything is named after the technology and not the mismash of vendors names (oracle, microsoft) and technology names (kvm...) in a list. Well, systemd-detect-virt outputs an id. People use it like so: if [ `systemd-detect-virt` = microsoft ] ; then ... fi THis really shouldn't get broken. In general I am against such redundancies of duplicate entries, unless we have a really strong reason. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] systemd-detect-virt and vendors
From: Rahul Sundaram methe...@gmail.com 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. At the least, we need documentation that tells the user what name systemd uses, based on the name(s) that the user is likely to know the product by (which may not be the current name of the product). This would work reasonably well: The following technologies are currently identified: qemu, kvm, vmware, microsoft (a/k/a Hyper-V, Viridian, Windows Server Virtualization), oracle (a/k/a VirtualBox), xen, bochs, chroot, openvz, lxc, lxc-libvirt, systemd-nspawn. Dale ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel