Recognize OpenStack too (it also has a metadata service). Typical values for machdep.dmi are: machdep.dmi.system-vendor = OpenStack Foundation machdep.dmi.system-product = OpenStack Nova machdep.dmi.system-version = 17.0.12 machdep.dmi.system-serial = c46130fb-a56e-43f2-9d98-492d24656b9c machdep.dmi.system-uuid = 680b8119-0d74-4f78-a6fd-e79dfede905c machdep.dmi.bios-vendor = SeaBIOS machdep.dmi.bios-version = 1.10.2-1ubuntu1 machdep.dmi.bios-date = 20140401 machdep.dmi.chassis-vendor = QEMU machdep.dmi.chassis-type = QEMU machdep.dmi.chassis-version = pc-i440fx-2.8 machdep.dmi.processor-vendor = QEMU machdep.dmi.processor-version = pc-i440fx-2.8 machdep.dmi.processor-frequency = 2000 MHzdiff -r1.2 -r1.3 src/distrib/amd64/liveimage/emuimage/ec2_init
(rhialto)
--- src/distrib/amd64/liveimage/emuimage/Attic/ec2_init 2020/09/09 13:25:48 1.2
+++ src/distrib/amd64/liveimage/emuimage/Attic/ec2_init 2021/07/15 17:20:25 1.3
@@ -1,4 +1,4 @@
-# $NetBSD: ec2_init,v 1.2 2020/09/09 13:25:48 jmcneill Exp $
+# $NetBSD: ec2_init,v 1.3 2021/07/15 17:20:25 rhialto Exp $
is_ec2() {
val=NO
@@ -11,6 +11,10 @@
nodeval="$(/sbin/sysctl -n $node | tr '[A-Z]' '[a-z]')"
case "$nodeval" in
*amazon*)
+ val=YES
+ ;;
+ # OpenStack is not EC2 but it does have a metadata service.
+ *openstack*)
val=YES
;;
esac