proxmox ve 6.2.1 初始化脚本
#!/bin/bash
# @Author : Felix_zh
# @DateTime: 07/29/2020_17:38:56
# @FileName: pve
# @Version : v1.0
# @Function:
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
sed -i_orig "s/data.status !== ‘Active‘/false/g" /usr/share/pve-manager/js/pvemanagerlib.js && systemctl restart pveproxy
sed -i_orig "s/data.status !== ‘Active‘/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy
mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg
echo "deb http://download.proxmox.wiki/debian/pve stretch pve-no-subscription" >/etc/apt/sources.list.d/pve-install-repo.list
echo "deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib" > /etc/apt/sources.list
apt update && apt upgrade -y && apt dist-upgrade -y
sed -i.bak ‘s/quiet/quiet intel_iommu=on/‘ /etc/default/grub
cat >> /etc/modules << EOF
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
EOF
update-grub
apt install -y vim net-tools wget curl htop git axel aria2 apt-transport-https ca-certificates curl software-properties-common gnupg2