PVE | Proxmox VE 修改IP地址以及无法联网问题

修改 IP 地址

1
nano /etc/network/interfaces
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
auto lo
iface lo inet loopback

iface enp3s0 inet manual

auto vmbr0
iface vmbr0 inet static
address 10.0.0.200
netmask 255.255.255.0
gateway 10.0.0.1
bridge_ports enp3s0
bridge_stp off
bridge_fd 0

iface enp5s0 inet manual

网络设备名每台机器可能会略有不同,忽略,修改 address, netmaskgateway 字段对应的值为新环境的网络地址。

修改终端提示的 URL

1
nano /etc/issue
1
2
3
4
5
6
7
8
------------------------------------------------------------------------------

Welcome to the Proxmox Virtual Environment. Please use your web browser to
configure this server - connect to:

https://10.0.0.200:8006/

------------------------------------------------------------------------------

/etc/issue 的内容是 Linux 终端登启动后的欢迎语句。将 URL 中的 IP 地址更改 PVE 新的 IP

修改 hosts

1
nano /etc/hosts
1
2
127.0.0.1 localhost.localdomain localhost
10.0.0.200 pve.lan pve

pve.lan (局域网 hostname)映射的 IP 更换成 PVE 新的 IP 地址。

修改 DNS(这步是取决于PVE能否联网的关键)

1
nano /etc/resolv.conf

nameserver 114.114.114.114 (这里面建议改为114的DNS)

重启