Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Wake on Lan for Virtual Machines for 6.1+

Featured Replies

I had the same issue and solved it that way:

 

1. Uninstall Python2 from the Nerd Pack Plugin

2. cli into your unraid

3. Download Python2 for Slackware: wget https://slackware.uk/slackware/slackware64-14.2/slackware64/d/python-2.7.11-x86_64-2.txz

4. Install Python2: upgradepkg --install-new python-2.7.11-x86_64-2.txz

 

For the last step I went to Settings, VM Manager, Advanced View enabled, Libvirt wake on lan disable, then enable again.

 

Status: Running :)

  • Replies 130
  • Views 65.4k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I had the same issue and solved it that way:   1. Uninstall Python2 from the Nerd Pack Plugin 2. cli into your unraid 3. Download Python2 for Slackware: wget https://slackware.uk/s

  • Hello @dmacias   How are you? Hope you are doing well.   I started having issues with WOL plugin recently - it just won't start. I tried enabling/disabling from the VM Manager sett

  • @dlandon has created a Python 2 plugin, so WOL is now no longer being deprecated

Posted Images

  • Author
I had the same issue and solved it that way:
 
1. Uninstall Python2 from the Nerd Pack Plugin
2. cli into your unraid
3. Download Python2 for Slackware: wget https://slackware.uk/slackware/slackware64-14.2/slackware64/d/python-2.7.11-x86_64-2.txz
4. Install Python2: upgradepkg --install-new python-2.7.11-x86_64-2.txz
 
For the last step I went to Settings, VM Manager, Advanced View enabled, Libvirt wake on lan disable, then enable again.
 
Status: Running :)
Thanks I reverted the Nerdpack python 2

Sent from my SM-N970U using Tapatalk

On 8/31/2021 at 2:43 PM, dmacias said:

Thanks I reverted the Nerdpack python 2

Sent from my SM-N970U using Tapatalk
 

Thank you, it works ok again!

  • 1 month later...

Hi,

 

Apologies if this might be a dumb question, but, does this plugin also work with an ethernet card passed through, with no MAC address defined in the XML file ?

 

Captura de ecrã 2021-10-30, às 18.26.08.png

 

Installed as per instructions, but /var/log/libvirt/libvirtwakeonlan.log keeps telling me: "2021-10-30 17:27:08|INFO|Didn't find a VM with MAC address b4:2e:99:30:81:fc"...

 

I've got a MacOS Monterey VM machine, configured with IntelMausi.kext with -mausiwol boot argument on OpenCore.

 

I'm sending the WOL "magic" packet via my MacBooPro, with shell command: wakeonlan  B4:2E:99:30:81:FC   

(the wakeonlan shell command was installed via "brew install wakeonlan"and I'm able to remote WOL a real laptop, with same command using its own MAC )

Edited by augustopaulo

  • 4 weeks later...

Thanks for this missing piece of software! 

I read the entire thread; I have only installed python2-2.7.18-x86_64-4.txz, have setup the default bridge (br1.30) in vm-manager and your pkg shows "running" - but nothing.

The machine in case is a win10-vm which had it enabled as baremetal; as vm now there's no wol-option in the adapter-configuration within windows itself, and accessing the BIOS doesn't give me a wol-option, neither machine-type i440fx-4.2 nor q35-4.2.

I'm trying to wake the machines up from the fw/pfsense directly, no dice.

 

How could I troubleshoot furhter? Does the default vm-bridge have to be on the vlan where the vms sit i.e. br1.3 or on the general interface br1?

Thanks for your time!

  • 4 months later...

is there a settings menu / how do i use this software?

38 minutes ago, Linguafoeda said:

is there a settings menu / how do i use this software?

Go into Settings - VM Manager and enable advanced view. You should find Libvirt wake on lan. Other than on / off there are no settings. When running, VMs will wake up on magic packet.

Edited by 3dee

2 minutes ago, 3dee said:

Go into Settings - VM Manager and enable advanced view. You should find Libvirt wake on lan. Other than on / off there are no settings. When running, VMs will wake up on magic packet.

 

perfect - thank you!

  • 4 months later...

PSA:

 

This plugin is currently being marked as deprecated for 6.11.0.  This is because @dmacias does not appear to be active and/or maintaining the plugin anymore, and this plugin has a dependency upon Python 2 being installed from NerdPack (which will be marked as being incompatible).

 

If you've come to rely upon this plugin, then you do not have to uninstall it, but you will be doing your own package management in installing (and maintaining) Python 2 https://forums.unraid.net/topic/42320-wake-on-lan-for-virtual-machines-for-61/?do=findComment&comment=1029485

 

 

Note that if some other author decides to fork this plugin (or create an auxiliary plugin to install Python 2) then this deprecation will be reversed if/when I am notified. 

  • 4 months later...

Can't make this plugin working for Guacamole :(

VM's not starting from any state, tried python from app store, from nerd tool, even suggestion from the post. No lack

Maybe anyone can help with?

Edited by J05u

  • 1 month later...
On 10/30/2021 at 7:30 PM, augustopaulo said:

Hi,

 

Apologies if this might be a dumb question, but, does this plugin also work with an ethernet card passed through, with no MAC address defined in the XML file ?

 

Captura de ecrã 2021-10-30, às 18.26.08.png

 

 

Well it has been a while and you surely have moved on, but I had the same problem. This plugin won't work because the original developer of libvirtwol used a method to identify the vm to wake up by parsing the XML files of all the vm.

Of course a passed through NIC is just another device and not identified as a NIC with a MAC address in the XML file.

 

I considered modifying libvirtwol to make direct API call to libvirt wihtout using the XML parsing method but I know enough of dumb scripting and google to patch up something from different sources.

 

This script will listen to magic packet on the host, when receiving a magic packet to a known MAC adress it will start a virsh command to resume the VM depending of its state.

 

#!/bin/bash

# listen to udp port 9 for packets & check if it is a magic packet

while true
do
        nc-openbsd -dnlu -p 9 | stdbuf -o0 xxd -c 6 -p -l 12 | stdbuf -o0 grep -v 'ffffffffffff' | while read
        do
                mac="${REPLY:0:2}:${REPLY:2:2}:${REPLY:4:2}:${REPLY:6:2}:${REPLY:8:2}:${REPLY:10:2}"
                echo "Got triggered with MAC address $mac"

                # compare the MAC address with the magic packet
                if [ "$mac" == "<fill in with the vm mac address>" ] 
                then
                        state=$(virsh list --all|awk -v vm="vm name" '{ if ($2 == vm ) print $3 }')
                        echo "$vm in $state state"

                        # dependent of the state, resume, start or nothing
                        [ $state == "paused" ] && virsh -q resume $vm && virsh domtime --domain $vm --now
                        [ $state == "shut" ] && virsh -q start $vm
                        [ $state == "pmsuspended" ] && virsh dompmwakeup $vm
                        [ $state == "running" ] && echo Nothing to do $vm is already running
                fi
        done
done

 

You just have to replace in the mac address you want to wake up, and the "vm name".

Then configure it with the user script plugin to launch with unraid.

 

The script rely on nc-openbsd, so it has to be installed somehow on unraid.

  • 1 month later...

Thank you for the script. I tried to implement it on my server but to no success. I tried to install nc-openbsd via Slackware but sadly still get an error: 

nc-openbsd: error while loading shared libraries: libbsd.so.0: cannot open shared object file: No such file or directory

stdbuf: failed to run command 'xxd': No such file or directory.

 

Do you have a working way to install nc-openbsd as it is currently not available via Nerd Tools?

32 minutes ago, Drycane said:

Do you have a working way to install nc-openbsd as it is currently not available via Nerd Tools?

 

I used un-get : https://github.com/ich777/un-get

26 minutes ago, hot22shot said:

 

I used un-get : https://github.com/ich777/un-get

Thank you for the quick response. I removed the manually installed package and installed via un-get. (It was the same package anyways) 

"Currently installed package(s) by un-get:

netcat-openbsd-1.219-x86_64-1cf.txz"

 

Still get the same error:

nc-openbsd: error while loading shared libraries: libbsd.so.0: cannot open shared object file: No such file or directory.

 

I tried rebooting and reinstalling but still no luck. You have any other idea?

12 minutes ago, Drycane said:

Thank you for the quick response. I removed the manually installed package and installed via un-get. (It was the same package anyways) 

"Currently installed package(s) by un-get:

netcat-openbsd-1.219-x86_64-1cf.txz"

 

Still get the same error:

nc-openbsd: error while loading shared libraries: libbsd.so.0: cannot open shared object file: No such file or directory.

 

I tried rebooting and reinstalling but still no luck. You have any other idea?

 

My server is offline so I can't test but did you tried to install libbsd with un-get ?

It's always the obvious things. Thank you so much. I got it to work. Sadly it didn't work with the variable but after editing the startup script by adding sudo and the VM Name it now works with Guacamole. Thank you for your assistance!

On 1/14/2023 at 10:47 AM, J05u said:

Can't make this plugin working for Guacamole :(

VM's not starting from any state, tried python from app store, from nerd tool, even suggestion from the post. No lack

Maybe anyone can help with?

Hello!
did you manage to get this working with Guacamole?

Having the exact same issue

  • 1 month later...
On 1/14/2023 at 4:47 AM, J05u said:

Can't make this plugin working for Guacamole :(

VM's not starting from any state, tried python from app store, from nerd tool, even suggestion from the post. No lack

Maybe anyone can help with?

 

I, also, am having trouble getting guac to start a VM with WOL.

I'm following @SpaceInvaderOne's guide on youtube and my VM won't start.

 

Edited by jbuszkie

I'm having the same problem. It does not work anymore when updating to the latest version of Unraid :(

  • 3 months later...

also having troubles to get WoL to work for VM w/ unraid 6.12.4. Anyone still able to make it work? Thanks so much!

I tried this plugin and it kinda worked.

 

I don't want to hi-jack this, but I needed to be able to wake from sleeping and hibernating states.  As such, I made this:

https://github.com/mtongnz/unraidWOLcmd

 

It's a docker container to receive WOL packets.  You can configure any command to run on your unRaid server, including the vmControl script I wrote to start/stop VMs.

 

I'd be interested in some feedback.

 

Cheers

  • 2 weeks later...
On 10/13/2023 at 9:26 PM, mtongnz said:

I tried this plugin and it kinda worked.

 

I don't want to hi-jack this, but I needed to be able to wake from sleeping and hibernating states.  As such, I made this:

https://github.com/mtongnz/unraidWOLcmd

 

It's a docker container to receive WOL packets.  You can configure any command to run on your unRaid server, including the vmControl script I wrote to start/stop VMs.

 

I'd be interested in some feedback.

 

Cheers

Thx!! how did you get it to work? I couldn't wake up any VM from any state... Thanks so much!

15 hours ago, painted-champagne6111 said:

Thx!! how did you get it to work? I couldn't wake up any VM from any state... Thanks so much!

I'm assuming you've followed the instructions and have the FIFO, user script & docker container setup. I'm also assuming the container and user script are both running. I'm also assuming you've setup the docker config.yml with the default "echo test" from the GitHub repo.

 

Open the user script log and it should display a message when new WOL packets come in.

 

Send a WOL packet to your containers IP using the MAC specified in the config.yml for the echo test.  Broadcasting it might work but I specify the exact IP.

 

Did the user script log show anything?

If not, then something isn't setup correctly.

If it shows, then the WOL is working and it's something else.

10 hours ago, mtongnz said:

I'm assuming you've followed the instructions and have the FIFO, user script & docker container setup. I'm also assuming the container and user script are both running. I'm also assuming you've setup the docker config.yml with the default "echo test" from the GitHub repo.

 

Open the user script log and it should display a message when new WOL packets come in.

 

Send a WOL packet to your containers IP using the MAC specified in the config.yml for the echo test.  Broadcasting it might work but I specify the exact IP.

 

Did the user script log show anything?

If not, then something isn't setup correctly.

If it shows, then the WOL is working and it's something else.

I don't recall testing w/ the script. Definitely will look into it! Thanks so much!!

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.