]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machine-id-setup: bhyve also provides a uuid
authorDan McGregor <dan.mcgregor@usask.ca>
Thu, 27 Feb 2025 22:18:23 +0000 (16:18 -0600)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Feb 2025 04:15:35 +0000 (13:15 +0900)
When using UEFI with bhyve it behaves similarly to qemu, and provides
a product_uuid. Use it if found, just like with qemu.

src/shared/machine-id-setup.c

index d444ea06e902971abdc49673e14169154214bd74..979799f8252a60d0fe736bdcb6177f8813506345 100644 (file)
@@ -108,7 +108,7 @@ static int acquire_machine_id(const char *root, bool machine_id_from_firmware, s
                                 return 0;
                         }
 
-                } else if (IN_SET(detect_vm(), VIRTUALIZATION_KVM, VIRTUALIZATION_AMAZON, VIRTUALIZATION_QEMU, VIRTUALIZATION_XEN) || machine_id_from_firmware) {
+                } else if (IN_SET(detect_vm(), VIRTUALIZATION_KVM, VIRTUALIZATION_AMAZON, VIRTUALIZATION_QEMU, VIRTUALIZATION_XEN, VIRTUALIZATION_BHYVE) || machine_id_from_firmware) {
 
                         /* If we are not running in a container, see if we are running in a VM that provides
                          * a system UUID via the SMBIOS/DMI interfaces.  Such environments include QEMU/KVM