Skip to main content

Proxmox 安装后设置

Proxmox 版本 7.X

(有关 Proxmox 7 的完整指南,请参阅此链接

更新

  • 编辑

/etc/apt/sources.list

deb http://ftp.debian.org/debian bullseye main contrib

deb http://ftp.debian.org/debian bullseye-updates main contrib

# security updates
deb http://security.debian.org/debian-security bullseye-security main contrib

# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription
  • 编辑

/etc/apt/sources.list.d/pve-enterprise.list

# deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise
  • 执行
apt-get update
apt dist-upgrade
reboot

贮存

  • 擦除磁盘
fdisk /dev/sda

然后 P 表示分区,然后 D 表示删除,然后 W 表示写入

检查 SMART 监控

smartctl -a /dev/sda

IOMMU(PCI 直通)

(请参阅Proxmox PCI 直通)

  • 编辑

nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"

update-grub

  • 编辑

/etc/modules

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

update-initramfs -u -k all

reboot

VLAN

  • 限制 VLAN
nano /etc/network/interfaces
  • 设置 VLAN
bridge-vlan-aware yes
bridge-vids 20

NIC 团队示例

nano /etc/network/interfaces
auto eno1
iface eno1 inet manual

auto eno2
iface eno2 inet manual

auto bond0
iface bond0 inet manual
        bond-slaves eno1 eno2
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer2+3

auto vmbr0
iface vmbr0 inet static
        address 192.168.0.11/24
        gateway 192.168.0.1
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094
#lacp nic team

如果您正在运行 Proxmox 7,请在此处查看修改后的 LAGG / LACP配置

克隆

在克隆 Linux 机器后运行的命令,以便它重置克隆它的机器的所有信息。

  • 更改主机名
sudo nano  /etc/hostname
  • 更改主机文件,找到主机名并更改它
sudo nano /etc/hosts
  • 重置机器ID
rm -f /etc/machine-id /var/lib/dbus/machine-id
dbus-uuidgen --ensure=/etc/machine-id
dbus-uuidgen --ensure
  • 重新生成 ssh 密钥
regen ssh keys
sudo rm /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server
  • 重启

 

原文链接