How to run commands in a qube with a GUI failure?

Quite frustrating that qubes-core-agent-passwordless-root needs to be installed in the template too. Any ideas how to else run commands to install this package and reconfiguring pam in order to recover that VM?
My attempt to qvm-run -u user --pass.io my-qube 'ls' > t.txt results in no output at all, even though the qube is still functional.

Have you posted this in the right thread?

What issue are you trying to resolve?

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

Have you posted this in the right thread?

Didn’t wanted to create a new thread because I thing the issue is too similar. Correct me if I am wrong please.

The question is how to access a broken qube in order to fix them. As the OP posted, seemingly one needs qubes-core-agent-passwordless-root installed in order to use qvm-console-dispvm.

The issue is me trying to install qubes-core-agent-passwordless-root to then use qvm-console. But how do I run commands inside the qube then? qvm-run doesn’t work either.

You can use qvm-console-dispvm just like qvm-run, what’s the issue with that?

Edit: you need to install qubes-core-agent-passwordless-root in the management qube template, not the managed qube.

You need qubes-core-agent-passwordless-root installed and usable in the
management qube, (and therefore installed in the template it uses).

If you have a broken qube - ie it doesnt respond to anything, GUI use or
qvm-run, the approach to take depends on what you have done to that
qube.
You can always attach the drives to another qube, and back up any data
there. (This is documented.) Then create a new qube from the same
template and copy the data across.

What is the issue?
What did you do prior to the qube becoming unresponsive?
Did you make any configuration changes to the qube?
When is your last backup?
Is anything shown in logs in dom0 including logs in /var/log/qubes/?

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

Seemingly I’m really bad at communicating my problems. I try will try to speak in screenshots.

You can use qvm-console-dispvm just like qvm-run, what’s the issue with that?

  1. I know that qubes-core-agent-passwordless-root is necessary, it is installed in the template of default-mgmt, but not in the qube, which is a standalonevm.

ie it doesnt respond to anything, GUI use or qvm-run

  1. So qvm-console-dispvm is not an option yet but those work with every other qube, I need to install qubes-core-agent-passwordless-root first. As I don’t have access to the qubes gui, I tried qvm-run. But nothing happens.


Independent of the usage with/out --pass-io, the command, outputting.

  1. The log of the qubes doesn’t register any command. (/var/log/xen/console/*)

Is anything shown in logs in dom0 including logs in /var/log/qubes/?

That the GUI Agent fails.

  1. So might the Qube be just totally broken? Unlikely, logs don’t suggest so and there is:

What is the issue?

My nvidia driver seems to be broken, which is why I don’t have any GUI. De/Attaching the GPU changes nothing. This would be a problem I could fix on by own, but I can’t run commands. See 2.
What I am asking is a way to run commands if qvm-run fails, to then install qubes-passwordless-root-access.

You can always attach the drives to another qube, and back up any data
there. (This is documented.)

  1. Yes, but more annoying with a standalone.

When is your last backup?

Not recently enough.

If you want to increase your chances of getting an answer from at least one of our helpful members, avoid screenshots without a text alternative. Here, copy-pasting from dom0 is better than an image.

I still don’t get why you can’t use a management console. Could you try to run qvm-run with --no-gui?

What is the output of qvm-console-dispvm?

Feel hugged, thank you! --no-gui does it!

If you want to increase your chances of getting an answer from at least one of our helpful members, avoid screenshots without a text alternative. Here, copy-pasting from dom0 is better than an image.

will remember!

What is the output of qvm-console-dispvm?

That I need to login, but that is not possible without qubes-core-agent-passwordless-root.

With --no-gui I can fix it on my own, thank you!

That’s the error message when you try to log as root? I never encountered that.