2 Commits

Author SHA1 Message Date
f9be7b0c10 Add new blog post
Some checks failed
Build release image / build (push) Failing after 1m3s
2025-05-21 11:43:49 +03:00
861bdcd686 Add deleted-post page
All checks were successful
Build release image / build (push) Successful in 1m28s
2025-05-21 10:41:18 +03:00
7 changed files with 139 additions and 20 deletions

View File

@ -0,0 +1,101 @@
---
slug: make-one-proxmox-node-to-wol-another
title: "Make one Proxmox node to wake-on-lan another"
tags: [self-hosting, homelab, Proxmox, WOL]
image: /img/homelab.png
---
Nothing is eternal, especially the relevance of documentation. I think help.ubuntu.com is an absolute winner, holding the largest number of outdated and irrelevant pages. But that's not a topic for today's post.
One of my Proxmox cluster nodes can't power itself on after the outage. But it supports wake-on-LAN, so I decided that another node could power it on. And the simplicity of this task was overrated by me.
<!-- truncate -->
:::warning
Wake on LAN doesn't work across VLANs. Magic packets could be sent and received only inside a single subnet.
:::
## The victim
First of all, even after enabling "Wake up on PCI event" or something in BIOS it was not working because WoL was still disabled on a software level. It can be checked with:
```bash
ethtool enp1s0
```
Where `enp1s0` is a physical network interface of a Proxmox node, not a bridge.
There should be `Wake-on:` setting among others. In my case it was `Wake-on: d`, which means that wake-on-LAN is disabled, according to `ethtool` documentation:
```
p Wake on phy activity
u Wake on unicast messages
m Wake on multicast messages
b Wake on broadcast messages
a Wake on ARP
g Wake on MagicPacket(tm)
s Enable SecureOn(tm) password for MagicPacket(tm)
d Disable (wake on nothing). This option clears all previous
options.
```
We need to set it to wake by the MagicPacket(tm). We need to create a config file for this to be enabled on system start. But first we need to:
```bash
ip link show enp1s0
```
and write down our network device MAC address. Then create a file:
```bash
nano /etc/systemd/network/90-wakeonlan.link
```
with the next content:
```
[Match]
MACAddress=<mac-address-here>
[Link]
NamePolicy=kernel database onboard slot path
MACAddressPolicy=persistent
WakeOnLan=magic
```
After that we need to reboot and check WOL status again:
```bash
ethtool enp1s0
```
Now `Wake-on` should be set to `g`.
## The one who bothering
On another node we need to install an util that will be sending a magic packet:
```bash
apt update
apt install etherwake
```
Now we can power the victim off and try to wake it with:
```bash
etherwake -i vmbr0 <mac_address>
```
Where `vmbr0` is a bridge network interface of current Proxmox node, and `<mac_address>` is a MAC address of the victim's physical network interface.
If it works, we can now add a cron job to wake our victim upon current node startup, adding some delay to make sure the network is ready:
```bash
crontab -e
```
Cron job line to add:
```
@reboot sleep 30s && /usr/sbin/etherwake -i vmbr0 <mac_address>
```

View File

@ -56,6 +56,9 @@ const config = {
showReadingTime: true,
feedOptions: {
type: ['rss', 'atom'],
title: "Yehor Vialov's Blog",
description: 'Some notes, interesting things and projects',
copyright: 'Copyright © ${new Date().getFullYear()} Yehor Vialov',
xslt: true,
},
blogSidebarTitle: 'Timeline',
@ -112,6 +115,14 @@ const config = {
label: 'Blog',
to: '/blog',
},
{
label: 'Blog RSS feed',
to: '/blog/rss.xml',
},
{
label: 'Blog Atom feed',
to: '/blog/atom.xml',
},
],
},
{

View File

@ -3,16 +3,6 @@ import Heading from '@theme/Heading';
import styles from './styles.module.css';
const FeatureList = [
{
title: 'HomeLab Documented',
link: 'docs/homelab',
Svg: require('@site/static/img/homelab.svg').default,
description: (
<>
Here I'm trying my best in documenting my home servers and services.
</>
),
},
{
title: 'Blog',
link: 'blog',
@ -23,7 +13,16 @@ const FeatureList = [
</>
),
},
{
title: 'HomeLab Documented',
link: 'docs/homelab',
Svg: require('@site/static/img/homelab.svg').default,
description: (
<>
Here I'm trying my best in documenting my home servers and services.
</>
),
},
];
function Feature({ Svg, title, link, description }) {

15
src/pages/deleted-post.md Normal file
View File

@ -0,0 +1,15 @@
---
title: This post was removed
description: A message about removed content
hide_table_of_contents: true
---
# You probably got here visiting a link somewhere on the internet
Sorry to say, but this post was removed because of one of the reasons (or because of all of them):
- It was critically outdated
- It was misleading
- It was stupid
- It has no historical value
You can check my [other blog posts](/blog) or start from the [home page](/).

View File

@ -13,9 +13,9 @@ function HomepageHeader() {
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
{siteConfig.title}
Yehor Vialov
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<p className="hero__subtitle">Public Profiles</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"

View File

@ -1,7 +0,0 @@
---
title: Markdown page example
---
# Markdown page example
You don't need React to write simple standalone pages.

BIN
static/img/homelab.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB