You are not logged in.

#1 2021-09-30 08:51:28

tachtler
Member
Registered: 2020-08-23
Posts: 38

[Solved] KVM virsh shutdown problem on VM's with GDM and GNOME.

Hello all,

I have two KVM virtual machines
1. archlinux (without a DesktopManager or Desktop)
2. archlinux with GDM and GNOME 40

When I issue `virsh shutdown vm` as a command on the host system, the following happens:
1. archlinux (without a DesktopManager or Desktop) - **shuts down**.
2. archlinux with GDM and GNOME 40 - **it does not happen**, although the message `domain 'vm' is being shutdown` appears.

**Now the curious** --> When I am logged in as user or root on 2. archlinux with GDM and GNOME 40, the virtual machine shuts down, otherwise it does not.

EDIT: If I switch at 2. archlinux with GDM and GNOME 40 via Crtl+Alt+F2 to a tty2 `virsh shutdown vm` works as expected!

EDIT:  it sounds a bit strange now, but last week I built a virtual machine and with this one it still worked.

But I observed the following phenomenon.

On the virtual machine: 2nd Archlinux with GDM and GNOME 40, which shows the GDM on `tty1`, and I here the command on the host:

     `# virsh shutdown vm
          Domain 'vm' is being shutdown`

the following is written in the **journal** of the vm

     Sep 30 17:17:41 vml010 systemd-logind[1763]: Power key pressed.`

but nothing happens.

Do I do this on the same machine and, **I have the `tty2` open,** the virtual machine restarts?

I am open for any hint or tip, thanks in advance!
Klaus.

Last edited by tachtler (2021-09-30 17:39:51)

Offline

#2 2021-09-30 17:39:06

tachtler
Member
Registered: 2020-08-23
Posts: 38

Re: [Solved] KVM virsh shutdown problem on VM's with GDM and GNOME.

Hello all,

I found the problem by the following query: `systemd-inhibit --list --mode block`.

The solution for my described problem is in the folder: `/usr/share/polkit-1/actions`
simply rename the configuration file:

`mv /usr/share/polkit-1/actions/org.freedesktop.login1.policy /usr/share/polkit-1/actions/org.freedesktop.login1.policy.orig`

A subsequent reboot and I was able to shutdown the virtual machine via `virsh shutdown vm`.

Possibly a more detailed analysis of which contents are responsible for this can still be done.

Greetings
Klaus.

Offline

Board footer

Powered by FluxBB