Shutdown-idle: different TIMEOUT_SECONDS for TVM and TBVM

I’d like to be able to set TIMEOUT_SECONDS = 15 * 60 for the template and TIMEOUT_SECONDS = 1 * 10 for the TBVMs.

Is it possible to set different shutdown idleness for the template and AppVMs based on it, and how?

Note: I renamed the title from : “Diferrent TIMEOUT_SECONDS for TVM and TBVM”

1 Like

As you already saw the timeout is in the python source idleness_monitor.py#L26, so if the file is the same for the template and the AppVM, then you know the answer…
I think you need to do some python code for reading the timeout from a setting file…

Much easier is to use bind-dirs
which is designed for exactly this purpose, having a system file in a
qube different from the template.
You will have a local copy of idleness_monitor.py in the qube which you can
customise with different time out.

Although bind-dirs is flagged for advanced users, it is actually very
easy to set up.

I never presume to speak for the Qubes team.
When I comment in the Forum or in the mailing lists I speak for myself.
1 Like

Thanks for the tip.

You are absolutely right. Simple line

binds+=( ‘/usr/lib/python3/dist-packages/qubesidle/idleness_monitor.py’ )

in /rw/config/qubes-bind-dirs.d/50_user.conf

was more than easy to set. And I guess flagged for advanced users was meant for thinking through and dealing with the possible outcomes of such an action, not with the action itself.

For example, most probably one wouldn’t want to set idleness for sys-usbs, or to set too short idle time for the templates not giving them enough time for the update to start while correspondent dvms are doing their job on preparing the update.

Best regards

1 Like