Tips & Tricks Blog
Notes, ideas and general comments on anything related to high-tech.

May 1, 2015

Sending WakeOnLan packet from VMWare ESXi

Filed under: ESXi

After a long unsuccessful search for something that would work for making available backup storage (WD Elements 4GB USB HDD) from my MS Windows desktop system to ESXi 6.0 server (as a datastore) ended up using old Dell laptop. It runs Linux, auto-mounts the USB HDD at the boot time and exports the mount point over NFS.

In order to avoid running it all the time, ESXi powers it up by sending wake-on-lan Ethernet packet and shuts down the laptop after backup is done. WD Elements powers on/off automatically when USB connection is up/down.
Attached is the ether-wake tool sources (with minor tweak for sendto() to work) and statically compiled binary runnable under ESXi.

The ESXi firewall has to be turned off for it to send the packet:

esxcli network firewall set --enabled false
./ether-wake 00:11:22:33:44:11
esxcli network firewall set --enabled true

ether-wake.c
ether-wake

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Security Code:



Home

OkOb.net Tips & Tricks Blog
Powered by WordPress