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"
- Host: GitHub
- URL: https://github.com/mevdschee/wake-domain.sh
- Owner: mevdschee
- License: mit
- Created: 2022-01-04T23:14:01.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-25T14:28:53.000Z (about 2 years ago)
- Last Synced: 2024-10-05T21:41:51.974Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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