2023年9月24日星期日

pve直通时遇到多个PCI设置在同一组时出现:failed to open /dev/vfio/1: Device or resource busy

 

Proxmox already contains the ACS override patches, so you can just add the pcie_acs_override=downstream or if necessary pcie_acs_override=downstream,multifunction kernel parameters to GRUB or systemd-boot (please check the PVE manual to find out which is used in your case). It usually "breaks" all IOMMU group and there allows you to ignore security isolation of the IOMMU groups. PCI(e) devices can do DMA (DIrect memory access, as in reading and writing any part of the VM memory) and talk to other PCI(e) devices in the same group. This is a security issue and your should not use it if you run untrusted software or allow untrusted users to access your VMs. Also, there are no guarantees that it will work. It just allows you to ignore ACS as your own risk.


查询直通分组信息:

 for d in /sys/kernel/iommu_groups/*/devices/*; do n=${d#*/iommu_groups/*}; n=${n%%/*}; printf 'IOMMU group %s ' "$n"; lspci -nns "${d##*/}"; done







nvidia 修改风扇转速方法

转自 https://github.com/andyljones/coolgpus 




./pip install wheel
pip install coolgpus
sudo $(which coolgpus) --speed 99 99

If you hear your server take off, it works! Now interrupt it and re-run either with Sensible Defaults (TM),

sudo $(which coolgpus)

or you can pass your own fan curve with

sudo $(which coolgpus) --temp 17 84 --speed 15 99 

This will make the fan speed increase linearly from 15% at <17C to 99% at >84C. You can also increase --hyst if you want to smooth out oscillations, at the cost of the fans possibly going faster than they need to.

Piecewise Linear Control

More generally, you can list any sequence of (increasing!) temperatures and speeds, and they'll be linearly interpolated:

sudo $(which coolgpus) --temp 20 55 80 --speed 5 30 99

Now the fan speed will be 5% at <20C, then increase linearly to 30% up to 55C, then again linearly to 99% up to 80C.

systemd

If your system uses systemd and you want to run this as a service, create a systemd unit file at /etc/systemd/system/coolgpus.service as per this template:

[Unit]
Description=Headless GPU Fan Control
After=syslog.target

[Service]
ExecStart=/home/ajones/conda/bin/coolgpus --kill 
Restart=on-failure
RestartSec=5s
ExecStop=/bin/kill -2 $MAINPID
KillMode=none 

[Install]
WantedBy=multi-user.target

You just need to sub in your own install location (which you can find with which coolgpus), and any flags you want. Then enable and start it with

sudo systemctl enable coolgpus
sudo systemctl start coolgpus









在PVE使用虚拟 USB 存储设备 + ARPL 引导 DSM

  部分内容来自: https://blog.myds.cloud/archives/synoboot-usb-image-in-pve-virtual-machine.html 虚拟机建好之后,打开配置文件 nano /etc/pve/qemu-server/100.conf ...