我这里使用的是运行在Hyper-v第二代虚拟机里的LEDE17.01.7软路由,在LEDE上使用vlmcsd搭建KMS激活服务器。
首先下载vlmcsd for OpenWRT,下面链接是需要编译后才能使用的。
https://github.com/cokebar/openwrt-vlmcsd
我不懂怎么编译,所以直接下载已经编译好的ipk
https://github.com/cokebar/openwrt-vlmcsd/tree/gh-pages
这里包括很多编译好的ipk包,我使用vlmcsd_svn1112-1_x86_64.ipk
使用WinSCP登录上传至LEDE的目录 /tmp/
用PuTTy连接登录LEDE,安装vlmcsd_svn1112-1_x86_64.ipk
root@LEDE:~# opkg update
root@LEDE:~# cd /tmp
root@LEDE:/tmp# opkg install vlmcsd_svn1112-1_x86_64.ipk
### 安装成功 ###
Installing vlmcsd (svn1112-1) to root...
Configuring vlmcsd.
KMS Server has started.
修改配置文件
下面是原文教程
1、Add the following line at the end of /etc/dnsmasq.conf
:
srv-host=_vlmcs._tcp.lan,hostname.lan,1688,0,100
(replace “hostname.lan” with your actual host name, eg: openwrt.lan, or just replace it with your IP of LAN)
2、Restart dnsmasq:
/etc/init.d/dnsmasq restart
You can check if the dnsmasq setting works with the following cammand in Windows:
nslookup -type=srv _vlmcs._tcp.lan
The response should be your router’s IP.
3、/etc/init.d/vlmcsd enable && /etc/init.d/vlmcsd start && /etc/init.d/dnsmasq restart
我是在LEDE路由管理页面重启 dnsmasq 与 vlmcsd

打开电脑命令行CMD,输入命令 nslookup -type=srv _vlmcs._tcp.lan

配置成功。
那么我们就可以使用KMS命令激活Windows和Office了。已经测试了最新的Windows LTSC 2019 成功激活!