操作步骤
- 修改/etc/network/interfaces:
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface enx00e04c36028c inet dhcp
iface enp2s0 inet manual
iface enp3s0 inet manual
iface enp4s0 inet manual
iface enp5s0 inet manual
auto vmbr2
iface vmbr2 inet manual
bridge-ports enp2s0
bridge-stp off
bridge-fd 0
auto vmbr3
iface vmbr3 inet manual
bridge-ports enp3s0
bridge-stp off
bridge-fd 0
auto vmbr4
iface vmbr4 inet manual
bridge-ports enp4s0
bridge-stp off
bridge-fd 0
# 修改的部分在这块,主要修改为该manual为static,增加address、netmask、gateway段
auto vmbr5
iface vmbr5 inet static
address 192.168.31.218
netmask 255.255.255.0
gateway 192.168.31.1
bridge-ports enp5s0
bridge-stp off
bridge-fd 0
- 修改/etc/issue(提示文件,随便你改):
------------------------------------------------------------------------------
Welcome to the Proxmox Virtual Environment. Please use your web browser to
configure this server - connect to:
https://192.168.31.218:8006/
------------------------------------------------------------------------------
- 修改etc/hosts:
127.0.0.1 localhost
# 改动主要在这块
192.168.31.218 j4125.home j4125
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
- 重启网络
/etc/init.d/networking restart
参考教程
-
proxmox ve(PVE)修改管理IP地址
-
Proxmox Virtual Environment(PVE)完美的更改IP地址
-
为 Proxmox 配置私有网络