Close Menu
    Facebook X (Twitter) Instagram
    Wifi PortalWifi Portal
    • Blogging
    • SEO & Digital Marketing
    • WiFi / Internet & Networking
    • Cybersecurity
    • Tech Tools & Mobile / Apps
    • Privacy & Online Earning
    Facebook X (Twitter) Instagram
    Wifi PortalWifi Portal
    Home»Tech Tools & Mobile / Apps»GPU passthrough to LXCs beats VMs in Proxmox, and it’s way simpler than you’d think
    Tech Tools & Mobile / Apps

    GPU passthrough to LXCs beats VMs in Proxmox, and it’s way simpler than you’d think

    adminBy adminMarch 26, 2026No Comments6 Mins Read
    Facebook Twitter LinkedIn Telegram Pinterest Tumblr Reddit WhatsApp Email
    GPU passthrough to LXCs beats VMs in Proxmox, and it's way simpler than you'd think
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Although virtual machines and containers work in entirely different ways, you might want to use both in your home lab. After all, virtual machines have better isolation provisions, making them ideal for dev tasks, nested containerization setups, makeshift storage servers, and other resource-heavy tasks where you need superior security provisions. Unfortunately, their resource-hogging tendencies make them less than ideal for minor self-hosting tasks, and that’s where lightweight containers come into the equation.

    Better yet, Proxmox natively supports LXCs, and you can even rely on community templates to spin up different services and distros inside containers. But unless you’re using your virtual machines for dev tasks or hosting private gaming clouds (which work surprisingly well, believe it or not), it’s a good idea to stick with Linux containers if you want to harness your graphics card in self-hosted apps.

    A bunch of VMs running on a Proxmox server

    Proxmox VE 9.1 can pull container images straight from Docker Hub, and it changes everything

    It may be an experimental feature, but it’s worth checking out if you’re a self-hosting enthusiast

    Unlike VMs, multiple LXCs can share the same graphics card simultaneously

    There are workarounds for VMs, but they’re not very accessible

    If you’re attempting to harness your graphics card on a virtual machine, you’ll have to blacklist it on the host machine and configure different variables to ensure only that specific VM can access it. But since GPU passthrough assigns the entire physical card to your virtual machine, you can’t use it on anything else until you close said VM. This exclusive access makes virtual machines a bit of a pain when you want to use the same GPU on different systems simultaneously.

    Technically, there are ways to solve this problem, but they’re too expensive (and somewhat tedious) to configure. Unless you’ve got the right enterprise hardware, you can remove vGPUs and SR-IOV-based sharing provisions out of the equation. Other than that, your only choice is to grab multiple graphics cards and hook them up to different VMs – which is far from realistic for most home labbers (including yours truly).

    With the right permissions, you can have a bunch of LXCs powered by a single GPU

    Benchmarking Ollama LLMs

    LXCs, on the other hand, share the kernel resources with the underlying Proxmox server. So, you don’t need to set up exclusive access on them when configuring GPU passthrough. As long as you’ve configured GPU drivers on the host system, LXCs can directly access them when you give them the right permissions. The best part? Since there’s no exclusive GPU lock mechanism on LXCs, you can use the same graphics card with multiple containers without looking into expensive workarounds.

    Throw in the lightweight nature of LXCs, and they’re perfect for self-hosting GPU-powered services. For example, if you’ve got Jellyfin and Ollama instances deployed on a server with a single GPU (or even an iGPU), you can let both FOSS utilities harness your graphics card’s processing capabilities in parallel tasks.

    A GTX 1080 Founders Edition GPU

    Nvidia stopped supporting my GPU, so I started self-hosting LLMs with it

    I self-support my gpu now because Nvidia won’t

    Passing a GPU to LXCs is fairly straightforward

    Especially compared to PCI passthrough on VMs

    Compared to configuring GPU passthrough on VMs manually, LXCs have a simple procedure. First, you’ll have to ensure the host machine has the proper drivers installed, and this process depends entirely on your GPU manufacturer. In most cases, it’s identical to setting up your GPU on a CLI Debian distro. But if you’re using an old and discontinued graphics card as I do, you’ll want to select the correct drivers from your manufacturer. You might also need the build-essential, make, and software-properties-common packages set up before you install the GPU drivers, so feel free to use the APT package manager to install them.

    Once that’s done, you’ll need the device number associated with your GPU components. I’ve got Nvidia graphics cards, and the command for checking the GPU details is ls -l /dev/nvidia* for Team Green’s offerings. You can add these variables using the Resources tab on your LXC, but I prefer passing the GPU via config files. On the Proxmox node, you can find these files inside the /etc/pve/lxc directory, and the number associated with each .conf document will correspond to the ID of your LXCs. For my Nvidia-powered rig, I tend to add the following lines at the bottom of the file, but you might want to change the number after the lxc.cgroup2.devices.allow: c argument to match the GPU components from the output of the ls -l /dev/nvidia* command.

    lxc.cgroup2.devices.allow: c 195:* rwm
    lxc.cgroup2.devices.allow: c 235:* rwm
    lxc.cgroup2.devices.allow: c 237:* rwm
    lxc.mount.entry: /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
    lxc.mount.entry: /dev/nvidiactl dev/nvidiactl none bind,optional,create=file
    lxc.mount.entry: /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
    lxc.mount.entry: /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file
    lxc.mount.entry: /dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file

    Then, you can just install the graphics card on the LXC the same way as you did on the host. Just remember to add the –-no-kernel-modules parameter at the end when you’re on Nvidia cards; otherwise, the installation process will fail. If you’ve followed everything correctly, the LXC should be able to detect your GPU.

    Switching between GPU passthrough on LXCs and VMs is a hassle

    But it’s still doable if you’re willing to modify config files time and again

    Downloading Steam games on a Proxmox-powered Windows 11 VM

    Let’s say you’ve got a bunch of LXCs accessing a graphics card, but you also want to use it occasionally in a VM or two. Although simultaneous access is out of the question, you can manually tweak the config files every time you need to switch your GPU passthrough setup from a VM to your LXC collection. I configured the GPU passthrough for my dev VM after already using my GTX 1080 with my LXCs, which caused the virtual machine to instantly recognize the graphics card and prevented the containers from accessing it.

    The only tweak I need to pull off when I want to restore GPU access back to my LXCs is getting rid of the contents of the /etc/modprobe.d/vfio.conf file. I typically leave the VFIO modules and other settings be, but you might also want to remove the variables responsible for blacklisting the graphics card on the host from the /etc/modprobe.d/blacklist.conf file.

    Beats GPU LXCs passthrough Proxmox simpler VMs youd
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email
    Previous ArticleData center poaching adds to staffing crisis
    Next Article What It Is, How It Works, and What It Means for SEO
    admin
    • Website

    Related Posts

    Anker’s ultra-compact 45W charger with a screen drops to its best price ever

    April 17, 2026

    Mysterious ‘Pixel Glow’ notification tool may involve new hardware

    April 17, 2026

    The New Google Pixel 10a Is Already $50 Off

    April 17, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Search Blog
    About
    About

    At WifiPortal.tech, we share simple, easy-to-follow guides on cybersecurity, online privacy, and digital opportunities. Our goal is to help everyday users browse safely, protect personal data, and explore smart ways to earn online. Whether you’re new to the digital world or looking to strengthen your online knowledge, our content is here to keep you informed and secure.

    Trending Blogs

    Your AI Visibility Strategy Doesn’t Work Outside English

    April 17, 2026

    Anker’s ultra-compact 45W charger with a screen drops to its best price ever

    April 17, 2026

    Apache ActiveMQ CVE-2026-34197 Added to CISA KEV Amid Active Exploitation

    April 17, 2026

    Mysterious ‘Pixel Glow’ notification tool may involve new hardware

    April 17, 2026
    Categories
    • Blogging (63)
    • Cybersecurity (1,358)
    • Privacy & Online Earning (170)
    • SEO & Digital Marketing (834)
    • Tech Tools & Mobile / Apps (1,624)
    • WiFi / Internet & Networking (227)

    Subscribe to Updates

    Stay updated with the latest tips on cybersecurity, online privacy, and digital opportunities straight to your inbox.

    WifiPortal.tech is a blogging platform focused on cybersecurity, online privacy, and digital opportunities. We share easy-to-follow guides, tips, and resources to help you stay safe online and explore new ways of working in the digital world.

    Our Picks

    Your AI Visibility Strategy Doesn’t Work Outside English

    April 17, 2026

    Anker’s ultra-compact 45W charger with a screen drops to its best price ever

    April 17, 2026

    Apache ActiveMQ CVE-2026-34197 Added to CISA KEV Amid Active Exploitation

    April 17, 2026
    Most Popular
    • Your AI Visibility Strategy Doesn’t Work Outside English
    • Anker’s ultra-compact 45W charger with a screen drops to its best price ever
    • Apache ActiveMQ CVE-2026-34197 Added to CISA KEV Amid Active Exploitation
    • Mysterious ‘Pixel Glow’ notification tool may involve new hardware
    • NIST limits vulnerability analysis as CVE backlog swells
    • Google AI Mode in Chrome now lets you search deeper with fewer tabs
    • The New Google Pixel 10a Is Already $50 Off
    • Operation PowerOFF identifies 75k DDoS users, takes down 53 domains
    © 2026 WifiPortal.tech. Designed by WifiPortal.tech.
    • Home
    • About Us
    • Contact Us
    • Privacy Policy
    • Terms and Conditions
    • Disclaimer

    Type above and press Enter to search. Press Esc to cancel.