naccyde / rpms / systemd

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