SimonF Posted March 9 Share Posted March 9 This was a function being developed for the next release but was decided best to be a plugin to start with to allow better interations for changes. Currently this is a beta release. the is an existing plugin called virtwold this expands on it to include dockers and LXC. I am in the process to complete changes to make it work fully under 6.12 but currently the search function and help text don't work or don't exist. Two pages are created, first is the settings. Within the settings you can specify which servers are enabled. The interface name needs to be a physical NIC. By default shutdown actions are disabled. The second page is in tools. It allows you to specify the actions allowed. To be able to start dockers you need to have a user defined mac address as one is not assigned until the docker starts and changes. Values for the enabled field are 5 Quote Link to comment
Wizard_ Posted March 10 Share Posted March 10 Will this plugin replace "Virtual Machine Wake On Lan" ? Which is quite old and lack necessary support. Quote Link to comment
SimonF Posted March 10 Author Share Posted March 10 2 hours ago, Wizard_ said: Will this plugin replace "Virtual Machine Wake On Lan" ? Which is quite old and lack necessary support. It should provide similar functions but I have not used this plugin so cannot say if it is like for like. Quote Link to comment
Mika Posted March 10 Share Posted March 10 OMG, thank you so much 😀 Yesterday i was looking for a solution to send a WOL signal to my VM via Home Assistant and didn't get it working with the previous plugins. Today i find yours and its working great, so cool 😁 Thank you, Michael Quote Link to comment
wuudogg Posted March 15 Share Posted March 15 Came here for this for VMs. Will knock about with it this weekend. Thanks. Quote Link to comment
alturismo Posted March 18 Share Posted March 18 question, is there any more logging possible ? i have enabled suspend, but actually the vm doesnt use suspend, wol triggered, wol arrived, no suspend triggered ... i assume as i use hibernate in the VM and disabled suspend (to ram) ... you only implemented suspend to ram i assume this is how i hibernate my VM as sample virsh dompmsuspend AlsPC --target disk" and i guess you prefered regular ... root@AlsServer:~# virsh dompmsuspend --help NAME dompmsuspend - suspend a domain gracefully using power management functions SYNOPSIS dompmsuspend <domain> <target> [--duration <number>] DESCRIPTION Suspends a running domain using guest OS's power management. (Note: This requires a guest agent configured and running in the guest OS). OPTIONS [--domain] <string> domain name, id or uuid [--target] <string> mem(Suspend-to-RAM), disk(Suspend-to-Disk), hybrid(Hybrid-Suspend) --duration <number> duration in seconds root@AlsServer:~# so i assume, yes, you trigger it, but as its disabled here (hibernate) it has no effect, correct ? Quote Link to comment
Wizard_ Posted March 18 Share Posted March 18 On 3/11/2024 at 2:28 AM, SimonF said: It should provide similar functions but I have not used this plugin so cannot say if it is like for like. That's good enough, thanks for your work! Quote Link to comment
SimonF Posted March 18 Author Share Posted March 18 10 hours ago, alturismo said: so i assume, yes, you trigger it, but as its disabled here (hibernate) it has no effect, correct ? Unraid uses the php api. I can look at managed save as a option which is hibernate to disk libvirt_domain_suspend libvirt_domain_suspend($res) [Since version 0.4.1(-1)] Function is used to suspend the domain identified by it's resource. @res [resource]:libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() Returns:: TRUE for success, FALSE on error libvirt_domain_managedsave libvirt_domain_managedsave($res) [Since version 0.4.1(-1)] Function is used to managed save the domain (domain was unloaded from memory and it state saved to disk) identified by it's resource. @res [resource]:libvirt domain resource, e.g. from libvirt_domain_lookup_by_*() Returns:: TRUE for success, FALSE on error 1 Quote Link to comment
Mika Posted March 21 Share Posted March 21 Hi, yesterday i tried to boot a VM with a WOL signal and Unraid got stuck and was very very slow. It wasn't possible to navigate through the GUI. Some VM's which were running at the moment were very slow also. I had to switch off the computer and to restart everything. I don't know if it happened because of this plugin. Can you help me? Thank you, Michael tower-diagnostics-20240321-0745.zip Quote Link to comment
Soulplayer Posted April 7 Share Posted April 7 On 3/10/2024 at 7:32 PM, Mika said: OMG, thank you so much 😀 Yesterday i was looking for a solution to send a WOL signal to my VM via Home Assistant and didn't get it working with the previous plugins. Today i find yours and its working great, so cool 😁 Thank you, Michael Could you share your settings? Mine doesn't work: switch: - platform: wake_on_lan mac: 52:xx:00:xx:2c:xx broadcast_address: 10.0.1.xx broadcast_port: 9 host: 10.0.1.xxx name: 2023-xxxx-gaming Quote Link to comment
SimonF Posted April 7 Author Share Posted April 7 2 hours ago, Soulplayer said: Could you share your settings? Mine doesn't work: switch: - platform: wake_on_lan mac: 52:xx:00:xx:2c:xx broadcast_address: 10.0.1.xx broadcast_port: 9 host: 10.0.1.xxx name: 2023-xxxx-gaming Hi I did a quick test on my test server. I dont use HA except for testing this is what i have added to my yaml. wake_on_lan: switch: - platform: wake_on_lan mac: 52:54:00:DA:18:68 name: Debian2LXC And button added to UI. Apr 7 09:56:16 computenode Unraidwold[26103]: 2024/04/07 09:56:16 Found 52:54:00:da:18:68 LXC DebianLXC2 My settings. 1 Quote Link to comment
SimonF Posted April 7 Author Share Posted April 7 On 3/21/2024 at 7:15 AM, Mika said: Hi, yesterday i tried to boot a VM with a WOL signal and Unraid got stuck and was very very slow. It wasn't possible to navigate through the GUI. Some VM's which were running at the moment were very slow also. I had to switch off the computer and to restart everything. I don't know if it happened because of this plugin. Can you help me? Thank you, Michael tower-diagnostics-20240321-0745.zip 200 kB · 1 download Sorry for the late reply just looked at the Diags but they seem to be after a reboot so cannot see any errors. Quote Link to comment
Mika Posted April 7 Share Posted April 7 First create a simple button. After that create an automation, that looks like this: alias: WOL_KinoVM description: "" trigger: - platform: state entity_id: - input_button.kinovm_boot condition: [] action: - service: wake_on_lan.send_magic_packet metadata: {} data: broadcast_port: 9 mac: 52:54:00:7v:2k:q7 mode: single after that you can add your button, which you have created in the first step, to your dashboard. Regarding my problem. No problem, it happend only once and never again 1 Quote Link to comment
alturismo Posted April 14 Share Posted April 14 On 3/18/2024 at 7:59 PM, SimonF said: Unraid uses the php api. I can look at managed save as a option which is hibernate to disk may i ask if you had a chance to look at it ? Quote Link to comment
SimonF Posted April 14 Author Share Posted April 14 1 hour ago, alturismo said: may i ask if you had a chance to look at it ? Sorry not as yet, but does not look like support via php api so may have to use virsh 1 Quote Link to comment
SimonF Posted April 16 Author Share Posted April 16 On 4/14/2024 at 6:37 PM, alturismo said: may i ask if you had a chance to look at it ? Give 2024.04.16 a try. Suspend command is the virsh option either suspend or dompmsuspend(Power Management) and mode of mem or disk. Quote Link to comment
alturismo Posted April 17 Share Posted April 17 8 hours ago, SimonF said: Give 2024.04.16 a try. Thanks, I ll report back when I'm back from the trade fair from Mailand. Quote Link to comment
alturismo Posted April 18 Share Posted April 18 On 4/16/2024 at 8:54 PM, SimonF said: Suspend command is the virsh option either suspend or dompmsuspend(Power Management) and mode of mem or disk. ok, tested here, no result at all on suspend, shutdown is working here the syslog, triggered at 7.38 suspend, only info is "found ..." at 7.41 its triggered with shutdown and working as expected" Apr 18 07:38:30 AlsServer Unraidwold[26302]: 2024/04/18 07:38:30 Found 52:54:00:1a:60:97 VM AlsPC ### this was with suspend, nothing else came into the syslog ... ### Apr 18 07:41:04 AlsServer Unraidwold[26302]: 2024/04/18 07:41:04 Found 52:54:00:1a:60:97 VM AlsPC Apr 18 07:41:15 AlsServer kernel: usb 1-12: reset full-speed USB device number 10 using xhci_hcd Apr 18 07:41:15 AlsServer kernel: input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.0/0003:046D:C52B.00BD/input/input304 Apr 18 07:41:15 AlsServer kernel: hid-generic 0003:046D:C52B.00BD: input,hidraw1: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-0000:00:14.0-12/input0 Apr 18 07:41:15 AlsServer kernel: input: Logitech USB Receiver Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1/0003:046D:C52B.00BE/input/input305 Apr 18 07:41:15 AlsServer kernel: input: Logitech USB Receiver Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1/0003:046D:C52B.00BE/input/input306 Apr 18 07:41:15 AlsServer kernel: input: Logitech USB Receiver System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1/0003:046D:C52B.00BE/input/input307 Apr 18 07:41:15 AlsServer kernel: hid-generic 0003:046D:C52B.00BE: input,hiddev96,hidraw2: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:14.0-12/input1 Apr 18 07:41:15 AlsServer kernel: hid-generic 0003:046D:C52B.00BF: hiddev97,hidraw3: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-12/input2 Apr 18 07:41:16 AlsServer usb_manager: Info: rc.usb_manager vm_action AlsPC stopped end - Apr 18 07:41:16 AlsServer usb_manager: Info: rc.usb_manager VM Shutdown 001/010 vm: AlsPC Apr 18 07:41:16 AlsServer kernel: vfio-pci 0000:05:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=none Apr 18 07:41:16 AlsServer kernel: nvidia 0000:05:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none Apr 18 07:41:41 AlsServer ool www[18465]: Successful logout user root from 192.168.1.130 Apr 18 07:41:49 AlsServer monitor_nchan: Stop running nchan processes Quote Link to comment
SimonF Posted April 18 Author Share Posted April 18 28 minutes ago, alturismo said: ok, tested here, no result at all on suspend, shutdown is working here the syslog, triggered at 7.38 suspend, only info is "found ..." at 7.41 its triggered with shutdown and working as expected" Apr 18 07:38:30 AlsServer Unraidwold[26302]: 2024/04/18 07:38:30 Found 52:54:00:1a:60:97 VM AlsPC ### this was with suspend, nothing else came into the syslog ... ### Apr 18 07:41:04 AlsServer Unraidwold[26302]: 2024/04/18 07:41:04 Found 52:54:00:1a:60:97 VM AlsPC Apr 18 07:41:15 AlsServer kernel: usb 1-12: reset full-speed USB device number 10 using xhci_hcd Apr 18 07:41:15 AlsServer kernel: input: Logitech USB Receiver as /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.0/0003:046D:C52B.00BD/input/input304 Apr 18 07:41:15 AlsServer kernel: hid-generic 0003:046D:C52B.00BD: input,hidraw1: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-0000:00:14.0-12/input0 Apr 18 07:41:15 AlsServer kernel: input: Logitech USB Receiver Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1/0003:046D:C52B.00BE/input/input305 Apr 18 07:41:15 AlsServer kernel: input: Logitech USB Receiver Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1/0003:046D:C52B.00BE/input/input306 Apr 18 07:41:15 AlsServer kernel: input: Logitech USB Receiver System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1/0003:046D:C52B.00BE/input/input307 Apr 18 07:41:15 AlsServer kernel: hid-generic 0003:046D:C52B.00BE: input,hiddev96,hidraw2: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:14.0-12/input1 Apr 18 07:41:15 AlsServer kernel: hid-generic 0003:046D:C52B.00BF: hiddev97,hidraw3: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-12/input2 Apr 18 07:41:16 AlsServer usb_manager: Info: rc.usb_manager vm_action AlsPC stopped end - Apr 18 07:41:16 AlsServer usb_manager: Info: rc.usb_manager VM Shutdown 001/010 vm: AlsPC Apr 18 07:41:16 AlsServer kernel: vfio-pci 0000:05:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=none Apr 18 07:41:16 AlsServer kernel: nvidia 0000:05:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none Apr 18 07:41:41 AlsServer ool www[18465]: Successful logout user root from 192.168.1.130 Apr 18 07:41:49 AlsServer monitor_nchan: Stop running nchan processes Did you change the option in settings to use Power Management Suspend? defaults to Pause. i.e. Suspend. You can use this run manually. arg is the MAC if power suspend is enabled you should get the message below. root@computenode:/tmp/lynis# /usr/local/emhttp/plugins/WOL4Services/include/WOLrun.php "XX:XX:XX:XX:XX:XX:XX" Found XX:XX:XX:XX:XX:XX:XX VM Debian Suspend disk Domain 'Debian' successfully suspended Quote Link to comment
alturismo Posted April 18 Share Posted April 18 1 hour ago, SimonF said: Did you change the option in settings to use Power Management Suspend? defaults to Pause. i.e. Suspend. which option do you mean ? i ll test it now manually Quote Link to comment
alturismo Posted April 18 Share Posted April 18 1 hour ago, SimonF said: You can use this run manually. arg is the MAC if power suspend is enabled you should get the message below. ok, current state on the VM Mashine is root@AlsServer:~# /usr/local/emhttp/plugins/WOL4Services/include/WOLrun.php "52:54:00:1a:60:97" Found 52:54:00:1a:60:97 VM AlsPC Suspend disk Domain 'AlsPC' successfully suspended root@AlsServer:~# so this worked out as it should now i try to send a wol ... i started the VM again, and send a wol request, my expectation, it should also suspend now, but after this log message ... nothing happens so, manually triggereing the php call works, but triggered by wol it doesnt Quote Link to comment
SimonF Posted April 18 Author Share Posted April 18 1 hour ago, alturismo said: ok, current state on the VM Mashine is root@AlsServer:~# /usr/local/emhttp/plugins/WOL4Services/include/WOLrun.php "52:54:00:1a:60:97" Found 52:54:00:1a:60:97 VM AlsPC Suspend disk Domain 'AlsPC' successfully suspended root@AlsServer:~# so this worked out as it should now i try to send a wol ... i started the VM again, and send a wol request, my expectation, it should also suspend now, but after this log message ... nothing happens so, manually triggereing the php call works, but triggered by wol it doesnt Have you tried disabling and then re enable service Quote Link to comment
alturismo Posted April 18 Share Posted April 18 18 minutes ago, SimonF said: Have you tried disabling and then re enable service of course Quote Link to comment
Recommended Posts
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.