From 50f792f492f18744f6fcfb3871d77e05d1333bde Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Fri, 21 Mar 2025 13:47:01 +0100 Subject: [PATCH] Require Hyper-V to start waagent service WALinuxAgent is Azure specific and Azure runs on Hyper-V. Add ConditionVirtualization=microsoft to service files to avoid starting WALA in other environments. In particular, this avoids polluting the console when the same image is used both for Azure and some other env (e.g. local QEMU). Signed-off-by: Vitaly Kuznetsov --- init/arch/waagent.service | 1 + init/clearlinux/waagent.service | 1 + init/mariner/waagent.service | 1 + init/photonos/waagent.service | 1 + init/redhat/py2/waagent.service | 1 + init/redhat/waagent.service | 1 + init/sles/waagent.service | 1 + init/waagent.service | 1 + 8 files changed, 8 insertions(+) diff --git a/init/arch/waagent.service b/init/arch/waagent.service index d426eb219..b18a23dfa 100644 --- a/init/arch/waagent.service +++ b/init/arch/waagent.service @@ -5,6 +5,7 @@ After=network-online.target ConditionFileIsExecutable=/usr/bin/waagent ConditionPathExists=/etc/waagent.conf +ConditionVirtualization=microsoft [Service] Type=simple diff --git a/init/clearlinux/waagent.service b/init/clearlinux/waagent.service index 9afee4544..c62d8f4d6 100644 --- a/init/clearlinux/waagent.service +++ b/init/clearlinux/waagent.service @@ -5,6 +5,7 @@ After=network-online.target ConditionFileIsExecutable=/usr/bin/waagent ConditionPathExists=/usr/share/defaults/waagent/waagent.conf +ConditionVirtualization=microsoft [Service] Type=simple diff --git a/init/mariner/waagent.service b/init/mariner/waagent.service index 6d17facc3..2c8c95d30 100644 --- a/init/mariner/waagent.service +++ b/init/mariner/waagent.service @@ -5,6 +5,7 @@ After=systemd-networkd-wait-online.service cloud-init.service ConditionFileIsExecutable=/usr/bin/waagent ConditionPathExists=/etc/waagent.conf +ConditionVirtualization=microsoft [Service] Type=simple diff --git a/init/photonos/waagent.service b/init/photonos/waagent.service index be795278b..86846cbef 100644 --- a/init/photonos/waagent.service +++ b/init/photonos/waagent.service @@ -5,6 +5,7 @@ After=systemd-networkd-wait-online.service cloud-init.service ConditionFileIsExecutable=/usr/bin/waagent ConditionPathExists=/etc/waagent.conf +ConditionVirtualization=microsoft [Service] Type=simple diff --git a/init/redhat/py2/waagent.service b/init/redhat/py2/waagent.service index 920e0ec73..fa23eb3b4 100644 --- a/init/redhat/py2/waagent.service +++ b/init/redhat/py2/waagent.service @@ -5,6 +5,7 @@ After=network-online.target ConditionFileIsExecutable=/usr/sbin/waagent ConditionPathExists=/etc/waagent.conf +ConditionVirtualization=microsoft [Service] Type=simple diff --git a/init/redhat/waagent.service b/init/redhat/waagent.service index 2c6ac5d82..809042b86 100644 --- a/init/redhat/waagent.service +++ b/init/redhat/waagent.service @@ -5,6 +5,7 @@ After=network-online.target ConditionFileIsExecutable=/usr/sbin/waagent ConditionPathExists=/etc/waagent.conf +ConditionVirtualization=microsoft [Service] Type=simple diff --git a/init/sles/waagent.service b/init/sles/waagent.service index 39d01d1c4..ccb2a1650 100644 --- a/init/sles/waagent.service +++ b/init/sles/waagent.service @@ -5,6 +5,7 @@ After=network-online.target ConditionFileIsExecutable=/usr/sbin/waagent ConditionPathExists=/etc/waagent.conf +ConditionVirtualization=microsoft [Service] Type=simple diff --git a/init/waagent.service b/init/waagent.service index e91f1433b..c53ca3b7e 100644 --- a/init/waagent.service +++ b/init/waagent.service @@ -5,6 +5,7 @@ After=network-online.target ConditionFileIsExecutable=/usr/sbin/waagent ConditionPathExists=/etc/waagent.conf +ConditionVirtualization=microsoft [Service] Type=simple