PVE 备忘[内核清理等等]

864次阅读

[h2title]使用自己的 SSL 证书[/h2title]

cp fullchain.pem /etc/pve/nodes/节点名/pveproxy-ssl.pem

cp privkey.pem /etc/pve/nodes/节点名/pveproxy-ssl.key

systemctl restart pveproxy

[h2title]更换源[/h2title]

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

# 官方免费源

echo 'deb http://download.proxmox.com/debian/pve stretch pve-no-subscription' >>/etc/apt/sources.list.d/pve-free.list

# 科大源(备选)

echo 'deb https://mirrors.ustc.edu.cn/proxmox/debian/pve stretch pve-no-subscriptio' >>/etc/apt/sources.list.d/pve-free.list

[h2title]关闭订阅提示[/h2title]

vi  /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js

搜索data.status,把if(data.status!==’Active’) 修改为if(false)

[h2title]删除多余内核[/h2title]

uname -sr

dpkg --list|grep pve-kernel

apt purge pve-kernel-****-pve

[h2title]硬盘休眠[/h2title]

修改 /etc/lvm/lvm.conf 过滤掉想要休眠的硬盘
添加如下:

# vi /etc/lvm/lvm.conf

filter = ["r|/dev/sdc.*|"]

使用 hdparm 休眠

hdparm -S 240 /dev/sdc

 

[h2title]移除 pve-local[/h2title]

cd /etc/pve/

cp storage.cfg storage.cfg.bak

vi storege.cfg

# 删除 localthin 下的所有内容,(:wq)保存退出

# 移除 local-lvm

lvremove /dev/pve/data

lvresize -l +100%FREE /dev/pve/root

resize2fs /dev/mapper/pve-root

# 查看效果

lsblk

pcspkr error

Error: Driver ‘pcspkr’ is already registered, aborting…

echo“blacklist pcspkr”> /etc/modprobe.d/blacklist-pcspkr.conf

[h2title]添加物理硬盘到虚拟机(硬盘直通)[/h2title]

ls /dev/disk/by-id/

qm set VM-ID -virtio2 /dev/disk/by-id/DISK-ID

[h2title]参考[/h2title]

Proxmox remove lvm local data

正文完