diff options
-rw-r--r-- | man/systemd.unit.xml | 1 | ||||
-rw-r--r-- | src/shared/virt.c | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index 6447584706..86a8cbb330 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -996,6 +996,7 @@ virtualization solution, or one of <varname>qemu</varname>, <varname>kvm</varname>, + <varname>zvm</varname>, <varname>vmware</varname>, <varname>microsoft</varname>, <varname>oracle</varname>, diff --git a/src/shared/virt.c b/src/shared/virt.c index 20a8d7c5bf..b4368952ff 100644 --- a/src/shared/virt.c +++ b/src/shared/virt.c @@ -220,6 +220,23 @@ int detect_vm(const char **id) { goto finish; } +#if defined(__s390__) + { + _cleanup_free_ char *t = NULL; + + r = get_status_field("/proc/sysinfo", "VM00 Control Program:", &t); + if (r >= 0) { + if (streq(t, "z/VM")) + _id = "zvm"; + else + _id = "kvm"; + r = 1; + + goto finish; + } + } +#endif + r = 0; finish: |