<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - systemd-detect-virt and directive ConditionVirtualization wrongly return vm for xen dom0"
href="https://bugs.freedesktop.org/show_bug.cgi?id=77271#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - systemd-detect-virt and directive ConditionVirtualization wrongly return vm for xen dom0"
href="https://bugs.freedesktop.org/show_bug.cgi?id=77271">bug 77271</a>
from <span class="vcard"><a class="email" href="mailto:Thomas.Blume@suse.com" title="Thomas Blume <Thomas.Blume@suse.com>"> <span class="fn">Thomas Blume</span></a>
</span></b>
<pre>Ok, attached the new patch, tested as good as I could.
In domU:
# cat /proc/xen/capabilities
# systemd-detect-virt
xen-domU
# echo $?
0
# mkdir /tmp/void
# mount -o bind /tmp/void/ /proc/xen/
# cat /proc/xen/capabilities
cat: /proc/xen/capabilities: No such file or directory
# systemd-detect-virt
xen
# echo $?
0
in dom0:
# cat /proc/xen/capabilities
control_d
# systemd-detect-virt
xen-dom0
# echo $?
1
# mkdir /tmp/void
# mount -o bind /tmp/void /proc/xen/
# cat /proc/xen/capabilities
cat: /proc/xen/capabilities: No such file or directory
# systemd-detect-virt
xen
# echo $?
0</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>