Bug#1038901: xen dom0 erroneous detected as 'xen' virtualization by systemd-detect-virt
Maximilian Engelhardt
maxi at daemonizer.de
Thu Jun 22 22:04:19 BST 2023
Package: systemd
Version: 252.6-1
Severity: normal
X-Debbugs-Cc: maxi at daemonizer.de
Control: affects -1 + src:xen
When running the xen hypervisor, systemd-detect-virt erroneous detects 'xen'
virtualization on the dom0:
$ systemd-detect-virt
xen
The expected output should be 'none', in case of a dom0 with no other
virtualization. The documentation [1] says 'xen' corresponds to "Xen
hypervisor (only domU, not dom0)".
Here is some more debug output in the hope it will be helpful:
On a dom0 (detect wrongly):
$ SYSTEMD_LOG_LEVEL=debug systemd-detect-virt
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Found container virtualization none.
No virtualization found in DMI vendor table.
DMI BIOS Extension table does not indicate virtualization.
UML virtualization not found in /proc/cpuinfo.
Virtualization XEN found (/proc/xen exists)
Virtualization XEN, found /sys/hypervisor/properties/features with value 000228f0, XENFEAT_dom0 (indicating the 'hardware domain') is set.
Virtualization found, CPUID=XenVMMXenVMM
Found VM virtualization xen
xen
On a domU (detected correctly):
$ SYSTEMD_LOG_LEVEL=debug systemd-detect-virt
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Found container virtualization none.
No virtualization found in DMI vendor table.
Unable to read /sys/firmware/dmi/entries/0-0/raw, using the virtualization information found in DMI vendor table, ignoring: No such file or directory
UML virtualization not found in /proc/cpuinfo.
Virtualization XEN found (/proc/xen exists)
Virtualization XEN, found /sys/hypervisor/properties/features with value 00012305, XENFEAT_dom0 (indicating the 'hardware domain') is not set.
Found VM virtualization xen
xen
XENFEAT_dom0 seems to be detected correctly in both cases, but the dom0 has
one additional line which is not present in the domU output:
Virtualization found, CPUID=XenVMMXenVMM
This behavior is especially a problem since the smartmontools service file has
"ConditionVirtualization=no" and thus does not get started on the dom0.
This problem might be related to the upstream bug [2], but the symptoms are a
bit different.
[1] https://manpages.debian.org/bookworm/systemd/systemd-detect-virt.1.en.html
[2] https://github.com/systemd/systemd/issues/28113
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20230622/5945a9be/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list