Skip to content

Instantly share code, notes, and snippets.

@yvesh
Created October 6, 2022 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yvesh/63b6ec42555aa9bba53915c8daff241f to your computer and use it in GitHub Desktop.
Save yvesh/63b6ec42555aa9bba53915c8daff241f to your computer and use it in GitHub Desktop.
Proxmox LXC Arch Linux Desktop Container with passed through GPU, KVM, sound, keyboard. Make sure to adjust the /etc/fstab in the LXC Container
arch: amd64
cores: 24 # Or leave it to pass all
features: fuse=1,mount=nfs;cifs,nesting=1
hostname: archdesktop
memory: 64000
# Adjust the network to your needs
net0: name=eth0,bridge=vmbr0,gw=10.0.1.1,hwaddr=xxxxxxxx,ip=10.0.1.42/24,type=veth
# Adjust the subvols
rootfs: local-zfs:subvol-110-disk-0,mountoptions=noatime,replicate=0,size=1000G
swap: 512
lxc.autodev: 1
# Starting with Proxmox 7.0 it'a cgroup2
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.cgroup2.devices.allow: c 4:7 rwm
lxc.cgroup2.devices.allow: c 13:* rwm
lxc.cgroup2.devices.allow: c 116:* rwm
lxc.cgroup2.devices.allow: c 10:* rwm
lxc.hook.autodev: sh -c 'mkdir -p "$LXC_ROOTFS_MOUNT"/dev/dri && mount --bind /dev/dri "$LXC_ROOTFS_MOUNT"/dev/dri && mknod "$LXC_ROOTFS_MOUNT"/dev/kvm c 10 232'
lxc.hook.autodev: sh -c 'mknod "$LXC_ROOTFS_MOUNT"/dev/tty7 c 4 7'
lxc.mount.entry: /dev/input mnt/dev/input none bind,create=dir
lxc.mount.entry: /dev/snd mnt/dev/snd none bind,create=dir
lxc.mount.entry: /dev/dri mnt/dev/dri none bind,create=dir
lxc.mount.entry: /run/udev mnt/run/udev none bind,create=dir
lxc.mount.entry: /dev/net mnt/dev/net none bind,create=dir
lxc.mount.entry: /dev/shm mnt/dev/shm none bind,create=dir
lxc.mount.entry: /profiles/user home/user none bind,create=dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment