[root@ubuntu2004 ~]#virsh console Rocky-8-x86_64
Connected to domain Rocky-8-x86_64
Escape character is ^]
error: operation failed: Active console session exists for this domain
原因及解决办法:如果你之前连接过,没有退出,但是你与宿主机的ssh断了,就会出现这种问题,也就是你之前的连接控制台的连接还存在;
解决:
kill掉即可
kill -9 19621
登陆成功