❗
Proxmox Virtual Environment 8.1
개요
- BIOS에서
IOMMU세팅이 필수적으로 필요하다. - BIOS에서
Intel VT-D와 같은 세팅이 필수적으로
필요하다.
Passthrough 방법
Proxmox host machine에서 Shell에 접근 또는 ssh로 접속하여 다음과 같이
진행한다.
root@pve:~$ vi /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
#iommu를 활성화. AMD cpu의 경우, amd_iommu=on을 추가한다.
GRUB_CMDLINE_LINUX=""
# grub 적용
root@pve:~$ update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.30-2-pve
Found initrd image: /boot/initrd.img-5.15.30-2-pve
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
Adding boot menu entry for EFI firmware configuration
done
# 모듈 값 추가
root@pve:~$ echo "vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd" | tee -a /etc/modules전부 추가 되었으면 이후 rebootng을 해준다.
이후 다음 과정을 통해 GPU를 매핑할 수 있다.
- proxmox GUI 좌측에
Datacentr탭 - 하단에
Resource Mappings탭 - Add
- Node 선택, 이름은 임의로 지정, GPU 체크 후 Create
VM 생성 시 GPU를 정상적으로 사용 하려면 GPU 메모리의 2배 정도 시스템
메모리를 할당 해줘야 한다.
생성 후 다음과 같이 VM에 GPU를 할당할 수 있다.
- VM에서 좌측
Hardware탭 - Add
PCI Device에서 사용 할 GPU를 추가 - All Funcions 체크, 용도에 따라 Primary GPU 체크
(Primary GPU를 체크하면, Passthrough한 GPU가 메인 GPU로 인식되어 Proxmox에서 VM의 콘솔을 사용할 수 없게되고, Primary GPU를 체크하지 않으면, Passthrough한 GPU가 서브 GPU로 인식되어 Proxmox에서 VM의 콘솔을 사용할 수 있다. )
- OS 설치 진행
- NVIDIA 드라이버 설치 진행
- Ref.
https://wiki.formellow.com