×

签到

分享到微信

打开微信,使用扫一扫进入页面后,点击右上角菜单,

点击“发送给朋友”或“分享到朋友圈”完成分享

Proxmox直通-寒武纪MLU fengyunkai2023-09-14 17:44:41 回复 查看 干货资源
Proxmox直通-寒武纪MLU
分享到:


宿主机操作(确保卡已经插好,且正确识别,不需要装驱动,不需要装驱动,不需要装驱动;后面在虚拟机机装驱动

编辑/etc/default/grub文件在直通英伟达的基础上添加iommu=pt

root@pve9:~# cat /etc/default/grub

# If you change this file, run 'update-grub' afterwards to update

# /boot/grub/grub.cfg.

# For full documentation of the options in this file, see:

#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0

GRUB_TIMEOUT=5

GRUB_DISTRIBUTOR="Proxmox Virtual Environment"

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream video=vesafb:off video=efifb:off"

GRUB_CMDLINE_LINUX=""

# Disable os-prober, it might add menu entries for each guest

GRUB_DISABLE_OS_PROBER=true

# update-grub

Generating grub configuration file ...

Found linux image: /boot/vmlinuz-5.4.106-1-pve

Found initrd image: /boot/initrd.img-5.4.106-1-pve

Found memtest86+ image: /boot/memtest86+.bin

Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin

Adding boot menu entry for EFI firmware configuration

done

# reboot



在宿主机上禁用寒武纪卡

root@pve9:~# lspci | grep cabc

74:00.0 Processing accelerators: Device cabc:0370

root@pve9:~# lspci -n -s 74:00

74:00.0 1200: cabc:0370    这里记住设备号74:00给虚拟机添加显卡的时候需要用

gpu 卡型号写到 /etc/modprobe.d/vfio.conf

root@pve9:~# echo "options vfio-pci ids=cabc:0370 disable_vga=1" > /etc/modprobe.d/vfio.conf


登录Proxmox管理页面

把要直通的虚拟机总线类型改成q35

image.png


把虚拟机的CPU类型调整为max

image.png

添加PCI设备,通过设备号找到寒武纪卡添加给虚拟机,然后把虚拟机先关机,再启动,不要直接热重启

主要寒武纪卡需要开启PCI-Express和所有功能选项。

image.png

开启虚拟机,安装驱动,过程略

image.png



版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:京ICP备17003415号-1
关闭