[systemd-bugs] [Bug 77271] systemd-detect-virt and directive ConditionVirtualization wrongly return vm for xen dom0
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Apr 22 00:42:40 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=77271
--- Comment #4 from Andy Melnikov <andy.melnikov at gmail.com> ---
That page seems to be wrong/outdated/incomplete: dmidecode won't work on Xen PV
systems as there's no DMI emulation there, /proc/xen/capabilities doesn't
always exist, and kernel suffix is unreliable as one can put anything there.
I think we should leave old Xen detection code using /sys/hypervisor/type and
only add a distinction between xen dom0 and domU using the method proposed in
the new patch. In pseudocode:
if (/sys/hypervisor/type == 'xen')
{
# we run Xen, and only need to distinguish between dom0 and domU
if (exists /proc/xen/capabilities &&
/proc/xen/capabilities contains 'control_d')
{
return 'xen-dom0'
}
else
{
return 'xen-domU'
}
}
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20140422/3b0245ad/attachment.html>
More information about the systemd-bugs
mailing list