Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
Andrew Lukoshko | 32d7d2633f | |
Andrew Lukoshko | bb74c072e5 |
|
@ -0,0 +1,34 @@
|
||||||
|
From 4d5869f90a260329558e5ff157e56d7b918b5d08 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andrew Lukoshko <andrew.lukoshko@gmail.com>
|
||||||
|
Date: Fri, 18 Nov 2022 16:47:34 +0000
|
||||||
|
Subject: [PATCH] virt: Fix the detection for Hyper-V VMs
|
||||||
|
|
||||||
|
---
|
||||||
|
src/basic/virt.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/basic/virt.c b/src/basic/virt.c
|
||||||
|
index d347732..390d0c5 100644
|
||||||
|
--- a/src/basic/virt.c
|
||||||
|
+++ b/src/basic/virt.c
|
||||||
|
@@ -131,7 +131,8 @@ static int detect_vm_dmi(void) {
|
||||||
|
"/sys/class/dmi/id/product_name", /* Test this before sys_vendor to detect KVM over QEMU */
|
||||||
|
"/sys/class/dmi/id/sys_vendor",
|
||||||
|
"/sys/class/dmi/id/board_vendor",
|
||||||
|
- "/sys/class/dmi/id/bios_vendor"
|
||||||
|
+ "/sys/class/dmi/id/bios_vendor",
|
||||||
|
+ "/sys/class/dmi/id/product_version" /* For Hyper-V VMs test */
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct {
|
||||||
|
@@ -149,6 +150,7 @@ static int detect_vm_dmi(void) {
|
||||||
|
{ "Parallels", VIRTUALIZATION_PARALLELS },
|
||||||
|
/* https://wiki.freebsd.org/bhyve */
|
||||||
|
{ "BHYVE", VIRTUALIZATION_BHYVE },
|
||||||
|
+ { "Hyper-V", VIRTUALIZATION_MICROSOFT },
|
||||||
|
};
|
||||||
|
unsigned i;
|
||||||
|
int r;
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
Name: systemd
|
Name: systemd
|
||||||
Url: http://www.freedesktop.org/wiki/Software/systemd
|
Url: http://www.freedesktop.org/wiki/Software/systemd
|
||||||
Version: 239
|
Version: 239
|
||||||
Release: 68%{?dist}
|
Release: 68%{?dist}.alma
|
||||||
# For a breakdown of the licensing, see README
|
# For a breakdown of the licensing, see README
|
||||||
License: LGPLv2+ and MIT and GPLv2+
|
License: LGPLv2+ and MIT and GPLv2+
|
||||||
Summary: System and Service Manager
|
Summary: System and Service Manager
|
||||||
|
@ -882,6 +882,11 @@ Patch0829: 0829-sd-event-add-relative-timer-calls.patch
|
||||||
Patch0830: 0830-logind-add-option-to-stop-idle-sessions-after-specif.patch
|
Patch0830: 0830-logind-add-option-to-stop-idle-sessions-after-specif.patch
|
||||||
Patch0831: 0831-logind-schedule-idle-check-full-interval-from-now-if.patch
|
Patch0831: 0831-logind-schedule-idle-check-full-interval-from-now-if.patch
|
||||||
|
|
||||||
|
|
||||||
|
# https://github.com/systemd/systemd/pull/20998
|
||||||
|
# https://github.com/systemd/systemd/pull/21475
|
||||||
|
Patch1000: 1000-virt-Fix-the-detection-for-Hyper-V-VMs.patch
|
||||||
|
|
||||||
%ifarch %{ix86} x86_64 aarch64
|
%ifarch %{ix86} x86_64 aarch64
|
||||||
%global have_gnu_efi 1
|
%global have_gnu_efi 1
|
||||||
%endif
|
%endif
|
||||||
|
|
Loading…
Reference in New Issue