PVE 安装虚拟交换机与设置RDM直通
因业务上的需求,从ESXI转PVE平台,一切都要慢慢的去了解!
#PVE安装虚拟交换机
#删除默认源
rm -rf /etc/apt/sources.list.d/pve-enterprise.list
#创建软件源
nano /etc/apt/sources.list
#添加源
deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free deb https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free deb https://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib deb https://mirrors.ustc.edu.cn/proxmox/debian bullseye pve-no-subscription
#更新,安装
apt-get update apt-get install openvswitch-switch
#开启IOMMU
vi /etc/default/grub
#在里面找到:
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
#然后修改为:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"
#保存后更新并重启
update-grub
reboot
#查看硬盘
ls -la /dev/disk/by-id/|grep -v dm|grep -v lvm|grep -v part
#创建RDM直通给虚拟机:qm set <虚拟机ID> --scsiX /dev/disk/by-id/硬盘ID
#如下是示例
qm set 111 --scsi1 /dev/disk/by-id/nvme-SAMSUNG_MZ1LB3T8HMLA-00007_S46FNY0R302349 qm set 112 --scsi1 /dev/disk/by-id/nvme-SAMSUNG_MZ1LB1T9HALS-00007_S436NC0R428784 qm set 112 --scsi2 /dev/disk/by-id/nvme-SAMSUNG_MZ1LB1T9HALS-00007_S436NC0R426757 qm set 113 --scsi1 /dev/disk/by-id/nvme-SAMSUNG_MZ1LB1T9HALS-00007_S436NC0R426694 qm set 113 --scsi2 /dev/disk/by-id/nvme-SAMSUNG_MZ1LB1T9HALS-00007_S436NC0R426588