You’ve finally got the Hailo-8 M.2 module in your hands. You’ve seen the benchmarks: 26 TOPS of AI inference power, enough to make a Google Coral look like a calculator, and you’re ready to let Frigate or your custom computer vision stack loose on your Proxmox server. But then reality hits. You realize that unlike a standard GPU or a NIC, the Hailo-8 doesn’t just “show up” in an LXC container. You’re staring at a wall of “Permission Denied” errors and cryptic kernel logs, wondering if you should have just stuck with a slower, simpler USB accelerator.
I’ve been in that exact spot, usually at 2:00 AM, wondering why a device that shows up perfectly in lspci refuses to cooperate with a container. The frustration stems from a fundamental misunderstanding of how Proxmox LXC handles non-standard PCIe hardware. Because an LXC shares the host’s kernel, you aren’t passing through a “device” in the virtualized sense; you are mapping character device nodes and managing cgroup permissions. It’s a surgical operation, not a sledgehammer approach. If you miss one step in the driver compilation or the device node mapping, the container remains blind to the hardware, and your CPU usage stays pegged at 100% while your expensive AI module sits idle and cold.
To pass a Hailo-8 to an LXC, you must install the hailo-pci DKMS driver on the Proxmox host first. Then, identify the device’s major/minor numbers via ‘ls -l /dev/hailo0’ and manually map them in the LXC configuration file using cgroup2 allow rules and bind mounts. This enables high-performance inference without compromising host security.
Why Does My Hailo-8 Fail to Initialize in Proxmox?
The most common trap I see engineers fall into is treating the Hailo-8 like a standard PCIe device that can be toggled via the Proxmox GUI. In a Virtual Machine (VM), you can use IOMMU to pass the entire PCIe address to the guest. But in an LXC, the container is just a fancy process running on your host’s kernel. If the host doesn’t have the driver, the container can’t “see” the hardware. If the host has the driver but hasn’t explicitly shared the device node (/dev/hailo0), the container is blocked by the Linux kernel’s security layers.
The “Costly Trap” here is attempting to use a privileged container to solve permission issues. While it might seem easier, it creates a massive security hole and often still fails because the device nodes aren’t automatically created inside the container’s /dev directory. The nuance lies in the transition from Proxmox 7 to Proxmox 8, which moved from cgroup1 to cgroup2. Older tutorials will tell you to use lxc.cgroup.devices.allow, but on a modern Proxmox 8.x system, that command will be silently ignored, leaving you scratching your head while the container fails to start.
| Accelerator Type | Proxmox Passthrough Method | Complexity Level | Performance (TOPS) | Primary Bottleneck |
|---|---|---|---|---|
| Google Coral (USB) | USB Device Mapping | Low | 4 TOPS | USB Bus Latency |
| Google Coral (M.2) | Apex Driver + Node Map | Medium | 4 TOPS | Low TOPS Ceiling |
| Hailo-8 M.2 | DKMS + cgroup2 Map | High | 26 TOPS | Driver/Kernel Sync |
| NVIDIA T4 / A2 | NVIDIA-Container-Toolkit | Medium-High | Varies (High) | Power/Heat/Driver Bloat |
How to Prepare the Proxmox Host for Hailo-8
Before we even touch the LXC container, the Proxmox host must be the “master” of the hardware. This means the host needs to know exactly how to talk to the Hailo-8 silicon. If you run lspci -nnk | grep -i hailo and don’t see a kernel driver in use, you’re dead in the water.
Step one is ensuring your host has the necessary build tools. Proxmox is based on Debian, but it uses its own kernel. You must install the pve-headers that match your running kernel exactly. Run apt update && apt install pve-headers-$(uname -r) build-essential dkms.
Next, you need the Hailo software repository. While you could compile the driver from source, using the official Debian repo is the professional way to ensure that when you update your Proxmox kernel, DKMS (Dynamic Kernel Module Support) automatically rebuilds the Hailo driver. Once the repo is added, install hailo-pci. After a reboot, verify the installation by checking /dev/hailo0. If that file exists, the host is ready. If it doesn’t, check dmesg | grep hailo to see if the firmware failed to load or if there’s a PCIe training error.
Mapping the Device: The LXC Configuration Playbook
Now we move to the precision work. We need to tell Proxmox to let a specific LXC container reach through the abstraction layer and touch /dev/hailo0. This requires two pieces of information: the Major and Minor numbers of the device node.
Run ls -l /dev/hailo0 on your host. You’ll see something like crw-rw---- 1 root hailo 235, 0 .... In this example, 235 is the major number and 0 is the minor number. These numbers are the “address” we use in the cgroup configuration.
Open your LXC configuration file on the host, located at /etc/pve/lxc/ID.conf (replace ID with your container number). You need to append the following lines:
lxc.cgroup2.devices.allow: c 235:* rwm
lxc.mount.entry: /dev/hailo0 dev/hailo0 none bind,create=file 0 0
Let’s break down what this actually does. The first line tells the kernel’s control group (cgroup2) that this container has permission to read, write, and mknod on character devices with major number 235. The second line physically maps the host’s /dev/hailo0 into the container’s /dev/hailo0. The create=file flag is a lifesaver—it tells Proxmox to create an empty placeholder file in the container if one doesn’t exist, so the bind mount has a target to latch onto.
Setting Up the Container Environment
With the hardware mapped, the container still needs the “brains” to use it. You don’t need the full driver inside the container (remember, it shares the host’s kernel), but you do need the HailoRT (Hailo Runtime).
Inside your LXC (assuming it’s Debian or Ubuntu-based), add the Hailo repository again and install hailort. Once installed, the ultimate test is running hailortcli scan. If it returns the device ID and PCIe address, you’ve succeeded. If it says “No devices found,” you likely have a permission issue.
A common “gotcha” here is group membership. On the host, /dev/hailo0 is often owned by a specific group (like ‘hailo’ or ‘render’). Inside the container, the user running your application (like the ‘frigate’ user) must have permission to read/write to that node. I usually solve this by creating a group inside the LXC with the same GID as the host’s hailo group and adding the application user to it.
The 4:00 PM Resolution: A Final Diagnostic Checklist
Before you call it a day and let your AI workloads run, go through this checklist to ensure stability. Hardware passthrough is notoriously brittle across reboots.
- Cold Reboot Survival: Reboot the entire Proxmox host. Does
/dev/hailo0reappear on the host? Does the LXC start automatically and still see the device? If not, check ifhailo-pciis in/etc/modules. - Permission Persistence: Check if the major/minor numbers changed. On some systems, dynamic device allocation can shift these numbers. If they change, your LXC config will break. You can fix this by using a UDEV rule on the host to force a persistent symlink or a specific major/minor range.
- Inference Benchmarking: Run
hailortcli run benchmark.hef. Compare the results to the rated 26 TOPS. If you’re seeing significantly lower performance, check your PCIe link speed indmesg. The Hailo-8 needs a PCIe Gen 3.0 x4 or x2 link to really shine; putting it in a Gen 2.0 slot will bottleneck your inference speed. - Resource Contention: If you plan to run multiple containers using the same Hailo-8, remember that the HailoRT handles the scheduling. Unlike a GPU with vGPU profiles, the Hailo-8 is generally accessed as a single resource. Ensure your applications aren’t fighting for exclusive locks on the device node.
Frequently Asked Questions
Can I use the Hailo-8 in an unprivileged LXC container?
Yes, and you should. By using cgroup2 device allow rules and bind mounts in the LXC configuration, you can grant the container access to the specific Hailo device node without giving the container root-level access to your host’s kernel or other hardware.
Why does ‘hailortcli scan’ show no devices inside the LXC?
This is usually due to missing device node permissions. Ensure you have added ‘lxc.cgroup2.devices.allow’ to your .conf file and that the user inside the LXC has read/write permissions for /dev/hailo0. Also, verify the host driver is actually loaded using ‘lsmod | grep hailo’.
Do I need to install the Hailo driver on both the host and the LXC?
No. You only install the kernel driver (hailo-pci) on the Proxmox host. Inside the LXC, you only install the HailoRT (Runtime) and the CLI tools. The container uses the host’s kernel driver to communicate with the hardware.
Kernel-level driver compilation enables low-overhead hardware passthrough. For Hailo-8 Proxmox container configurations, review our guide on Coral Dual Edge TPU PCIe: Linux Driver Kernel 6.x Fix.