From ff47664d8c646ebae72c40145ee1fd8098185de6 Mon Sep 17 00:00:00 2001 From: Philip Roche Date: Tue, 30 Apr 2024 17:57:21 +0100 Subject: [PATCH] feat(Hyperv Desktop): Disable cloud-init for Hyperv Desktop images (LP: #2064280) For Ubuntu 24.04 and later cloud-init is included in desktop images. This is not applicable for Hyperv images so we can disable cloud-init. This leaves the cloud-init package installed but disabled so users can still use it if they want. This is a documented way to disable cloud-init. See https://cloudinit.readthedocs.io/en/latest/howto/disable_cloud_init.html --- live-build/ubuntu/hooks/040-hyperv-desktop-images.binary | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary index df111588..21794803 100644 --- a/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary +++ b/live-build/ubuntu/hooks/040-hyperv-desktop-images.binary @@ -39,6 +39,12 @@ trap cleanup_hyperv EXIT # Perform customisations +# For Ubuntu 24.04 and later cloud-init is included in desktop images. This is not applicable for Hyperv images so +# we can disable cloud-init. This leaves the cloud-init package installed but disabled so users can still +# use it if they want. +touch "${scratch_d}/etc/cloud/cloud-init.disabled" + + chroot "${scratch_d}" apt-get update -y chroot "${scratch_d}" apt-get -y install xrdp linux-azure linux-tools-azure linux-cloud-tools-azure polkitd-pkla oem-config-gtk ubiquity-frontend-gtk ubiquity-slideshow-ubuntu language-pack-en-base oem-config-slideshow-ubuntu