① vi /etc/vim/vimrc.tiny
② 按下键盘上的Insert键;这时屏幕左下角出现Insert
③ 在compatible前面加no;
④ 再加一句 set backspace=2
------------------------更换管理口IP---------------------------
~# nano /etc/network/interfaces
~# nano /etc/issue
~# nano /etc/hosts
------------------------pve挂新硬盘----------------------------
fdisk /dev/nvme1n1
fdisk n(创建新分区)p 1 w
mkfs -t ext4 /dev/nvme1n1p1
mkdir -p /mnt/nvme1n1p1
mount -t ext4 /dev/nvme1n1p1 /mnt/nvme1n1p1
echo /dev/nvme1n1p1 /mnt/nvme1n1p1 ext4 defaults 1 2 >> /etc/fstab
pve (PROXMOX VE)
一、
#nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt video=efifb:off,vesafb:off"
intel_iommu=on iommu=pt video=efifb:off,vesafb:off
#update-grub
二、
#nano /etc/modules
结尾添加
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
三、
#nano /etc/modprobe.d/pve-blacklist.conf
结尾添加
blacklist radeon
blacklist nouveau
blacklist nvidia
四、# 允许不安全的中断
#echo "options vfio_iommu_type1 allow_unsafe_interrupts=1" > /etc/modprobe.d/iommu_unsafe_interrupts.conf
五、# 忽略异常,防止虚拟机异常导致宿主机崩溃
# ignore_msrs : 忽略异常
# report_ignored_msrs : 是否报告异常
#echo "options kvm ignore_msrs=1 report_ignored_msrs=0" > /etc/modprobe.d/kvm.conf
六、# lspci -nn | grep NV
14:00.0 3D controller [0302]: NVIDIA Corporation TU104GL [Tesla T4] [1bde:1eD8] (rev a1)
15:00.0 3D controller [0302]: NVIDIA Corporation TU104GL [Tesla T4] [1bde:1eD8] (rev a1)
18:00.0 3D controller [0302]: NVIDIA Corporation TU104GL [Tesla T4] [1bde:1eD8] (rev a1)
1d:00.0 3D controller [0302]: NVIDIA Corporation TU104GL [Tesla T4] [1bde:1eD8] (rev a1)
#nano /etc/modprobe.d/vfio.conf
options vfio-pci ids=设备ID,设备ID #1bde:1eD8为设备号
#update-initramfs -u
update-initramfs -u -k all
七、#reboot
华旅网络 |