If you look the MAAS source tree under etc/maas/templates/power/ether_wake.template you'll notice that it calls /usr/bin/wakeonlan or /usr/sbin/etherwake with no parameters except the MAC address. That leaves a few possibilities about why it isn't working:
- The MAC address is not stored within MAAS in a format that the tool recognizes. (it needs to be
:-separated, such as 00:01:02:03:04:05.)
- The tool is attempting to send packets out, but permission is denied by the operating system. (see this question, where someone suggests adding a line to /etc/sudoers.d)
- The tool is sending the packets out, but on a nonexistent or incorrect interface. (according to the manual page,
-i ifname is used to specify the interface, with the default being eth0)
All that said, it seems that using Wake on LAN is not a recommended way to run MAAS. Obviously it can be done, but since Wake on LAN does not support powering down machines or checking a machine's power status, it cannot be seamlessly integrated into a server management solution like MAAS.
Furthermore, it worries me when you say "connected to a router instead of a switch". If there is a layer 3 hop between the MAAS server and the machines you want to power on with Wake on LAN, chances are, it will not work. Wake on LAN generally requires the node to be on the same layer 2 segment. (on the same switch or VLAN.) In other words, you must be able to send broadcast Ethernet packets from the MAAS controller to the node you wish to power on.
A better bet would be to use an IP addressable power switch, or a machine that includes a dedicated management controller, such as IPMI or AMT.