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

2023-10-02 Thread Mantas Mikulėnas
Each nspawn container that's managed via machinectl is run as an instance
of "systemd-nspawn@.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  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


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

2023-10-01 Thread Rob Ert
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