proxmox ve 6.2.1 初始化脚本

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

以上是关于proxmox ve 6.2.1 初始化脚本的主要内容,如果未能解决你的问题,请参考以下文章

Proxmox VE Install 7.2

Proxmox VE Install 7.2

Proxmox VE 7.0升级到Proxmox VE 7.1虚拟机重启失败

Proxmox VE LVM扩容

pve(proxmox ve)直接从备份文件查看虚拟机配置2020-12-18

Install Proxmox VE 4 on Debian 8