/run/incus_agent/files/

Forgive my ignorance, I’m curious; could someone explain the role/usage of /run/incus_agent/files/ and templates? I’ve scanned the code and could guess but believe I’d embarrass myself.
Thank you.

Images can contain templates (see Image format - Incus documentation). This is most commonly used to generate a basic /etc/hostname and /etc/hosts containing the instance’s name.

On top of that, depending on the image it may be used to set up the initial network configuration or to seed cloud-init.

For containers, we can directly apply those to the filesystem from Incus.
For virtual-machines, we need our agent to do this when it starts up.

Thank you Stéphane! Really appreciated.