Hi
Recently upgraded from 6.9.2 up to 6.10 stable, the process was quite smooth with only some small hiccups updating my Windows 11 to use the new TMP method.
There is how ever a change in the system through the upgrade that I am unable to rectify. Previously on unraid boot I had a script that modified the acpi_handler.sh to incorporate a script when the power button was pressed, this would determine the state of my Windows 11 VM and Start/Stop the VM if needed. Now it seems to be both performing the VM start as well as the default behaviour of system shutdown i.e. when the power button is pressed the VM will load for about 1 minute before the system force closes it and the array stops for a shutdown.
acpi_handler.sh update script run at array first start. (I have also tried just replacing the entire file instead of the line, no difference)
#!/bin/bash
sed -i 's|power) /sbin/init 0|power) . /boot/config/plugins/user.scripts/scripts/VMStartStop/script|g' /etc/acpi/acpi_handler.sh
modified acpi_handler.sh file after array start. (so we know its been modified correctly)
#!/bin/sh
# Default acpi script that takes an entry for all actions
IFS=${IFS}/
set $@
case "$1" in
button)
case "$2" in
power) . /boot/config/plugins/user.scripts/scripts/VMStartStop/script
;;
*) logger "ACPI action $2 is not defined"
;;
esac
;;
*)
# logger "ACPI group $1 / action $2 is not defined"
;;
esac
VM control script that is called from acpi_handler.sh.
#! /bin/bash
# if domain is running, shut down
if virsh list | grep "Windows 11 .*running" ; then
virsh shutdown "Windows 11"
# resume domain if it's paused
elif virsh list | grep "Windows 11 .*paused" ; then
virsh resume "Windows 10"
elif virsh list | grep "Windows 11 .*pmsuspended" ; then
virsh dompmwakeup "Windows 11"
# otherwise start domain
else
virsh start "Windows 11"
fi
With nothing changed from the original running scripts except updating the 6.10 I can only assume a critical change has occurred in the new kernel or system version.
Please don't recommend I use WOL as I already do, or a separate button or device. Been able to just press the power button and treat my server like a desktop is a very convenient feature for all that use the desktop.
Troy
Recommended Comments
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.