{"id":6505,"date":"2025-12-29T00:52:34","date_gmt":"2025-12-28T23:52:34","guid":{"rendered":"https:\/\/roccadomenico.it\/wordpress\/?p=6505"},"modified":"2025-12-29T00:57:30","modified_gmt":"2025-12-28T23:57:30","slug":"proxmox-attivare-passthrough","status":"publish","type":"post","link":"https:\/\/roccadomenico.it\/wordpress\/proxmox-attivare-passthrough\/","title":{"rendered":"Proxmox attivare passthrough"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"6505\" class=\"elementor elementor-6505\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b7b2fe5 e-flex e-con-boxed e-con e-parent\" data-id=\"b7b2fe5\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e4d3e9f elementor-widget elementor-widget-text-editor\" data-id=\"e4d3e9f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Proxmox versione 9.1.4<\/p><p>GPU nvidia GTX1650<\/p><p>come attivare <strong>passthrough<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-f5189fe e-flex e-con-boxed e-con e-parent\" data-id=\"f5189fe\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-41db02a elementor-widget elementor-widget-text-editor\" data-id=\"41db02a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Prima fase INSTALLAZIONE DRIVER NVIDIA<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-18e365b e-flex e-con-boxed e-con e-parent\" data-id=\"18e365b\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7fb2c84 elementor-widget elementor-widget-text-editor\" data-id=\"7fb2c84\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Seconda fase ATTIVARE passthrough<\/p><p>una precisazione. Se intendiamo usare il passthrough su una VM non dobbiamo effettuare il secondo passaggio, in quanto \u00e8 gi\u00e0 tutto attivo. Se vogliamo invece utilizzare il passthrough su un container LXC dobbiamo effettuare il secondo passaggio ma dopo di questo il passthrough funzioner\u00e0 solo sui container<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-90f041c e-flex e-con-boxed e-con e-parent\" data-id=\"90f041c\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c26a0ef elementor-widget elementor-widget-text-editor\" data-id=\"c26a0ef\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>1\ufe0f\u20e3 Verifica IOMMU support nel kernel<\/p><p>Controlla se il tuo host supporta IOMMU (fondamentale per il passthrough):<\/p><p><strong>dmesg | grep -e DMAR -e IOMMU<\/strong><\/p><p>Se vedi qualcosa tipo:<\/p><p>DMAR: IOMMU enabled<\/p><p>\u2705 OK<\/p><p>Se NON appare \u2192 devi abilitare IOMMU nel GRUB:<\/p><p>Modifica \/etc\/default\/grub:<\/p><p><strong>GRUB_CMDLINE_LINUX_DEFAULT=&#8221;quiet intel_iommu=on iommu=pt&#8221;<\/strong><br \/><strong># o se AMD:<\/strong><br \/><strong># GRUB_CMDLINE_LINUX_DEFAULT=&#8221;quiet amd_iommu=on iommu=pt&#8221;<\/strong><\/p><p>Aggiorna GRUB:<\/p><p><strong>update-grub<\/strong><\/p><p><strong>Reboot<\/strong><\/p><hr \/><p>2\ufe0f\u20e3 Identifica la tua GPU<br \/><strong>lspci -nn | grep -i nvidia<\/strong><\/p><p>Output tipico:<\/p><p>01:00.0 VGA compatible controller [0300]: NVIDIA Corporation RTX 3060 [10de:2504] (rev a1)<br \/>01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:228b] (rev a1)<\/p><p>01:00.0 \u2192 GPU<\/p><p>01:00.1 \u2192 Audio GPU (HDMI\/Display)<\/p><hr \/><p>\ud83d\udd39 Prossimo passo: configurare VFIO<\/p><p>Crea il file \/etc\/modprobe.d\/vfio.conf:<\/p><p><strong>options vfio-pci ids=10de:1f0a,10de:10f9 disable_vga=1<\/strong><\/p><p>10de:1f0a \u2192 GPU<\/p><p>10de:10f9 \u2192 Audio HDMI<\/p><p>disable_vga=1 \u2192 evita conflitti VGA con host<\/p><p>Aggiorna initramfs:<\/p><p><strong>update-initramfs -u -k all<\/strong><\/p><p>Riavvia host:<\/p><p><strong>reboot<\/strong><\/p><hr \/><p>1\ufe0f\u20e3 Creare il file di configurazione VFIO<\/p><p>Apri il terminale sul tuo host Proxmox e crea il file \/etc\/modprobe.d\/vfio.conf:<\/p><p><strong>nano \/etc\/modprobe.d\/vfio.conf<\/strong><\/p><p>All\u2019interno del file, scrivi esattamente:<\/p><p><strong>options vfio-pci ids=10de:1f0a,10de:10f9 disable_vga=1<\/strong><\/p><p><strong>10de:1f0a \u2192 GPU (VGA)<\/strong><\/p><p><strong>10de:10f9 \u2192 Audio HDMI della GPU<\/strong><\/p><p><strong>disable_vga=1 \u2192 evita conflitti VGA con l\u2019host<\/strong><\/p><p>Salva e chiudi:<\/p><p>In nano \u2192 premi CTRL+O \u2192 invio \u2192 CTRL+X<\/p><p>2\ufe0f\u20e3 Aggiornare l\u2019initramfs<\/p><p>Affinch\u00e9 il modulo VFIO prenda la GPU all\u2019avvio, esegui:<\/p><p><strong>update-initramfs -u -k all<\/strong><\/p><p>3\ufe0f\u20e3 Riavviare il nodo<\/p><p>Ora riavvia il server:<\/p><p><strong>reboot<\/strong><\/p><p>Questo permetter\u00e0 al kernel di caricare VFIO e legare la GPU al driver passthrough<\/p><p>La GPU non sar\u00e0 pi\u00f9 disponibile all\u2019host, pronta per le VM<\/p><p>4\ufe0f\u20e3 Verifica VFIO dopo reboot<\/p><p>Dopo il reboot, esegui:<\/p><p>lspci -nnk -s 09:00.0<br \/>lspci -nnk -s 09:00.1<\/p><p>Dovresti vedere qualcosa tipo:<\/p><p>Kernel driver in use: vfio-pci<\/p><p>Se s\u00ec \u2192 \u2705 la GPU \u00e8 pronta per il passthrough.<\/p><hr \/><p>se non appare<\/p><p>\ud83d\udd39 Passi correttivi per far s\u00ec che VFIO prenda la GPU<\/p><p>Modifica il file VFIO per escludere il driver NVIDIA dall\u2019host (gi\u00e0 fatto con vfio.conf), ma dobbiamo anche dire al kernel di caricare VFIO prima dei driver NVIDIA.<\/p><p>Aggiungi VFIO all\u2019initramfs:<\/p><p>Apri \/etc\/initramfs-tools\/modules:<\/p><p>nano \/etc\/initramfs-tools\/modules<\/p><p>Aggiungi in fondo:<\/p><p>vfio<br \/>vfio_iommu_type1<br \/>vfio_pci<br \/>vfio_virqfd<\/p><p>Salva (CTRL+O, invio, CTRL+X).<\/p><p>Aggiorna initramfs:<\/p><p>update-initramfs -u -k all<\/p><p>Riavvia l\u2019host:<\/p><p>reboot<\/p><p>Verifica VFIO dopo reboot:<\/p><p>lspci -nnk -s 09:00.0<br \/>lspci -nnk -s 09:00.1<\/p><p>Dovresti vedere:<\/p><p>Kernel driver in use: vfio-pci<\/p><p>\u2705 Se appare cos\u00ec, la GPU \u00e8 pronta per il passthrough alla VM.<\/p><hr \/>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-48aee6b e-flex e-con-boxed e-con e-parent\" data-id=\"48aee6b\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b5aae5c elementor-widget elementor-widget-text-editor\" data-id=\"b5aae5c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\ud83d\udd39 Cosa fare ad ogni aggiornamento kernel<\/p><p>Dopo ogni update kernel:<\/p><p><strong>update-initramfs -u -k all<\/strong><\/p><p>Riavvio host con il nuovo kernel<\/p><p>Verifica VFIO:<\/p><p><strong>lspci -nnk -s 09:00.0<\/strong><br \/><strong>lspci -nnk -s 09:00.1<\/strong><\/p><p>Deve comparire ancora Kernel driver in use: vfio-pci<\/p><hr \/><p>COME RILASCIARE LA GPU PER USO SU VM<\/p><p>\u00a0Passi per rilasciare la GPU<br \/>a) Rimuovi la configurazione VFIO<\/p><p>Apri il file \/etc\/modprobe.d\/vfio.conf:<\/p><p><strong>nano \/etc\/modprobe.d\/vfio.conf<\/strong><\/p><p>Commenta o cancella la riga:<\/p><p><strong># options vfio-pci ids=10de:1f0a,10de:10f9 disable_vga=1<\/strong><\/p><p>Salva (CTRL+O, invio, CTRL+X).<\/p><p>b) Rigenera initramfs<br \/><strong>update-initramfs -u -k all<\/strong><\/p><p>Serve per far s\u00ec che al prossimo avvio il kernel non carichi pi\u00f9 VFIO sulla GPU<\/p><p>c) Riavvia host<br \/><strong>reboot<\/strong><\/p><p>d) Verifica driver NVIDIA host<\/p><p>Dopo reboot, esegui:<\/p><p><strong>lspci -nnk -s 09:00.0<\/strong><\/p><p>Dovresti vedere:<\/p><p>Kernel driver in use: nvidia<\/p><p>Se s\u00ec \u2192 la GPU \u00e8 di nuovo disponibile per l\u2019host e quindi anche per LXC.<\/p><p>e) Passare la GPU ai container LXC<\/p><p>Controlla i device NVIDIA:<\/p><p><strong>ls -l \/dev\/nvidia*<\/strong><\/p><p>Tipicamente:<\/p><p>\/dev\/nvidia0<br \/>\/dev\/nvidiactl<br \/>\/dev\/nvidia-uvm<\/p><p>In Proxmox GUI \u2192 Container \u2192 Resources \u2192 Add \u2192 Device Passthrough<\/p><p>Device path: \/dev\/nvidia0<\/p><p>Poi aggiungi \/dev\/nvidiactl e \/dev\/nvidia-uvm uno per uno<\/p><p>Avvia il container \u2192 dentro puoi usare nvidia-smi<\/p><p>\ud83d\udca1 Nota importante:<\/p><p>Se vuoi LXC con accesso GPU, non devi mai legarla a VFIO<\/p><p>Se vuoi passthrough completo con prestazioni massime (CUDA, Ollama), usa una VM<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Proxmox versione 9.1.4 GPU nvidia GTX1650 come attivare passthrough Prima fase INSTALLAZIONE DRIVER NVIDIA Seconda fase ATTIVARE passthrough una precisazione. Se intendiamo usare il passthrough su una VM non dobbiamo effettuare il secondo passaggio, in quanto \u00e8 gi\u00e0 tutto attivo. Se vogliamo invece utilizzare il passthrough su un container LXC dobbiamo effettuare il secondo passaggio [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-6505","post","type-post","status-publish","format-standard","hentry","category-twitter"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/posts\/6505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/comments?post=6505"}],"version-history":[{"count":7,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/posts\/6505\/revisions"}],"predecessor-version":[{"id":6512,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/posts\/6505\/revisions\/6512"}],"wp:attachment":[{"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/media?parent=6505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/categories?post=6505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/roccadomenico.it\/wordpress\/wp-json\/wp\/v2\/tags?post=6505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}