teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0648-basic-add-vmware-hypervisor-detection-from-device-tr.patch

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