Edit file File name : ubuntu-advantage.service Content :# This service runs on GCP to enable auto-attaching to Ubuntu Advantage # services when an Ubuntu Pro license is added to a GCP machine. # It also serves as the retry service if an auto-attach fails and will # retry for up to one month after the failed attempt. # If you are uninterested in Ubuntu Pro services, then you can safely # stop and disable this service: # sudo systemctl stop ubuntu-advantage.service # sudo systemctl disable ubuntu-advantage.service [Unit] Description=Ubuntu Pro Background Auto Attach Documentation=man:ubuntu-advantage https://ubuntu.com/advantage After=network.target network-online.target systemd-networkd.service ua-auto-attach.service cloud-config.service ubuntu-advantage-cloud-id-shim.service # Only run if not already attached ConditionPathExists=!/var/lib/ubuntu-advantage/private/machine-token.json # This service has two modes: # 1. GCP detect pro mode - only on GCP # 2. auto-attach retry mode - only if ua-auto-attach.service fails # The following conditions correspond to those two modes. ConditionPathExists=|/run/cloud-init/cloud-id-gce ConditionPathExists=|/run/ubuntu-advantage/flags/auto-attach-failed [Service] Type=notify NotifyAccess=main ExecStart=/usr/bin/python3 /usr/lib/ubuntu-advantage/daemon.py WorkingDirectory=/var/lib/ubuntu-advantage/ [Install] WantedBy=multi-user.target Save