PVE 配置 WOL 网络唤醒
WOL 网络唤醒
- 安装 ethtool 工具
sh
apt install ethtool
查看网卡名称
ip a
查看网卡信息
sh
ethtool eth0
- 观察
Supports Wake-on
与Wake-on
TIP
supports wake-on
判断该网卡是否支持 WOL 唤醒,若值为 pumbg 则表示支持 WOL
Wake-on
值为 d 则表示 WOL 禁用状态,g 则为开启,PVE 默认为 d
sh
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
master-slave cfg: preferred slave
master-slave status: slave
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x0000003f (63)
drv probe link timer ifdown ifup
Link detected: yes
- 开启 WOL 网络唤醒
sh
ethtool -s eth0 wol g
开机运行
由于每次开机时,Wake-on
的值都会重置为 d,因此需要在开机时自动运行开启 WOL 的命令
- 编辑
/etc/rc.local
文件
sh
#!/bin/bash
ethtool -s eth0 wol g
exit 0
- 赋予运行权限
sh
chmod +x /etc/rc.local
- 重启并按上一步骤查看
Wake-on
是否自动在开机时自动修改为 g 即可
预览: