Installation of missing packages needs a lot of time (Ubuntu 24.04)

I deploy the official Ubuntu 24.04 image. It is ready in about 5 mins. But 3 mins of this 5 mins are needed for installing missing packages in empheral mode. How can I speed up this task? It would be nice if the VMs are ready in about 2 mins instead.
I don’t know which packages this are, I use maas-proxy already.
I thought about mounting the squid image file in chroot, install the packages there. But I don’t know which squid file is used and which packages are missing.

Hey there,

How are you measuring that it takes 3 minutes out of 5?

I found some entries in the log file…?

Can you upload them somewhere like pastebin.ubuntu.com or just pastebin?

https://pastebin.ubuntu.com/p/PT9kTJ96kB/

I was able to speed up by improving the proxy. But you can see the “installing missing packages” at 10:11:00 and this task needs a minute until it can “execute late commands”.
The whole process needs 3 mins now. 1/3 is only for the missing packages…

Curtin needs to download some packages if they are not already installed curtin/curtin/commands/curthooks.py at cc2b39b8ee390675a737774d5c3fd9371dda6c9d · canonical/curtin · GitHub .

MAAS does not allow you to use a custom image for provisioning, hence you can’t include these packages in the image upfront.
However, if you want to go into the wild and hack some stuff you can still build your ubuntu custom image, create a mirror of images.maas.io that serve that image and let your MAAS consume images from there. I never tried that, but by heart you might be able to use your custom image that way. Of course you are on your own as this is an hack :slight_smile: If you are willing to try please report back your experience so that other users might benefit from it

can you try using the candidate stream? I suspect the image in the stable stream is still the original 24.04, and not 24.04.1, so the ephemeral OS needs to upgrade a lot of packages.