[systemd-devel] systemd-nspawn/systemd.nspawn machinectl enable/start

Mantas Mikulėnas grawity at gmail.com
Mon Oct 2 09:00:29 UTC 2023


Each nspawn container that's managed via machinectl is run as an instance
of "systemd-nspawn at .service". Add a [Service] ExecStartPre= to the instance
you need, using `systemctl edit` or similar.

On Mon, Oct 2, 2023 at 1:37 AM Rob Ert <ertr3960 at gmail.com> wrote:

> Hello all,
>
> As I have not been able to find an answer to my question after consulting
> man pages and google, I am turning to this mailing list.
>
> I have a systemd-nspawn os container that I have set to automatically
> start with machinectl enable.
> I would like to automatically have a bcachefs snapshot created before the
> machine is started. As provisions for a hook to script something like this
> do not seem to be supported in systemd.nspawn,
> I would like to know what and where the best way and place to achieve this
> is?
>
> Please cc me.
>
> Many thanks,
> and all the best,
> Rob
>


-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20231002/f72ef59c/attachment.htm>


More information about the systemd-devel mailing list