>>> On 29.11.17 at 16:38, <o...@aepfle.de> wrote: > The detection of ConditionVirtualisation= relies on the presence of > /proc/xen/capabilities. If the file exists and contains the string > "control_d", the running system is a dom0 and VIRTUALIZATION_NONE should > be set. In case /proc/xen exists, or some sysfs files indicate "xen", > VIRTUALIZATION_XEN should be set to indicate the system is a domU. > > With an (old) xenlinux based kernel, /proc/xen/capabilities is always > available and the detection described above works always. But with a > pvops based kernel, xenfs must be mounted on /proc/xen to get > "capabilities". Up to now this was done by a proc-xen.mount unit, which > is part of xen.git. Since the mounting happens "late", other units may > be scheduled before "proc-xen.mount". If these other units make use of > "ConditionVirtualisation=", the virtualization detection returns > incorect results. detect_vm() will set VIRTUALIZATION_XEN because "xen" > is found in sysfs. This value will be cached. Once xenfs is mounted, > the next process that runs detect_vm() will get VIRTUALIZATION_NONE.
With all of the above, was it considered to check /sys/hypervisor alongside with or perhaps even in preference to /proc/xen? Jan _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel