An open API service indexing awesome lists of open source software.

https://github.com/mevdschee/wake-domain.sh

Starts a KVM domain on a failed connection attempt from "auth.log"
https://github.com/mevdschee/wake-domain.sh

Last synced: 7 months ago
JSON representation

Starts a KVM domain on a failed connection attempt from "auth.log"

Awesome Lists containing this project

README

          

# wake-domain.sh

Bash script to start a KVM domain on a failed connection attempt as reported by "auth.log":

Jan 1 23:46:09 bastion systemd-logind[1086]: New session 73 of user maurits.
Jan 1 23:46:12 bastion sshd[10206]: error: connect_to win10-vm1 port 3389: failed.
Jan 1 23:46:12 bastion sshd[10206]: channel_by_id: 0: bad id: channel free

This script will issue a "virsh start win10-vm1" command based on the "error: connect_to win10-vm1 port 3389: failed" message.

In case there is no /var/log/auth.log file then run:

apt-get install rsyslog

Related blog post: https://tqdev.com/2022-boot-rdp-connected-vm-on-demand