惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Recent Announcements
Recent Announcements
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
News | PayPal Newsroom
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
S
Security @ Cisco Blogs
K
Kaspersky official blog
A
Arctic Wolf
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Project Zero
Project Zero
L
LINUX DO - 最新话题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Last Watchdog
The Last Watchdog
T
The Exploit Database - CXSecurity.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Security Archives - TechRepublic
Security Archives - TechRepublic
V
V2EX
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
F
Full Disclosure
I
Intezer
Schneier on Security
Schneier on Security
AWS News Blog
AWS News Blog
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 聂微东
M
MIT News - Artificial intelligence
P
Privacy & Cybersecurity Law Blog
Attack and Defense Labs
Attack and Defense Labs
量子位
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI
Google Online Security Blog
Google Online Security Blog
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
Microsoft Security Blog
Microsoft Security Blog
Scott Helme
Scott Helme
C
Check Point Blog
N
Netflix TechBlog - Medium
博客园 - Franky
SecWiki News
SecWiki News
Know Your Adversary
Know Your Adversary
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
S
Securelist

Proxmox Support Forum

[SOLVED] - Github Auth for Mirrors-Kernel Repo? [Automation] Mass migration tool for MS Win11/Server Proxmox GUI hang - not response is it possible to reject or quarantine spam based on conditions I set ? The PVENode task list in PVE9 is partially obscured due to the terminal font being too large. About 100% error reporting due to pveproxy.service hooks Kubernetes overlay networking breaks when upgrading from PVE 9.1 to PVE 9.2.3 Zentraler Speicher No space left on device Combine datastore and direct file archival to tape Kernel panic VFS: Unable to mount root fs on unknown-block (0,0) sobald ein 7.x Kernel verwendet wird. How to migrate disk of a VM from one ZFS to another Windows Server 2025 fails to boot after PVE 9.2 / Linux 7.0 Kernel upgrade Cannot Install Proxmox on T610 Poweredge with H700 PERC card sdn Config. gateway not reachable How to safely change domain/FQDN? Welche Filterquote erreicht ihr? NFS Share status unknown on 2 of 5 nodes Can't connect to PVE9 consoles [solved] Can't connect to PVE9 consoles [solved] [SOLVED] - Use secondary network for PVE commands Created cluster, one node storage gone BUG: proxmox mail gateway FROM = null bypass spam filtering Moving existing PBS from VMWare workstation to PVE cluster Does eBGP SDN fabric support external peering? Bug: PDM 1.1 not recognizing valid license status Proxmox GUI hang - not response PVE crashes unexpectedly Proxmox Backup Server 4.2 released! Advice ceph-osd crashes with kernel 6.17.2-1-pve on Dell system [META] Links on Proxmox Forum Website Hardwarer oder Software RAID Joining a cluster with already created guests VM PDM missing backup jobs from PVE / Log retention Remove VM.Monitor from all users/roles, PVE 9.2 Proxmox Freezing (new instalation) 9.2.2 - Intel 12700T No Web gui and random connection reset by peer [SOLVED] - i40e module for X710 Intel NIC Dutch Proxmox Day 2026 How pools use the space Corosync initiiert Reboot trotz Verfügbarkeit der Systeme Opt-in Linux 7.0 Kernel for Proxmox VE 9 available After PVE 8to9 upgrade, unable to check guest fs freeze status Problem with MegaRAID SAS3508 controller proxmox-kernel-7.0.2-6-pve failing network service Auto sync guest time after rollback of VM snapshot with RAM/state Broadcom BCM57504 (100G) bnxt_en TX timeout and NIC reset on Proxmox 8.1.5 — while BCM57414 (25G) works fine on same host QEMU 11.0 available on pve-test and pve-no-subscription as of now 350 MPM Solventless Lamination Machine for High-Speed Flexible Packaging Making sense of NVMe zfs and SMART errors [SOLVED] - PVE loses network connection after kernel upgrade to proxmox-kernel-7.0.0-3-pve [SOLVED] - Remove or reset cluster configuration. Proxmox 8.4.1 Fresh Install BCM57416 10G Ethernet Adapter Not Recognized PDM 1.1.1 unable to add AD realm with anonymous search [TUTORIAL] - Developer Workstation (Proxmox-VE 9) with cinnamon (LMDE7) SDN zone shows "pending" on peer nodes after node reboot (9.2.x) Cluster not quorate - extending auth key lifetime! Proxmox not rebooting properly (SOLVED) Proxmox 9 Stuck on loading initial ramdisk With new HA-Disarm Feature is there a Documentation for NUT Setup on Clusters? Proxmox 8.3 Installation Issue on ProLiant DL380 Gen9 Cluster networking setup LXC System images unavailable [SOLVED] - Fix: NVIDIA Drivers Failing after upgrade to Proxmox 9.2.2 (Kernel 7.0.2-6-pve) / NovaCore Conflict Install NUT directly on Proxmox VE and control guests from here driver usb for windows 7 System startup error and no network: Failed to start ifupdown2-pre.service - Helper to synchronize boot up for ifupdown. PBS backup space grow up constantly Proxmox Datacenter Manager 1.1 released! IPv4 not available in newly created VM Recommended Setup for Offsite Proxmox Backups? Hetzner Storage Box & Remote PBS Challenges duplicate, please delete this passthrought an USB device "by ID" to CT PDM Installer Freezes at 66% Tried PDM for the first time (version 1.1) - had issues PDM 1.1 automated install Suche Server-Provider für Proxmox connecting sdn to edge firewall SDN, IPAM & DHCP Migrating from read-only file system Ubuntu 26.04 installation fails for unknown reason Status Unbekannt nach Cluster Join Installing Proxmox Backup Server on Mac Mini (Late 2012) kernel 7.0 performance issue with zfs pools PVE becomes unreachable via ethernet but OS is running [SOLVED] - New 9.2 install - can't find 7.0.2-6-pve , not all the time [SOLVED] - Backup and dedupe a VM with LUKS Gibt es mit PVE 2.x ggf. Änderungen bei der RAM-Nutzung, bzw. deren Anzeige bei VMs? I need help for setting up backup solution Way more NAGware, very little functionality, bugs galore Root squashing virtiofsd with --uid-map Intel ixgbe Driver Update Fail Passkey Login (not 2FA) Roblox VM detection - can be overcome? [TUTORIAL] - ZFS-Autosnaptshot inkl. Rollback und Daten direkt recovern (Windows/Linux) How to stop PVE Kernel upgrade [SOLVED] - very long waiting to log in to lxc debian 11 ssh [TUTORIAL] - Configuring Fusion-Io (SanDisk) ioDrive, ioDrive2, ioScale and ioScale2 cards with Proxmox Increase maximum USB devices in vm.conf
Using Resource Mappings on LXCs
invalid@exam · 2025-07-05 · via Proxmox Support Forum

Hello,

I have successfully setup an USB Device in Resource Mappings. While there is documentation on attaching Resource Mapping devices to VMs, I cannot verify if it's possible to use them for LXCs and there is no way add the device via Device Passthrough in the GUI. I took a look around at /dev and while I can see the device itself, I do not see any /dev entry that matches the name I specified in Resource Mappings.

If there is no such thing, it would be nice to be able to use Resource Mappings with LXCs. It would allow the LXC to migrate between nodes with the device and a common path; very similar to the usecase of VMs. I see there is a /dev/mapper which seems like an excellent place to put the device, in the form of /dev/mapper/<type>/<name>.

Should I add udev rules as an alternative to having a consistent (across hosts) user-friendly way to add the device to the LXC?

I want to share some Ansible tasks I have written to accomplish synchronizing Resource Mappings to /dev entries:

Code:

- name: Get PCI resource mappings
  ansible.builtin.command: pvesh get /cluster/mapping/pci --output-format json
  register: pci_resource_mappings
  changed_when: false

- name: Get USB resource mappings
  ansible.builtin.command: pvesh get /cluster/mapping/usb --output-format json
  register: usb_resource_mappings
  changed_when: false

- name: Add udev rules
  vars:
    usb_devices: "{{ usb_resource_mappings.stdout | from_json }}"
    pci_devices: "{{ pci_resource_mappings.stdout | from_json }}"
  ansible.builtin.template:
    src: 99-resource-mappings.rules.j2
    dest: /etc/udev/rules.d/99-resource-mappings.rules
    mode: "0644"
  notify:
    - Reboot

And the accompanying template:

Code:

# This file was automatically generated using Ansible.
#
# Adds stable /dev paths for devices used in Resource Mappings.

# PCI
{% for pci_device in pci_devices -%}
  {% for raw_mapping in pci_device.map -%}
    {% set mapping = raw_mapping.split(',') | map('split', '=') | community.general.dict -%}
    {% if mapping.node == inventory_hostname -%}
      {% set name = pci_device.id -%}
      {% set ids = mapping.id.split(':') -%}
      {% if "gpu".casefold() in name.casefold() -%}
## GPU
{# TODO Use mapping iommugroup, path, and/or subsystem-id #}
SUBSYSTEM=="drm", KERNEL=="card*", ATTRS{vendor}=="0x{{ ids[0] }}", ATTRS{device}=="0x{{ ids[1] }}", SYMLINK+="{{ name }}-card"
SUBSYSTEM=="drm", KERNEL=="render*", ATTRS{vendor}=="0x{{ ids[0] }}", ATTRS{device}=="0x{{ ids[1] }}", SYMLINK+="{{ name }}-render"
      {% else -%}
## Other
# TODO "{{ pci_device }}"
      {%- endif %}
    {%- endif %}
  {%- endfor %}
{%- endfor %}

# USB
{% for usb_device in usb_devices -%}
  {% for raw_mapping in usb_device.map -%}
    {% set mapping = raw_mapping.split(',') | map('split', '=') | community.general.dict -%}
    {% if mapping.node == inventory_hostname -%}
      {% set name = usb_device.id -%}
      {% set ids = mapping.id.split(':') -%}
SUBSYSTEM=="usb", ATTRS{idVendor}=="{{ ids[0] }}", ATTRS{idProduct}=="{{ ids[1] }}", SYMLINK+="{{ name }}"
    {%- endif %}
  {%- endfor %}
{%- endfor %}

This seems to work as far as creating /dev entries is concerned. I have not yet tested if these can be passed through to an LXC container yet. There are also TODOs that may be relevant to your setup to address, for example, if using IOMMU or SR-IOV. However, for me, udevadm info /dev/<name> --attribute-walk output seems promising.

Last edited:

As it turns out you cannot use the /dev/<device> in the LXC.

I was thinking as an alternative to maybe use lxc.hook in some way to modify the devX entry in config in some way (and base it off the Resource Mappings). However, if I'm understanding hooks correctly, these would run too late and wouldn't work. So I'm stumped on this.

It would be helpful if Proxmox could do this automatically. When selecting "Device Passthrough" for an LXC, you can select a Resource Mapping, and it'll automatically add the devX entry to the LXC config that points to the real /dev device. Then when the LXC migrates from one node to another, Proxmox automatically changes that config when it moves nodes to the appropriate /dev for that node as stated by the Resource Mapping.

I would like an simple solution for this too. Most times when my node restarts the use device passthrough changes and then the lxc wont boot.

I would like an simple solution for this too. Most times when my node restarts the use device passthrough changes and then the lxc wont boot.

Same here, did you find a Solution for that?