virt-manager console rejets password

Server with KVM, root ssh allowed an works ok.
I connect from a client with virt-manager, I connect to the server with qemu/kvm, ask for password, and I connect.
I create a VM, and it start it ok, then open the console and ask for password again, I give the password and it rejects it.
I try several time, no success.

The vm is running (with the installation), but I cannot connect to it


virsh # list
 Id   Name        State
---------------------------
 2    nextcloud   running

virsh #

Here, the first log is when I connect with virt-manager, and it works, and the second part is when it tries to open the console, ask again form the pass and fails

2021-05-01T00:48:29.505631+02:00 vm2 sshd[3660]: Accepted keyboard-interactive/pam for root from 192.168.2.2 port 51198 ssh2
2021-05-01T00:48:29.514711+02:00 vm2 systemd-logind[1324]: New session 19 of user root.
2021-05-01T00:48:29.515390+02:00 vm2 systemd[1]: Started Session 19 of user root.
2021-05-01T00:48:29.516328+02:00 vm2 sshd[3660]: pam_unix(sshd:session): session opened for user root by (uid=0)
2021-05-01T00:48:47.189906+02:00 vm2 sshd[3730]: Accepted keyboard-interactive/pam for root from 192.168.2.2 port 51200 ssh2
2021-05-01T00:48:47.199130+02:00 vm2 systemd-logind[1324]: New session 20 of user root.
2021-05-01T00:48:47.199839+02:00 vm2 systemd[1]: Started Session 20 of user root.
2021-05-01T00:48:47.200668+02:00 vm2 sshd[3730]: pam_unix(sshd:session): session opened for user root by (uid=0)
2021-05-01T00:48:53.694106+02:00 vm2 sshd[3760]: Accepted keyboard-interactive/pam for root from 192.168.2.2 port 51202 ssh2
2021-05-01T00:48:53.703482+02:00 vm2 systemd-logind[1324]: New session 21 of user root.
2021-05-01T00:48:53.704196+02:00 vm2 systemd[1]: Started Session 21 of user root.
2021-05-01T00:48:53.705036+02:00 vm2 sshd[3760]: pam_unix(sshd:session): session opened for user root by (uid=0)
2021-05-01T00:48:57.017593+02:00 vm2 sshd[3792]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.2.2  user=root
2021-05-01T00:48:58.915288+02:00 vm2 sshd[3760]: pam_systemd(sshd:session): Failed to release session: Interrupted system call
2021-05-01T00:48:58.916002+02:00 vm2 sshd[3760]: pam_unix(sshd:session): session closed for user root
2021-05-01T00:48:58.916426+02:00 vm2 sshd[3730]: pam_unix(sshd:session): session closed for user root
2021-05-01T00:48:58.921659+02:00 vm2 systemd-logind[1324]: Session 21 logged out. Waiting for processes to exit.
2021-05-01T00:48:58.923119+02:00 vm2 systemd-logind[1324]: Session 20 logged out. Waiting for processes to exit.
2021-05-01T00:48:58.924556+02:00 vm2 systemd-logind[1324]: Removed session 21.
2021-05-01T00:48:58.925741+02:00 vm2 systemd-logind[1324]: Removed session 20.
2021-05-01T00:48:59.129497+02:00 vm2 sshd[3790]: error: PAM: Authentication failure for root from 192.168.2.2
2021-05-01T00:48:59.130283+02:00 vm2 sshd[3790]: Connection closed by authenticating user root 192.168.2.2 port 51204 [preauth]

With Xen the same procedure worked.

I think I ran into this issue before, but I do not recall how it was resolved. Under the VM details, check the display and video settings. Display address should be localhost only, and you may need to change the video model to VGA. If that doesn’t work, try changing some different display/video settings to see if you can find something it won’t complain about.

I can’t access the VM details because it ask for the passwd and fails

This is the connection
https://susepaste.org/3517692

This passwd works
https://susepaste.org/83925153
https://susepaste.org/42663231
https://susepaste.org/95100789

But then, when connecting to the VM or trying to view the properties, it ask again for the passwd and it fails
https://susepaste.org/22485614

2021-05-01T10:24:56.833582+02:00 vm2 sshd[4943]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.2.2  user=root
2021-05-01T10:24:58.625446+02:00 vm2 sshd[4941]: error: PAM: Authentication failure for root from 192.168.2.2
2021-05-01T10:25:02.016751+02:00 vm2 sshd[4941]: Accepted keyboard-interactive/pam for root from 192.168.2.2 port 33672 ssh2
2021-05-01T10:25:02.026005+02:00 vm2 systemd-logind[1324]: New session 30 of user root.
2021-05-01T10:25:02.026771+02:00 vm2 systemd[1]: Started Session 30 of user root.
2021-05-01T10:25:02.027635+02:00 vm2 sshd[4941]: pam_unix(sshd:session): session opened for user root by (uid=0)
2021-05-01T10:25:03.883568+02:00 vm2 sshd[4974]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.2.2  user=root
2021-05-01T10:25:04.882651+02:00 vm2 sshd[4941]: pam_systemd(sshd:session): Failed to release session: Interrupted system call
2021-05-01T10:25:04.883105+02:00 vm2 sshd[4941]: pam_unix(sshd:session): session closed for user root
2021-05-01T10:25:04.887719+02:00 vm2 systemd-logind[1324]: Session 30 logged out. Waiting for processes to exit.
2021-05-01T10:25:04.889345+02:00 vm2 systemd-logind[1324]: Removed session 30.
2021-05-01T10:25:06.382854+02:00 vm2 sshd[4972]: error: PAM: Authentication failure for root from 192.168.2.2
2021-05-01T10:25:06.383843+02:00 vm2 sshd[4972]: Connection closed by authenticating user root 192.168.2.2 port 33680 [preauth]

The difference with the case when the auth works is this

2021-05-01T10:27:21.626054+02:00 vm2 sshd[4979]: Accepted keyboard-interactive/pam for root from 192.168.2.2 port 33700 ssh2
2021-05-01T10:27:21.631639+02:00 vm2 systemd-logind[1324]: New session 31 of user root.
2021-05-01T10:27:21.632406+02:00 vm2 systemd[1]: Started Session 31 of user root.
2021-05-01T10:27:21.633629+02:00 vm2 sshd[4979]: pam_unix(sshd:session): session opened for user root by (uid=0)

If I connect to the server using ssh -X, and then I start virt-manager in the server instead of in the client, and connect to the virtual machine through the virt-manager locally, then it works, so its clearly something about virt-manager remote connection.

https://susepaste.org/40041507

I see. I’m not sure why that would be happening. Are you using any other authentication management applications like LDAP or access control lists? Those might be throwing a wrench into this. If not, I’m afraid someone else will have to chime in with some input.

Cleaning up old Forum threads while I’ve been gone,

My SOP whenever I run into an internal inconsistency in an application (not specifically libvirt), I always do a system update followed by a force re-install

zypper up && zypper in -f *package *

In this case, I’d suspect the libvirt package should be re-installed, but more specifically a libvirt viewer package may need to be re-installed (or maybe both?).
Or, if this is a very new or experimental install, maybe updating and re-running the YaST virtualization installer might work.

TSU