On Fri, Jul 21, 2017 at 2:22 PM, Mike Belopuhov <m...@belopuhov.com> wrote: > On Fri, Jul 21, 2017 at 19:58 +0200, Ingo Schwarze wrote: >> If these numbers are completely fake and irrelevant, >> then saying so in one short sentence - or even in the >> comment line above - may be sufficient. >> >> But this quote from Maxim fuels doubts: >> >> :: I don't know whether XenServer actually cares about what >> :: version is reported, but if it does, this would be tied >> :: to features supported by xen, xbf, and xnf drivers. >> :: You typically update the tools with each new XenServer >> :: release, which gives you most recent disk and >> :: network drivers, at least on Windows. >> >> If that is true, than you have just built a time bomb: >> YOU need to remember to regularly update the manual. >> USERS need to remember to regularly update their rc.local. > > Yes and yes, however, these interfaces don't change often so > there's no need to constantly update them. We can leave this > as a hint and an exercise for the reader. I've changed a > comment there saying that this is a version of "XenServer Tools". > XenServer users must be able to comprehend what this means. > >> If the latter is true, this may need to be explained >> in this manual page. Of course, that can be figured >> out and improved later, if needed. Including a change >> to explain where to get the right magic numbers from >> rather than simply advertising some numbers that may be >> good today, but not tomorrow.
See the following link for more info: https://wiki.xenproject.org/wiki/XAPI_fake_presence_of_PV_drivers It's XAPI that cares about this stuff, but the actual version number doesn't seem to matter. The script they provide is intended to run on the host, so it can get the current product version from /etc/xensource-inventory. I don't think this information is exposed in any way to the VM itself, at least not through XenStore. One thing you can do, however, is get (but not set) viridian state via `hostctl platform/viridian` (true/false). You can use that to decide whether pvbus1 is needed or not. You can also report VM IP by setting attr/eth0/{ip,ipv6}. Here are the values used by other OSs: CentOS 7: attr/PVAddons/MajorVersion 7 attr/PVAddons/MinorVersion 0 attr/PVAddons/MicroVersion 0 attr/PVAddons/BuildVersion 130092 attr/PVAddons/Installed 1 data/os_uname = "3.10.0-514.21.2.el7.x86_64" data/os_name = "CentOS Linux release 7.3.1611 (Core)" data/os_distro = "centos" data/os_majorver = "7" data/os_minorver = "3" Windows Server 2016: attr/PVAddons/MajorVersion 7 attr/PVAddons/MinorVersion 1 attr/PVAddons/MicroVersion 0 attr/PVAddons/BuildVersion 825 attr/PVAddons/Installed 1 data/os_distro = "windows" data/os_majorver = "6" data/os_minorver = "2" data/os_name = "Microsoft Windows Server 2016 Standard|C:\\Windows|\\Device\\Harddisk0\\Partition2" -Max