load balancer mark "unhealty" new group member instance (ubuntu) after dist-upgrade

Solution 1:

After testing, cloud-init is the root cause.

According to this comment, disable_network_activation: true should be set to avoid conflict with the google-guest-agent service.

The solution is adding the setting in cloud-init config.

cat > /etc/cloud/cloud.cfg.d/99-disable-network-activation.cfg <<EOF
# Disable network activation to prevent \`cloud-init\` from making network
# changes that conflict with \`google-guest-agent\`.
# See: https://github.com/canonical/cloud-init/pull/1048

disable_network_activation: true
EOF

This file exist in the official image ubuntu-1804-bionic-v20211103.

After adding this file, the google-guest-agent is running normally.