]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
detect-virt: fix Google Compute Engine support
authormille-feuille <gtpgx305@gmail.com>
Thu, 8 Feb 2024 14:47:24 +0000 (23:47 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 9 Feb 2024 03:12:33 +0000 (12:12 +0900)
Follow-up for 9b0688f491674b53ef7a52bdf561a430c53673d6

src/basic/virt.c

index 465f339c146801d7627d18f9ba95ad59e0552a86..375ef28216dc75d7f09024078654dde7094bf250 100644 (file)
@@ -455,7 +455,7 @@ Virtualization detect_vm(void) {
 
         /* We have to use the correct order here:
          *
-         * → First, try to detect Oracle Virtualbox, Amazon EC2 Nitro, and Parallels, even if they use KVM,
+         * → First, try to detect Oracle Virtualbox, Amazon EC2 Nitro, Parallels, and Google Compute Engine, even if they use KVM,
          *   as well as Xen even if it cloaks as Microsoft Hyper-V. Attempt to detect uml at this stage also
          *   since it runs as a user-process nested inside other VMs. Also check for Xen now, because Xen PV
          *   mode does not override CPUID when nested inside another hypervisor.
@@ -470,7 +470,8 @@ Virtualization detect_vm(void) {
                    VIRTUALIZATION_ORACLE,
                    VIRTUALIZATION_XEN,
                    VIRTUALIZATION_AMAZON,
-                   VIRTUALIZATION_PARALLELS)) {
+                   VIRTUALIZATION_PARALLELS,
+                   VIRTUALIZATION_GOOGLE)) {
                 v = dmi;
                 goto finish;
         }