Press "Enter" to skip to content

PVE折腾记录

PVE 7.4

换源

cp /etc/apt/sources.list /etc/apt/sources.list.bak
sed -i 's|^deb http://ftp.debian.org|deb https://mirrors.ustc.edu.cn|g' /etc/apt/sources.list
sed -i 's|^deb http://security.debian.org|deb https://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list

# 屏蔽企业订阅源
mv /etc/apt/sources.list.d/pve-enterprise.list  /etc/apt/sources.list.d/pve-no-subscription.list.bak

cp /usr/share/perl5/PVE/APLInfo.pm /usr/share/perl5/PVE/APLInfo.pm.bak
sed -i 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm

#CEPH源更换
sed -i.bak "s#http://download.proxmox.com/debian#https://mirrors.ustc.edu.cn/proxmox/debian#g" /usr/share/perl5/PVE/CLI/pveceph.pm

#删除订阅弹窗
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

自动挂载硬盘

mkfs.ext4 /dev/sda1
mkdir -p /mnt/local-sda
mount /dev/sda1 /mnt/local-sda
echo '/dev/sda1 /mnt/local-sda ext4 defaults 0 0' >> /etc/fstab

直通


#编辑 /etc/default/grub 文件替换为
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"

#然后执行
update-grub && reboot