I have installed proxmox OS on a baremetal machine. The OS is installed and running on a…
- User
I have installed proxmox OS on a baremetal machine. The OS is installed and running on a small M.2 SSD card. The motherboard is GA-Z170X-Gaming-3-rev-10, and the graphics card is an NVIDIA 1060 3gb. I have created a VM that is running Ubuntu server. I have successfully installed an internal HDD and then mounted that to the VM and can access and write to it via the VM's shell.
I am struggling however to passthrough the graphics card. Can you help me please?
Assistant
Yes, I can help you pass through your NVIDIA GeForce GTX 1060 3GB GPU to a Proxmox VM. This is a common use case for people wanting to run Windows or Linux guests with direct access to a dedicated GPU (e.g., for gaming, virtual desktops, etc.).
Here's a step-by-step guide tailored to your setup:
✅ PrEREQUISITES
Before we begin:
- Ensure IOMMU/VT-d is enabled in your BIOS.
- Your CPU must support IOMMU (Intel VT-d). Since you're on a Z170 chipset (Skylake), it likely does.
- You are using the VFIO driver, not the legacy
nvidiaornouveaudrivers for GPU passthrough.
🔧 STEP 1: Enable IOMMU in BIOS
- Reboot into BIOS (usually by pressing Delete or F2 at boot).
- Look under Advanced > Chipset Settings or similar.
- Find and enable:
- Intel Virtualization Technology (VT-x)
- Intel VT-d (Virtualization Technology for Directed I/O)
Save and exit.
🐧 STEP 2: Enable IOMMU in Proxmox Kernel
Edit GRUB config to enable IOMMU:
nano /etc/default/grubAdd the following to
GRUB_CMDLINE_LINUX:intel_iommu=on iommu=ptExample line after edit:
GRUB_CMDLINE_LINUX="quiet intel_iommu=on iommu=pt"Update GRUB:
update-grub
🛠️ STEP 3: Enable VFIO Kernel Module
Ensure that the kernel uses
vfio-pciinstead of loadingnouveauornvidiadrivers directly on the host.Create modprobe configuration:
echo "options vfio-pci ids=10de:1c02,10de:10f0" > /etc/modprobe.d/vfio.confNote: The above PCI IDs are for the NVIDIA GTX 1060 3GB. You can verify these later using
lspci.Also create a blacklist for nouveau and nvidia:
echo "blacklist nouveau" > /etc/modprobe.d/blacklist-nvidia.conf echo "blacklist nvidia" >> /etc/modprobe.d/blacklist-nvidia.confNow update initramfs:
update-initramfs -u
🖥️ STEP 4: Identify GPU Device(s)
Run:
lspci | grep -i nvidiaYou should see something like:
01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] (rev a1) 01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)Take note of the PCIe addresses (
01:00.0and01:00.1).Then check if they are bound to
vfio-pci:echo -n "0000:01:00.0" | sudo tee /sys/bus/pci/drivers/vfio-pci/bind echo -n "0000:01:00.1" | sudo tee /sys/bus/pci/drivers/vfio-pci/bindTo automate this on boot:
Install
vfio-pci:apt install vfio-pci vfio-islnb4Then find the exact vendor IDs:
lspci -nn | grep -i nvidiaOutput will be something like:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] [10de:1c02] (rev a1) 01:00.1 Audio device [0403]: NVIDIA Corporation GP106 High Definition Audio Controller [10de:10f0] (rev a1)Use those IDs in
/etc/modprobe.d/vfio.conf:options vfio-pci ids=10de:1c02,10de:10f0Then regenerate initramfs again:
update-initramfs -u
⚙️ STEP 5: Configure the VM for GPU Passthrough
Assuming your Ubuntu Server VM is already created, shut it down before editing its config.
Edit VM config:
qm edit <VMID>Add the following lines:
hostpci0: 01:00.0,pcie=1,x-vga=1If you want to also passthrough the audio component:
hostpci0: 01:00.0;01:00.1,pcie=1,x-vga=1Replace
<VMID>with the actual ID of your Ubuntu VM.
📦 STEP 6: Set Machine Type to Q35
Make sure your VM uses the Q35 machine type (needed for PCIe):
In the VM config:
machine: q35Also ensure:
cpu: EPYC # or another modern CPU model that supports required features
🔄 STEP 7: Boot the VM and Install GPU Drivers
Start the VM:
qm start <VMID>Once booted, install the appropriate NVIDIA drivers inside the guest OS.
For Ubuntu:
sudo apt update sudo apt install nvidia-driver-535Or download from https://www.nvidia.com/Download/index.aspx
Reboot the guest after installation.
🧪 OPTIONAL: Verify GPU Access in Guest
Inside the VM:
nvidia-smiIf it shows the GTX 1060, then the GPU passthrough was successful!
📌 TIPS & NOTES
- If you're planning to passthrough this card for Windows gaming, consider using a Windows VM instead of Ubuntu.
- Make sure the UEFI settings are correct if you're using OVMF firmware.
- If you encounter issues with display output, try connecting a monitor directly to the GPU during boot.
- Some users disable Secure Boot and Fast Boot in BIOS for better compatibility.
❓Still Having Issues?
Let me know:
- Output of
lspci -v(especially around your GPU) - Whether you're using BIOS or UEFI for the VM
- If you're trying to pass it to a Linux or Windows VM
I’ll help you debug further.
Would you like a script to automate some of this?
- User
Can you add explanations as to why and what the purpose of each step is please
Assistant
Absolutely! Here's the same step-by-step guide, but with detailed explanations for each part. This will help you understand not just what to do, but why you're doing it and how everything fits together.
🧠 GPU Passthrough Guide with Proxmox (Explained)
This guide will walk you through how to pass through your NVIDIA GTX 1060 3GB graphics card to a Proxmox VM, and explain what each step does so you understand the process.
✅ PREREQUISITES
What you need:
- A GPU (in this case, NVIDIA GTX 1060 3GB)
- A motherboard that supports IOMMU/VT-d (Intel) or AMD-Vi (AMD)
- A CPU that supports virtualization (Intel VT-x and VT-d)
- Proxmox VE installed on your system
- A working VM (Ubuntu in your case)
Why it's important:
GPU passthrough allows a virtual machine (VM) to directly access and control the GPU, bypassing the host OS. This is essential for tasks like gaming, rendering, or machine learning inside a VM.
🔧 STEP 1: Enable IOMMU in BIOS
What to do:
- Reboot your machine and enter BIOS (usually by pressing Delete or F2).
- Enable:
- Intel Virtualization Technology (VT-x)
- Intel VT-d (IOMMU)
Why?
- VT-x allows the CPU to run virtual machines efficiently.
- VT-d / IOMMU allows devices (like your GPU) to be directly assigned to a VM.
- Without IOMMU enabled, PCIe device passthrough (like a GPU) won't work.
🐧 STEP 2: Enable IOMMU in Proxmox Kernel
What to do:
Edit GRUB config:
nano /etc/default/grubAdd this to
GRUB_CMDLINE_LINUX:intel_iommu=on iommu=ptThen run:
update-grubWhy?
- This tells the Linux kernel to enable IOMMU support at boot.
iommu=ptenables IOMMU pass-through mode, which improves performance and compatibility with VFIO drivers.
🛠️ STEP 3: Enable VFIO Kernel Module
What to do:
Create a config file:
echo "options vfio-pci ids=10de:1c02,10de:10f0" > /etc/modprobe.d/vfio.confAlso create a blacklist:
echo "blacklist nouveau" > /etc/modprobe.d/blacklist-nvidia.conf echo "blacklist nvidia" >> /etc/modprobe.d/blacklist-nvidia.confUpdate the kernel modules:
update-initramfs -uWhy?
- VFIO (Virtual Function I/O) is a driver that lets a VM directly access hardware like a GPU.
- We're telling the kernel to use
vfio-pciinstead of the host drivers (nouveauornvidia). - The
ids=...line tells the kernel to bind the NVIDIA GPU to thevfio-pcidriver.
🖥️ STEP 4: Identify GPU Device(s)
What to do:
Run:
lspci | grep -i nvidiaYou'll see something like:
01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] (rev a1) 01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)Then check the IDs:
lspci -nn | grep -i nvidiaYou'll see:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] [10de:1c02] (rev a1) 01:00.1 Audio device [0403]: NVIDIA Corporation GP106 High Definition Audio Controller [10de:10f0] (rev a1)Why?
- You need to know the PCIe address and vendor IDs to tell the kernel which devices to bind to
vfio-pci. 01:00.0is the GPU, and01:00.1is the audio controller that comes with the GPU. You should passthrough both.
⚙️ STEP 5: Configure the VM for GPU Passthrough
What to do:
Shut down your VM first.
Edit VM config:
qm edit <VMID>Add:
hostpci0: 01:00.0,pcie=1,x-vga=1Or if you want to passthrough both GPU and audio:
hostpci0: 01:00.0;01:00.1,pcie=1,x-vga=1Why?
hostpci0tells Proxmox to assign a host PCI device to the VM.x-vga=1tells QEMU that this is a VGA device, which is required for GPU passthrough.pcie=1ensures the device is passed through as a PCIe device, which is needed for modern GPUs.
📦 STEP 6: Set Machine Type to Q35
What to do:
In the same VM config file, set:
machine: q35Also ensure:
cpu: EPYCOr another modern CPU model.
Why?
- The Q35 machine type supports PCIe devices and is recommended for GPU passthrough.
- Older machine types like
i440fxdo not support PCIe properly.
🔄 STEP 7: Boot the VM and Install GPU Drivers
What to do:
Start the VM:
qm start <VMID>Inside the Ubuntu VM:
sudo apt update sudo apt install nvidia-driver-535Or download from NVIDIA Driver Download
Then reboot the VM.
Why?
- The guest OS needs the correct drivers to communicate with the GPU.
- Even though the GPU is physically connected to the host, it's now "owned" by the VM, so the VM needs its own drivers.
🧪 OPTIONAL: Verify GPU Access in Guest
What to do:
Inside the VM:
nvidia-smiIf you see the GTX 1060 listed, then GPU passthrough is working!
Why?
nvidia-smichecks for NVIDIA GPUs and shows driver status.- If it works here, it means the VM is successfully using the GPU.
📌 TIPS & NOTES
- If you're using a Windows VM, install the Windows NVIDIA drivers from the official site.
- You may need to connect a monitor to the GPU during boot to get display output.
- Disable Secure Boot and Fast Boot in BIOS if you're having issues.
- If you're using OVMF (UEFI), make sure it's properly configured.
❓Still Having Issues?
Let me know:
- Output of
lspci -v(especially around your GPU) - Whether you're using BIOS or UEFI for the VM
- If you're trying to pass it to a Linux or Windows VM
I’ll help you debug further.
Would you like a script version of this guide to automate some steps?
- User
after step 7 I can no longer connect to the VM. I see 'Failed to connect to server' when I try in the proxmox vm concole
Assistant
That error — "Failed to connect to server" — when trying to access the VM console in Proxmox usually means one of two things:
- The VM is not running, or
- The VM is running, but the SPICE/VNC display server isn't working properly, especially after GPU passthrough.
Since you mentioned this happened after Step 7 (booting the VM and installing NVIDIA drivers), it's very likely related to GPU passthrough interfering with the built-in QEMU display device, which is used by the Proxmox web console.
🔍 Let’s Break Down What Happened
When you pass through a real GPU (like your GTX 1060) to the VM:
- The VM no longer uses the emulated graphics card (which is what the Proxmox web console uses via SPICE or VNC).
- Instead, the VM tries to use the real GPU for display output.
- If there's no monitor connected to that GPU, or if the GPU hasn’t initialized correctly, no graphical output will be available.
- That’s why the Proxmox console can't connect — it's expecting a display server (VNC/SPICE), which is now gone or unresponsive.
This is completely normal behavior when doing full GPU passthrough without keeping an emulated GPU for the console.
✅ SOLUTIONS & WORKAROUNDS
Here are several options depending on how you want to manage the VM:
✅ OPTION 1: Use SSH to Access the VM (Recommended)
You probably still have network connectivity, so just connect via SSH:
ssh username@vm-ip-addressIf you don't know the IP address yet:
-
Check the VM logs in Proxmox:
qm monitor <VMID>Then type:
info network -
Or check DHCP leases from your router.
Once inside via SSH, you can verify:
- Whether the VM is actually running
- Whether the GPU is recognized (
lspci,nvidia-smiif installed) - Whether there were any boot issues (
dmesg,/var/log/Xorg.0.logif X is running)
🔄 OPTION 2: Re-enable Emulated Display Temporarily
If you need to use the Proxmox web console, you can temporarily add back an emulated GPU.
Edit the VM config:
qm edit <VMID>Add these lines:
vga: qxl display: spiceAlso ensure:
machine: q35Then restart the VM:
qm stop <VMID> qm start <VMID>Now you should be able to reconnect via the Proxmox console again.
⚠️ Note: This may cause conflicts with your real GPU passthrough if not handled carefully. It's mostly useful for debugging.
💡 OPTION 3: Connect a Monitor to the GPU
If you're trying to run a GUI desktop (e.g., Ubuntu Desktop) in the VM and want to see the output:
- Plug a monitor into the GTX 1060's HDMI or DisplayPort output
- Reboot the VM
- You should see the login screen or desktop appear
This is how most people use GPU passthrough — they switch monitors between host and guest, or dedicate a second monitor to the VM.
🧪 OPTION 4: Verify the VM is Actually Running
Sometimes, the VM might crash or fail to boot after GPU passthrough due to driver issues.
Check its status:
qm status <VMID>Or view log messages:
journalctl -u qemu-server@<VMID>.serviceOr inspect the VM's serial console:
qm terminal <VMID>(Only works if serial console is configured in the VM OS)
🛠️ BONUS: Configure Serial Console (for future troubleshooting)
To avoid losing access altogether, set up a serial console in your VM:
In VM config:
qm edit <VMID>Add:
serial0: socketThen in the VM's GRUB config:
sudo nano /etc/default/grubUpdate:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash console=tty1 console=ttyS0,115200n8"Update GRUB:
sudo update-grubNow you can always access the VM via:
qm terminal <VMID>Even if graphical output is unavailable.
📌 Summary
Issue Cause Fix Can't connect via Proxmox Web Console VM using real GPU instead of emulated one Use SSH or serial console No display output at all Monitor not connected to passed-through GPU Connect monitor to GPU directly VM fails to boot Driver issue or incorrect GPU binding Double-check vfio-pcisetup and VM configWant to keep console access Need emulated display Add vga: qxlanddisplay: spice
❓Need Help Debugging?
Let me know:
- Did you try SSH? Was the VM reachable?
- Is there a monitor connected to the GPU?
- Are you running a GUI (Ubuntu Desktop) or headless (Ubuntu Server)?
- Output of
qm config <VMID> - Output of
lspci -von the host
I’ll help you get back online and fully using your GPU-passthrough VM.
Would you like a script to automate some of these fixes?
- User
Since following the guide the vm no longer has an ip address
Assistant
Thanks for the update — if your VM is no longer getting an IP address after GPU passthrough, this typically means something went wrong during boot or the kernel is crashing due to GPU driver issues.
Let’s go through a step-by-step troubleshooting guide, explaining what could be happening and how to fix it.
🧠 Understanding What Might Be Happening
When you pass through a real GPU (like your NVIDIA GTX 1060) to a VM:
- The VM no longer uses the emulated graphics device.
- If the GPU isn’t properly bound to
vfio-pci, or if the NVIDIA drivers cause a conflict, the VM may fail to boot properly. - If the VM fails to fully boot, services like networking won’t start → no IP address assigned.
This can happen even with a headless server VM — because the kernel might panic when trying to initialize the GPU via VFIO or NVIDIA drivers.
🔍 Step-by-Step Troubleshooting Guide
✅ 1. Check if the VM is Actually Running
Run in Proxmox host shell:
qm status <VMID>You should see something like:
status: runningIf it's not running, start it:
qm start <VMID>Then check the logs:
qm log <VMID>Look for any errors around booting or device initialization.
📜 2. View the VM's Serial Console Output
This is the most reliable way to see what’s happening during boot even without network or GUI.
In Proxmox host:
qm terminal <VMID>⚠️ This only works if you've configured a serial console inside the VM OS.
If you haven't already done that, skip ahead to Section 6 to set it up now.
🧪 3. Temporarily Disable GPU Passthrough
To isolate whether the issue is caused by GPU passthrough:
Edit VM config:
qm edit <VMID>Remove or comment out the line:
hostpci0: ...Save and restart the VM:
qm stop <VMID> qm start <VMID>Now wait a few moments and check if it gets an IP again.
Check from Proxmox host:
arp -a | grep :<VM-MAC>Or look in
/var/lib/misc/dnsmasq.leases(if using internal bridge with DHCP):cat /var/lib/misc/dnsmasq.leasesIf it gets an IP now → the problem is definitely related to GPU passthrough.
🛠️ 4. Ensure the GPU Is Properly Bound to
vfio-pciFrom the Proxmox host, run:
lspci -vFind your GPU:
01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] (rev a1) Subsystem: ... some vendor Flags: bus master, fast devsel, latency 0, I/O ports at 3000 [size=128] Memory at dc000000 (32-bit, non-prefetchable) [size=16M] Memory at b0000000 (64-bit, prefetchable) [size=256M] Capabilities: [60] Power Management version 3 Capabilities: [68] MSI: Enable- Count=1/1 Maskable- Capabilities: [78] Express Endpoint, MSI 00 Kernel driver in use: vfio-pci Kernel modules: nvidiafb, nouveauMake sure you see:
Kernel driver in use: vfio-pciIf it says
nouveauor nothing, then the GPU is not bound correctly.To bind it manually:
echo -n "0000:01:00.0" > /sys/bus/pci/drivers/vfio-pci/bind echo -n "0000:01:00.1" > /sys/bus/pci/drivers/vfio-pci/bindIf this gives an error, double-check:
- That you blacklisted
nouveauandnvidia - That
vfio-pciis loaded (lsmod | grep vfio) - That
iommu=pt intel_iommu=onare in GRUB config - That IOMMU groups are sane (see below)
🧬 5. Check for IOMMU Group Issues
Sometimes devices cannot be passed through if they're not isolated in their own IOMMU group.
Run:
sudo apt install virt-manager libvirt-daemon-systemThen:
sudo virt-host-validateAnd also:
lspci -vUse this tool (or manual inspection) to verify whether your GPU is in a clean IOMMU group.
💡 You want each function of the GPU (e.g.,
01:00.0and01:00.1) to be in the same IOMMU group and not shared with other devices.If they're grouped with audio or other onboard devices, you may need to passthrough those too.
📞 6. Set Up Serial Console (for Future Debugging)
Even if the VM doesn’t have a display or network, the serial console lets you see boot messages.
In VM config:
qm edit <VMID>Add:
serial0: socketInside the Ubuntu guest, do:
sudo nano /etc/default/grubUpdate:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash console=tty1 console=ttyS0,115200n8"Update GRUB:
sudo update-grubNow you can access the serial output:
qm terminal <VMID>This will help you see exactly where the boot process is failing.
📋 Summary Checklist
Step Action Purpose 1 qm status <VMID>Confirm VM is actually running 2 qm terminal <VMID>See boot/log messages via serial console 3 Remove GPU passthrough line Test if VM boots normally without GPU 4 lspci -vCheck if GPU is bound to vfio-pci5 Manually bind GPU Force binding to correct driver 6 Set up serial console Allow debugging even without network 7 virt-host-validateCheck for IOMMU issues
🛎️ Need Help Right Now?
If you'd like, I can walk you through checking each step one by one — just paste the output of these commands:
qm status <VMID>qm config <VMID>lspci -von the Proxmox host (around your GPU)cat /etc/modprobe.d/vfio.confcat /etc/default/grubupdate-initramfs -uoutput
With that info, I can give you exact steps tailored to your setup.
Would you like to continue troubleshooting together?
- User
neither of the files listed in step 2 exist on the vm
Assistant
Thank you for the clarification — when you said "neither of the files listed in step 2 exist on the VM", I assume you're referring to:
/etc/modprobe.d/vfio.conf/etc/modprobe.d/blacklist-nvidia.conf
And that you're checking these inside the Ubuntu VM, not the Proxmox host.
🧠 Important Clarification
These configuration files (
vfio.conf,blacklist-nvidia.conf) are part of the Proxmox host setup, not the guest VM.They control how the host kernel binds PCIe devices like your GPU before they are passed through to the VM. These settings have no effect inside the VM itself, because by then the device has already been assigned.
✅ So it's perfectly normal and expected that those files do not exist inside the VM.
You only need them on the Proxmox host, where the GPU is physically located and being managed from.
🔁 Recap: Where Things Belong
File / Setting Location Purpose vfio.confProxmox host ( /etc/modprobe.d/)Tells the host to bind GPU to vfio-pciblacklist-nvidia.confProxmox host ( /etc/modprobe.d/)Prevents host drivers from claiming GPU GRUB config ( intel_iommu=on)Proxmox host ( /etc/default/grub)Enables IOMMU support at boot NVIDIA drivers Guest VM Used by the VM to talk to the GPU after passthrough
🛠️ What You Should Be Checking Inside the VM
Since you're inside the Ubuntu VM, here’s what you should check instead:
1. Is the GPU visible inside the VM?
Run:
lspci | grep -i nvidiaIf you see output like:
0001:01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB]...Then the GPU was successfully passed through!
2. Are the NVIDIA drivers installed?
Check with:
nvidia-smiIf it runs and shows your GPU, then everything is working!
If it says
command not found, install the drivers:sudo apt update sudo apt install nvidia-driver-535Then reboot:
sudo reboot
3. Can you access the VM via SSH or serial console?
Try connecting from another machine:
ssh username@vm-ip-addressOr if you've set up a serial console (as described earlier):
qm terminal <VMID>This will help you troubleshoot even if no GUI or network display is available.
📋 Summary
Question Answer Should vfio.confandblacklist-nvidia.confexist inside the VM?❌ No — they belong on the Proxmox host, not the guest VM How do I know the GPU is passed through? Run lspciinside the VM — you should see your NVIDIA GPU listedHow do I use the GPU inside the VM? Install the NVIDIA drivers inside the VM ( nvidia-driver-535)How do I debug the VM if it doesn’t get an IP? Use qm terminal <VMID>or SSH if available
🧪 Need Help Now?
Please run these commands inside the Ubuntu VM and paste the output:
lspci | grep -i nvidiaip a(to check for IP address)systemctl status networkingorjournalctl -b(to check for boot/network issues)
Also tell me:
- Are you running a GUI (like Ubuntu Desktop), or just server?
- Did you try SSH or serial console?
I’ll help you get back online and confirm whether the GPU is working inside the VM.
Would you like to continue troubleshooting together right now?
- User
y
Assistant
Great! Let's continue troubleshooting together. Please do the following inside your Ubuntu VM (via SSH or serial console if available):
🔧 Run These Commands and Paste the Output
-
Check if the GPU is visible inside the VM:
lspci | grep -i nvidia -
Check network status / IP address:
ip a -
Check system logs for boot issues:
journalctl -bJust paste the last 10–15 lines if it's too long.
-
Check networking service status:
systemctl status networking -
(Optional) If you tried installing NVIDIA drivers, check for errors:
dmesg | grep -i nvidia
📝 Also Tell Me:
- Is this an Ubuntu Server or Ubuntu Desktop VM?
- Did you install the NVIDIA driver inside the VM yet?
- Can you access the VM via SSH or serial console (
qm terminal <VMID>), or are you completely locked out?
Once I have that info, I’ll help you:
- Confirm whether the GPU is correctly passed through
- Fix any networking issues
- Ensure the VM boots properly with GPU passthrough
Ready when you are! 👇
-
- User
We now have the vm IP address back. Now I need to add the GPU again
Assistant
Great news that you've got the VM IP address back — that means the VM is booting and networking is working again.
Now, let's re-add the GPU passthrough safely and make sure the VM still boots and remains accessible.
🛠️ Step-by-Step: Re-Add GPU Passthrough Safely
We're going to:
- Make sure the GPU is still bound to
vfio-pcion the Proxmox host - Add the GPU back to the VM config
- Boot the VM and verify GPU is visible and working
- Ensure networking and SSH remain accessible
🔍 Step 1: Confirm GPU Is Bound to
vfio-pci(On Proxmox Host)Run on Proxmox host:
lspci -vLook for your GPU, e.g.:
01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB]... Kernel driver in use: vfio-pciIf it says
nouveauor no driver is listed, re-bind it:echo -n "0000:01:00.0" > /sys/bus/pci/drivers/vfio-pci/bind echo -n "0000:01:00.1" > /sys/bus/pci/drivers/vfio-pci/bind⚠️ Replace
01:00.0and01:00.1with your actual GPU PCIe addresses.
🧩 Step 2: Add GPU Back to VM Config
Edit your VM config:
qm edit <VMID>Add this line (or re-add it if you removed it):
hostpci0: 01:00.0;01:00.1,pcie=1,x-vga=1Or just the GPU (without audio):
hostpci0: 01:00.0,pcie=1,x-vga=1Also ensure:
machine: q35This ensures PCIe support for the GPU.
🚀 Step 3: Start the VM and Check for IP
Start the VM:
qm start <VMID>Check for IP address:
qm guest cmd <VMID> network-get-interfacesOr use:
arp -a | grep :<VM-MAC>Or check:
cat /var/lib/misc/dnsmasq.leasesIf the VM boots and gets an IP again — great!
🖥️ Step 4: Check GPU Inside the VM
SSH into the VM:
ssh username@vm-ipThen check:
lspci | grep -i nvidiaYou should see something like:
01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB]...Now install the NVIDIA driver inside the VM (if not already):
sudo apt update sudo apt install nvidia-driver-535Then reboot the VM:
sudo rebootAfter reboot, check:
nvidia-smiIf it shows your GPU, you're done! 🎉
🧪 Optional: Keep Console Access
To keep access even if GUI breaks:
Add this to VM config:
vga: qxl display: spiceThis gives you a fallback emulated GPU for the Proxmox console.
You can also keep the serial console enabled:
serial0: socketInside the VM:
sudo nano /etc/default/grubAdd serial console support:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash console=tty1 console=ttyS0,115200n8"Then:
sudo update-grubNow you can always access the VM via:
qm terminal <VMID>
✅ Summary Checklist
Task Done? GPU bound to vfio-pcion host✅ VM config has hostpci0: 01:00.0...✅ VM boots and gets IP ✅ GPU visible via lspciinside VM✅ NVIDIA drivers installed ( nvidia-smiworks)✅ Serial console or fallback display enabled (optional) ✅
📞 Final Check
Let me know:
- Whether the VM got an IP after booting with GPU
- Output of
lspci | grep -i nvidiainside the VM - Output of
nvidia-smiafter driver install
If everything works, you're all set! If not, we can debug further together.
Would you like to continue with this step-by-step verification now?
- Make sure the GPU is still bound to
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.