Set a Qube to shutdown when its last AppVM closes.

30 views
Skip to first unread message

Logan

unread,
May 9, 2020, 7:05:54 AM5/9/20
to qubes-users
Is there a way to configure Qubes so that when I close the last AppvM
belonging to a TemplateBasedVM/Domain it auto shuts down?

I have been dreaming of this for some time but haven't been able to find
a solution.

Logan

publickey - logan@threatmodel.io.asc.pgp
signature.asc

Frédéric Pierret

unread,
May 9, 2020, 8:09:56 AM5/9/20
to Logan, qubes-users


On 2020-05-09 13:05, Logan wrote:
> Is there a way to configure Qubes so that when I close the last AppvM belonging to a TemplateBasedVM/Domain it auto shuts down?

By auto shuts down you mean poweroff your computer?

I think it's pretty easy to do it by writing your own Qubes core-admin addon extension. I would write function catching domain shutdown and looking if it remains running VM else poweroff.

Here are examples of core-admin addon extension: https://github.com/QubesOS/qubes-core-admin-addon-whonix https://github.com/QubesOS-contrib/qubes-core-admin-addon-bridge-device

> I have been dreaming of this for some time but haven't been able to find a solution.
>
> Logan
>

Frédéric

signature.asc

Logan

unread,
May 9, 2020, 8:12:21 AM5/9/20
to qubes-users
Just shutdown a qube. Not my PC
publickey - logan@threatmodel.io.asc.pgp
signature.asc

unman

unread,
May 9, 2020, 8:20:12 AM5/9/20
to qubes-users
On Sat, May 09, 2020 at 12:12:09PM +0000, Logan wrote:
> Just shutdown a qube. Not my PC
>
> > Fr??d??ric
> >


The convention here is not to top-post.
Please scroll to the bottom of the message before you start typing. Or
reply inline.
It only takes you seconds, makes it much easier to follow threads, and
cumulatively saves your fellow users hours.

I'm not clear on what you want to do - do you mean shutdown a qube when
the last *window* is closed? You can use `qubes-app-shutdown-idle` for
that.

unman

Mike Keehan

unread,
May 9, 2020, 8:44:17 AM5/9/20
to qubes...@googlegroups.com
What is that? dnf list doesn't show it, and neither does qvm-prefs.

unman

unread,
May 9, 2020, 10:17:48 AM5/9/20
to qubes...@googlegroups.com
In Fedora, it's qubes-idle.
1. In a fedora-31 template type "sudo dnf install qubes-idle"
1b. In a Debian template type "sudo apt install qubes-app-shutdown-idle"
2. Create a Template based qube called "shutdown"
3. Shutdown's "Qubes Setting" -> Services -> Type "shutdown-idle" in the bar and click on +
4. Open a terminal in the qube called 'shutdown' and close it.
6. After 15 minutes (without any windows open) the qubes 'shutdown' should automatically shutdown :-)


You can check the service is running by :
`ps aux | grep qubes-idle-watcher`

The timeout is set at default 15 mins in:
/usr/lib/python3/dist-packages/qubesidle/idleness_monitor.py
You can change the default as you wish - you'll need bind-dirs to alter
this on a per qube basis

unman

Mike Keehan

unread,
May 9, 2020, 10:46:32 AM5/9/20
to qubes...@googlegroups.com
Thanks unman!
Reply all
Reply to author
Forward
0 new messages