Wake on Lan for Virtual Machines for 6.1+


dmacias

Recommended Posts

Hi,

I'm new at Unraid, installed it yesterday first time (Trial). The goal is to find a solution for VMs for WoL over Internet and I found it.

Installed your VM WoL and it works really nice. Can now start my Test VM with a command line tool from any place in the world, tried it from NZ, RU, Emitrates and a few other locations. Thats what i was looking for.

THX for this App.

Link to comment
  • 2 weeks later...

Hi, I tried this plugin where a Linux VM is suspended via the VM itself. Then tried waking it up using the WakeOnLAN Plugin - it worked!

 

However, I tried waking up the Linux VM from  another Linux Machine using etherwake command, but it failed. 

 

I get error:

SIOCGIFHWADDR on br0 failed: No such device

or

SIOCGIFHWADDR on eth0 failed: No such device

 

Any ideas?

 

UPDATE:

Did a wakeonlan command and it worked.

Edited by garydapogi
updated the post
Link to comment
  • 3 weeks later...

Hi everyone,

 

after enabling VLANs on the unraid machine and enabling trunk on the switchport, Wake on LAN for the VMs does not work anymore. The VMs still are on br0 and default / native VLAN ID is 1. WoL package both sent from Guacamole Docker but also sent from VLAN 1 network (192.168.1.0/24) do not wake any machine up..

 

Any ideas?

 

 

Switch configuration:

 

Spoiler

Layer3#sh runn
Building configuration...

Current configuration : 5726 bytes
!
! Last configuration change at 15:35:39 UTC Sat Jan 1 2000 by admin
! NVRAM config last updated at 15:35:57 UTC Sat Jan 1 2000 by admin
!
version 15.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname Layer3
!
boot-start-marker
boot-end-marker
!
enable secret 5 #######################
enable password 7 #######################
!
username admin password 7 #######################
no aaa new-model
system mtu routing 1500
ip routing
!
!
ip domain-name fritz.box
!
!
!
!
!
!
!
crypto pki trustpoint TP-self-signed-1733138816
 enrollment selfsigned
 subject-name cn=IOS-Self-Signed-Certificate-1733138816
 revocation-check none
 rsakeypair TP-self-signed-1733138816
!
!
crypto pki certificate chain TP-self-signed-1733138816
 certificate self-signed 01
  3082022B 30820194 A0030201 02020101 300D0609 2A864886 F70D0101 05050030
  31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274
  69666963 6174652D 31373333 31333838 3136301E 170D3030 30313031 30303038
  32385A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649
  4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D31 37333331
  33383831 3630819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281
  81008EFE A6B4AE24 2B4DE353 09341A30 9A8FC9F6 784F4681 001C1204 5AD17F07
  8A287C0E 1D4C7B1E 4F8BD451 DA06EE35 05C057C2 3C534187 33F9C45E 675C5B22
  2650CF8C 174A8F73 4E4DC337 F9268830 B16E3C15 FFB8D0C8 80016F73 0218D25A
  B339627E 5A414170 E77BB28D F29A53DF 443107D3 0896D04B 22C28897 C5855682
  3F8D0203 010001A3 53305130 0F060355 1D130101 FF040530 030101FF 301F0603
  551D2304 18301680 1442C5D8 A54AB7DA 1B9D2E10 68910F56 BD6BA69E FC301D06
  03551D0E 04160414 42C5D8A5 4AB7DA1B 9D2E1068 910F56BD 6BA69EFC 300D0609
  2A864886 F70D0101 05050003 81810029 6D55A857 4D3637D6 C6AD7EDA E8449203
  F73349DD AEF03904 B23A270C 48E34AE0 AD0F25A7 90F1B2F6 615E9B3A 9F312634
  9CC317F9 AC540112 97130D4A ACC9C229 2C00DE8C D55772BB 675519CF B1400E60
  2BD3A5AF D8DF8F78 938826ED 89DFA48A 772B9BAC 24F37F25 118E0240 23D9257F
  0BF84C4F 1CF5F019 DE30EF93 CA04E9
        quit
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
!
!
!
vlan internal allocation policy ascending
!
ip ssh version 2
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/1
 description Uplink FRITZ!Box
 switchport mode access
!
interface GigabitEthernet0/2
 description Uplink FRITZ!Gast
 switchport access vlan 2
 switchport mode access
!
interface GigabitEthernet0/3
 description Uplink Layer2
 switchport mode trunk
!
interface GigabitEthernet0/4
 description Uplink Layer2-2
 switchport mode trunk
!
interface GigabitEthernet0/5
 description Uplink Server
 switchport mode trunk
!
interface GigabitEthernet0/6
 description Uplink TP-Link Switch
 switchport mode access
!
interface GigabitEthernet0/7
!
interface GigabitEthernet0/8
!
interface GigabitEthernet0/9
 no keepalive
!
interface GigabitEthernet0/10
 no keepalive
!
interface GigabitEthernet0/11
!
interface GigabitEthernet0/12
 description VLAN3
 switchport access vlan 3
 switchport mode access
!
interface Vlan1
 description Native
 ip address 192.168.1.19 255.255.255.0
!
interface Vlan2
 description Guest
 no ip address
!
interface Vlan3
 description T0r
 no ip address
!
ip default-gateway 192.168.1.1
ip forward-protocol nd
ip http server
ip http secure-server
!
!
!
!
snmp-server community public RO
snmp-server community private RW
snmp-server location Abstellschrank
snmp-server enable traps snmp authentication linkdown linkup coldstart warmstart
snmp-server enable traps transceiver all
snmp-server enable traps call-home message-send-fail server-fail
snmp-server enable traps tty
snmp-server enable traps license
snmp-server enable traps auth-framework sec-violation
snmp-server enable traps cluster
snmp-server enable traps config-copy
snmp-server enable traps config
snmp-server enable traps config-ctid
snmp-server enable traps trustsec-sxp conn-srcaddr-err msg-parse-err conn-config-err binding-err conn-up conn-down binding-expn-fail oper-nodeid-change binding-conflict
snmp-server enable traps energywise
snmp-server enable traps fru-ctrl
snmp-server enable traps entity
snmp-server enable traps event-manager
snmp-server enable traps ike policy add
snmp-server enable traps ike policy delete
snmp-server enable traps ike tunnel start
snmp-server enable traps ike tunnel stop
snmp-server enable traps ipsec cryptomap add
snmp-server enable traps ipsec cryptomap delete
snmp-server enable traps ipsec cryptomap attach
snmp-server enable traps ipsec cryptomap detach
snmp-server enable traps ipsec tunnel start
snmp-server enable traps ipsec tunnel stop
snmp-server enable traps ipsec too-many-sas
snmp-server enable traps power-ethernet police
snmp-server enable traps cpu threshold
snmp-server enable traps bridge newroot topologychange
snmp-server enable traps stpx inconsistency root-inconsistency loop-inconsistency
snmp-server enable traps syslog
snmp-server enable traps vtp
snmp-server enable traps vlancreate
snmp-server enable traps vlandelete
snmp-server enable traps flash insertion removal
snmp-server enable traps port-security
snmp-server enable traps envmon fan shutdown supply temperature status
snmp-server enable traps stackwise
snmp-server enable traps bulkstat collection transfer
snmp-server enable traps errdisable
snmp-server enable traps mac-notification change move threshold
snmp-server enable traps vlan-membership
!
line con 0
 logging synchronous
 login local
line vty 0 4
 password 7 #######################
 login local
 transport input ssh
line vty 5 15
 password 7 #######################
 login local
 transport input ssh
!
!
end

 

 

 

unraid Network Settings:

 

Spoiler

Download.thumb.png.a3cd6c7e2681d769082b5d58869dd44e.png

 

 

VM XML:

Spoiler

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>##########</name>
  <uuid>73712027-ecca-9ec3-490a-ce837b564c47</uuid>
  <description>Windows 7 (32-Bit)</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 7" icon="windows7.png" os="windows7"/>
  </metadata>
  <memory unit='KiB'>3145728</memory>
  <currentMemory unit='KiB'>3145728</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-4.2'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='4' threads='1'/>
    <cache mode='passthrough'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Elsa-ETKA/Elsa-ETKA.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:5f:f2:81'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='de'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>
 

 

Edited by 3dee
added VM XML
Link to comment
  • 2 months later...

Hi guys,

I have a problem with the WOL Plugin.

It need's about 8 min to start when I boot my array. Unfortunately my unraid web log view is not working and I don't know how to provide useful Log Files to debug this behavior. 

Can someone help me there?

Best regards,

Stephan

Link to comment
  • 2 months later...

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 settings page, I tried re-installing the plugin as well as python2 in nerdpack, The daemon is not running. When trying to manually trigger start/stop scripts there are no errors thrown. When trying "python  /usr/local/emhttp/plugins/libvirtwol/scripts/libvirtwol.py br0" I am getting "GLIBC_2.33 not found, required by /usr/lib64/libpython2.7.so.1.0". I suspect an update for python in Nerdpack might have happened which triggered this (I should have probably followed the "don't touch it if aint broken" approach..., I might have accidently updated python but I can't remember if that is the case). Would you be able to advise me please?

 

Thank you.

 

 

  • Like 4
Link to comment
  • 2 weeks later...

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 :)

  • Like 1
  • Thanks 2
Link to comment
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

  • Thanks 1
Link to comment
  • 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
Link to comment
  • 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!

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.