diff --git a/ubuntu/scripts/cloudimg/cleanup.sh b/ubuntu/scripts/cloudimg/cleanup.sh index 4c0247fd..4a3a2574 100644 --- a/ubuntu/scripts/cloudimg/cleanup.sh +++ b/ubuntu/scripts/cloudimg/cleanup.sh @@ -21,6 +21,10 @@ # cloud-init put networking in place on initial boot. Let's remove that, to # allow MAAS to configure the networking on deploy. rm /etc/netplan/50-cloud-init.yaml +: >| /etc/machine-id +rm -f /var/log/cloud-init*.log +rm -rf /var/lib/cloud/instances \ + /var/lib/cloud/instance # Everything in /run/packer_backup should be restored. find /run/packer_backup diff --git a/ubuntu/scripts/networking.sh b/ubuntu/scripts/networking.sh index 5a165467..180adb2c 100644 --- a/ubuntu/scripts/networking.sh +++ b/ubuntu/scripts/networking.sh @@ -31,6 +31,7 @@ rm -f /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg rm -f /etc/cloud/cloud.cfg.d/99-installer.cfg rm -f /etc/cloud/ds-identify.cfg rm -f /etc/netplan/00-installer-config.yaml +: >| /etc/machine-id rm -f /var/log/cloud-init*.log rm -rf /var/lib/cloud/instances \