Using Wake-on-LAN to power up a XenServer

XenServer Cluster using commodity hardware

I’m a big fan of what can achieved with commodity hardware for free or little cost using virtualization platforms such as XenServer. Sure, ‘real’ server hardware has benefits. It is optimized to excel in certain disciplines. But ordinary gray box PCs are immensely flexible and for a scientist like me who plays with hardware configurations all the time, they are great. (They also save you money if you have the space for non-rack hardware btw.)

One thing where ‘real’ server hardware shines is remote management. Ordinary PCs typically do not have that. But most of the time they have a feature called Wake-on-LAN. This allows powering them up by sending a specially crafted ‘magic’ packet over the Ethernet. Fortunately, XenServer has built-in support to send those packets within a pool of servers and the Windows GUI XenCenter makes using that feature very convenient.

  1. To enable Wake-on-LAN for a computer, you first have to enable the feature in the BIOS. It is usually hidden somewhere in the Power Management options. If there is no such option in the BIOS, you might still give it a try: A DELL Studio XPS workstation I tested did not have an option for Wake-on-LAN in the BIOS but supported being powered up like this nevertheless.
  2. In XenCenter, right-click the server’s name and select Properties. Then choose Wake-on-LAN (WoL) in the Power On tab.
  3. Make sure the server is up and running, navigate to its Console tab in XenCenter and log in. If eth0 is the interface using which the server is managed and connected to the pool, type in the following two commands:
    # /usr/sbin/ethtool -s eth0 wol g
    # echo "/usr/sbin/ethtool -s eth0 wol g" >> /etc/rc.d/rc.local
  4. Give it a try: Power down the computer through XenCenter, wait until its gone and then select Power On.

Screen Shot 2015-03-30 at 14.11.31

4 thoughts on “Using Wake-on-LAN to power up a XenServer

  1. Hi.

    Thanks for the article. I’ve been trying to get WoL to work on my homelab XenServer. All various aspects work fine but I cannot see the context menu that you describe in step four. When I right click on the XS host all I see is Connect and Forget. the “Power On” option in the Server menu is also greyed out.

    I have the latest version of XS and I am able to WoL with a third party tool so I know the BIOS and XS are configured, I just cannot see the option in XenCenter which is odd.

    Do you have any idea why this may be the case?

  2. Same question here. XS 6.5 there is a Power ON button in the server(right click)but its grayed out…no solution…

  3. Hi Vytas,

    Is the server part of a pool? Wake-on-LAN is apparently only supported in clusters by Citrix to power additional machines up. If you want to remotely start your single XenServer, you could look into generating Wake-on-Lan packets through other means: Some routers can do this with their stock firmware and on others like OpenWRT you can write a script to issue the Magic Packet on demand.
    How to do this with OpenWRT: http://wiki.openwrt.org/doc/uci/wol

    There are also apps available for Windows/Mac/iOS/Android. Just have a look in the respective app stores. These apps do however require your device to be within the same network as the server you’re trying to start.

    Does this help?

    Best regards from Berlin,
    Justus

  4. Hi All
    Not sure if this is all sorted now, but for anyone else who has this problem I thought I would add what I did as a solution.
    Follow steps 1 to 3 above (Thanks Justus)
    Then instead of the menu in step four I used Solarwinds.net Wake-On-LAN.
    This all worked fine for me.
    Thanks
    Gary
    GBMicros

Leave a Reply

Your email address will not be published.