惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
WordPress大学
WordPress大学
Vercel News
Vercel News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
小众软件
小众软件
L
LangChain Blog
雷峰网
雷峰网
D
DataBreaches.Net
博客园 - 三生石上(FineUI控件)
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tor Project blog
NISL@THU
NISL@THU
Scott Helme
Scott Helme
量子位
S
Security Affairs
T
Threat Research - Cisco Blogs
博客园_首页
云风的 BLOG
云风的 BLOG
D
Docker
AWS News Blog
AWS News Blog
腾讯CDC
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
U
Unit 42
Recent Announcements
Recent Announcements
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
T
The Exploit Database - CXSecurity.com
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 热门话题
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Last Watchdog
The Last Watchdog
C
Cybersecurity and Infrastructure Security Agency CISA
IT之家
IT之家
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
F
Full Disclosure
L
Lohrmann on Cybersecurity
The Hacker News
The Hacker News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Y
Y Combinator Blog
S
Security @ Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Check Point Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
I
InfoQ

puzzle9 blog

webdav - puzzle9 blog parser video tencent - puzzle9 blog wstunnel - puzzle9 blog rclone - puzzle9 blog nfs - puzzle9 blog caddy - puzzle9 blog webhookd 发布 - puzzle9 blog win 系统部署 by WinRM - puzzle9 blog hl7 初探 - puzzle9 blog realm 端口转发 - puzzle9 blog airflow - puzzle9 blog mysql 迁移到 mssql - puzzle9 blog 租房啊 - puzzle9 blog cr660x 路由器研究 - puzzle9 blog hs8145v 光猫研究 - puzzle9 blog dae 跨墙 - puzzle9 blog ZeroTier 打洞 🕊 - puzzle9 blog rathole 穿透 - puzzle9 blog WireGuard 组网 - puzzle9 blog
debian 转换为 pve - puzzle9 blog
2026-03-06 · via puzzle9 blog

人嘛 总有些奇奇怪怪的需求

准备工作

先确认主地址并设置 host

假设ip为 192.168.2.1
主机名为 pve

host 内容大概为

1
2
3
4
5
127.0.0.1       localhost.localdomain localhost
192.168.2.1 pve
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

可输入 hostname --ip-address 验证

更新软件源

trixie

清空 /etc/apt/sources.list 文件

新建以下源

/etc/apt/sources.list.d/debian.sources

1
2
3
4
5
6
7
8
9
10
11
Types: deb
URIs: http://deb.debian.org/debian/
Suites: trixie trixie-updates
Components: main contrib non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Types: deb
URIs: http://security.debian.org/debian-security/
Suites: trixie-security
Components: main contrib non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

/etc/apt/sources.list.d/proxmox.sources

1
2
3
4
5
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-release-trixie.gpg

下载pve的仓库密钥

1
wget https://enterprise.proxmox.com/debian/proxmox-release-trixie.gpg -O /usr/share/keyrings/proxmox-release-trixie.gpg

开始转换

1
2
apt update && apt full-upgrade
apt install proxmox-default-kernel

重启

1
apt install proxmox-ve postfix open-iscsi chrony

再移除 旧内核

1
apt purge linux-image-amd64 'linux-image-6.1*'

后续配置

ipv4 网络启用 nat 模式

重要的在于 iptables

/etc/sysctl.conf

1
net.ipv4.ip_forward = 1

/etc/network/interfaces

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
auto lo
iface lo inet loopback

auto enp1s0f0
iface enp1s0f0 inet static
address 192.168.1.2/32
gateway 192.168.1.1
dns-nameservers 1.1.1.1
dns-nameservers 8.8.8.8

iface enp1s0f1 inet manual

auto nat
iface nat inet static
address 192.168.2.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up iptables -t nat -A POSTROUTING -s '192.168.2.1/24' -o enp1s0f0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.2.1/24' -o enp1s0f0 -j MASQUERADE

虚拟机配 192.168.2.1/24

ipv6 启用 ULA 模式

1
2
iface nat inet6 static
address fd10::1/64

虚拟机配 fd10::1/64 不填网关

ipv6 启用 手动 模式

/etc/sysctl.conf

1
2
3
4
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.all.proxy_ndp=1
net.ipv6.conf.nat.forwarding=1
net.ipv6.conf.nat.proxy_ndp=1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
auto eth0
iface eth0 inet manual

auto eth0
iface eth0 inet6 static
address 2xxx:xxxx:xxxx:xxxx::2/64
# 网关为服务商提供
gateway fe80::1
dns-nameserver 2606:4700:4700::1111
dns-nameserver 2001:4860:4860::8888
post-up ip -6 route del 2xxx:xxxx:xxxx:xxxx::/64 dev eth0
# 网关为 ::1 必写
post-up ip -6 route add 2xxx:xxxx:xxxx:xxxx::1 dev eth0

auto nat
iface nat inet6 static
address 2xxx:xxxx:xxxx:xxxx::3/128
bridge-ports none
bridge-stp off
bridge-fd 0
dns-nameserver 2606:4700:4700::1111
dns-nameserver 2001:4860:4860::8888
post-up ip -6 route add 2xxx:xxxx:xxxx:xxxx::::/64 dev nat
# 此处不清楚为何重启pve后 ipv6 的转发会失效
post-up sysctl -p

虚拟机配 2xxx:xxxx:xxxx:xxxx::/64 网关填 2xxx:xxxx:xxxx:xxxx::3

网络不通时 可以在 pve 上通过 tcpdump -i nat -n icmp6 抓包

如果服务商给的网关为 ::1 必须要配置 ndppd

1
apt install ndppd

/etc/ndppd.conf

1
2
3
4
5
proxy eth0 {
rule 2xxx:xxxx:xxxx:xxxx::/64 {
static
}
}
1
systemctl enable ndppd

ipv6 启用 dhcp 模式

其他

如果开始的 host 设置失败 将会导致 pveweb 无法访问

1
2
systemctl restart pve-cluster
pvecm updatecerts --force

如果系统用到了 netplan 则需要先卸载

1
2
apt purge netplan.io
apt install ifupdown

使用 systemctl restart systemd-networkdsystemctl restart networking

备份与迁移

在页面上备份后 直接将 /var/lib/vz/dump/ 目录打包带走就行

修改主机名

修改 /etc/hosts

修改 /etc/hostname

修改 /etc/postfix/main.cf

重启

然后再将 /etc/pve/nodes/ 里面的 lxcqemu-server 移动到新目录中

再注意 ~/.ssh/authorized_keys 这个文件

参考地址