daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
b8c242
From 537055fc407d7cff32ddd3414a6900ccff579c46 Mon Sep 17 00:00:00 2001
b8c242
From: Cyprien Laplace <claplace@vmware.com>
b8c242
Date: Thu, 14 Nov 2019 09:42:14 -0500
b8c242
Subject: [PATCH] basic: add vmware hypervisor detection from device-tree
b8c242
b8c242
Allow ConditionVirtualization=vmware to work on ESXi on arm VMs
b8c242
using device-tree.
b8c242
b8c242
(cherry picked from commit 4d4ac92c928fcbc60b85fcbf8370af3883ee63db)
b8c242
b8c242
Resolves: #1959150
b8c242
---
b8c242
 src/basic/virt.c | 2 ++
b8c242
 1 file changed, 2 insertions(+)
b8c242
b8c242
diff --git a/src/basic/virt.c b/src/basic/virt.c
b8c242
index 0b88005ed6..8d862b6d67 100644
b8c242
--- a/src/basic/virt.c
b8c242
+++ b/src/basic/virt.c
b8c242
@@ -122,6 +122,8 @@ static int detect_vm_device_tree(void) {
b8c242
                 return VIRTUALIZATION_KVM;
b8c242
         else if (strstr(hvtype, "xen"))
b8c242
                 return VIRTUALIZATION_XEN;
b8c242
+        else if (strstr(hvtype, "vmware"))
b8c242
+                return VIRTUALIZATION_VMWARE;
b8c242
         else
b8c242
                 return VIRTUALIZATION_VM_OTHER;
b8c242
 #else