<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Raymond P. Burkholder - Things I Do - Debian</title>
    <link>https://blog.raymond.burkholder.net/</link>
    <description>In And Around Technology and The Arts</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.7.2 - http://www.s9y.org/</generator>
    <pubDate>Tue, 03 Mar 2026 02:43:19 GMT</pubDate>

    <image>
        <url>https://blog.raymond.burkholder.net/templates/bulletproof/img/s9y_banner_small.png</url>
        <title>RSS: Raymond P. Burkholder - Things I Do - Debian - In And Around Technology and The Arts</title>
        <link>https://blog.raymond.burkholder.net/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>apparmor=&quot;DENIED&quot; operation=&quot;mount&quot; class=&quot;mount&quot; info=&quot;failed perms check&quot; error=-13 </title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1338-apparmorDENIED-operationmount-classmount-infofailed-perms-check-error-13.html</link>
            <category>Debian</category>
            <category>LXC</category>
            <category>Proxmox</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1338-apparmorDENIED-operationmount-classmount-infofailed-perms-check-error-13.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1338</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1338</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;After following my own instructions for building my own LXC container template for ProxMox using the SID release, when the container started, the ProxMox logs would fill up with errors along the lines of:

&lt;blockquote&gt;&lt;pre&gt;
apparmor=&quot;DENIED&quot; operation=&quot;mount&quot; class=&quot;mount&quot; info=&quot;failed flags match&quot; error=-13 name=&quot;/run/credentials/systemd-journald.service/&quot; flags=&quot;rw, move&quot;
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;My Trixie template did not seem to offer up these types of errors.  LXC containers were created with the &#039;Unpriviledged Container&quot; setting to 1|yes.

&lt;p&gt;Instead of going the last resort brute force and ignorance route of using the following configuration (see &lt;a href=&quot;https://github.com/russmorefield/lxc-docker-fix&quot; target=_blank&gt;Fixing net.ipv4.ip_unprivileged_port_start and AppArmor Docker Errors in a Proxmox LXC&lt;/a&gt; for some background):

&lt;blockquote&gt;&lt;pre&gt;
lxc.apparmor.profile: unconfined
features: keyctl=1,nesting=1
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;I took a more nuanced/detailed approach.  &lt;a href=&quot;https://bobcares.com/blog/apparmor-denied-operation-mount-info-failed-flags-match-error-13/&quot; target=_blank&gt;AppArmor Denied Operation mount info failed flags match Error 13&lt;/a&gt; provided a starting point for developing a solution.

&lt;p&gt;After incrementally adding rules as new Apparmor DENIED statements occurred, this is the rule set which seems to resolve the errors.  Once the container is created, these are the rules I add to the end of /etc/pve/lxc/&amp;lt;vmid&amp;gt;.conf:

&lt;blockquote&gt;&lt;pre&gt;
lxc.apparmor.raw: mount options=(rw,move) -&gt; /run/credentials/{,**},
lxc.apparmor.raw: mount options=(ro, remount, noatime, bind) -&gt; /,
lxc.apparmor.raw: mount options=(ro, remount, bind) -&gt; /dev/,
lxc.apparmor.raw: mount options=(rw, move) -&gt; /dev/mqueue/,
lxc.apparmor.raw: mount options=(rw, move) -&gt; /tmp/,
lxc.apparmor.raw: mount options=(rw, move) -&gt; /run/systemd/mount-rootfs/proc/,
lxc.apparmor.raw: mount options=(ro, nosuid, nodev, noexec, remount, nosymfollow, bind) -&gt; /run/systemd/mount-rootfs/run/credentials/systemd-networkd.service/,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/sys/net/,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/uptime,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/slabinfo,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/meminfo,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/swaps,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/loadavg,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/cpuinfo,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/diskstats,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/stat,
lxc.apparmor.raw: userns create,
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Restart the container, and the errors should no longer occur.

&lt;p&gt;Don&#039;t try to place statements in /var/lib/lxc/&amp;lt;vmid&amp;gt;/config as it is over-written by ProxMox upon container startup.  Rules are appended to that configuration.

&lt;p&gt;I used the following for a trixie v13.3 version of a container:

&lt;blockquote&gt;&lt;pre&gt;
lxc.apparmor.raw: mount fstype=ramfs -&gt; /dev/shm/,
lxc.apparmor.raw: mount options=(ro, nosuid, nodev, noexec, remount, nosymfollow, bind) -&gt; /dev/shm/,
lxc.apparmor.raw: mount options=(ro, remount, bind) -&gt; /dev/,
lxc.apparmor.raw: mount options=(rw, move) -&gt; /dev/mqueue/,
lxc.apparmor.raw: mount options=(rw, move) -&gt; /run/lock/,
lxc.apparmor.raw: mount options=(rw, move) -&gt; /tmp/,
lxc.apparmor.raw: mount options=(ro, remount, noatime, bind) -&gt; /,
lxc.apparmor.raw: mount options=(ro, nosuid, nodev, noexec, remount, nosymfollow, bind) -&gt; /run/systemd/mount-rootfs/run/credentials/systemd-networkd.service/,
lxc.apparmor.raw: userns create,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec) -&gt; /run/systemd/namespace-{,**},
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/sys/net/,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/uptime,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/slabinfo,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/meminfo,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/swaps,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/loadavg,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/cpuinfo,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/diskstats,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec, remount, bind) -&gt; /run/systemd/mount-rootfs/proc/stat,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec) -&gt; /run/systemd/unit-root/proc/,
lxc.apparmor.raw: mount options=(ro, nosuid, nodev, noexec) -&gt; /sys/kernel/config/,
lxc.apparmor.raw: mount options=(rw, nosuid, nodev, noexec) -&gt; /sys/kernel/config/,
&lt;/pre&gt;&lt;/blockquote&gt;

 
    </content:encoded>

    <pubDate>Sat, 28 Feb 2026 23:51:54 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1338-guid.html</guid>
    
</item>
<item>
    <title>LXC Fresh Container Construction From Scratch for Proxmox</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1335-LXC-Fresh-Container-Construction-From-Scratch-for-Proxmox.html</link>
            <category>Containers</category>
            <category>Debian</category>
            <category>LXC</category>
            <category>Proxmox</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1335-LXC-Fresh-Container-Construction-From-Scratch-for-Proxmox.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1335</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1335</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;There are many articles available which discuss customizing a pre-existing Proxmox Container Template.  Few, if any, discuss constructing an LXC container from scratch.  Maybe because, fundamentally, a container template is just the rootfs as tarball, so building it is quite easy:

&lt;ul&gt;
  &lt;li&gt;Build a linux based virtual machine, I use Debian&#039;s recent release
  &lt;li&gt;Install LXC and its template package
  &lt;li&gt;Construct and initialize an LXC container
  &lt;li&gt;Shut it down and and zip it up
  &lt;li&gt;Copy it over to the ProxMox template directory
  &lt;/ul&gt;

&lt;p&gt;The details:

&lt;blockquote&gt;&lt;pre&gt;
# build the linux vm - details not relevant here
# ssh into the vm, or start a command line
# install basic packages

sudo apt install --no-install-recommends lxc lxc-templates xz-utils bridge-utils wget debootstrap rsync

# basic container templates are in:
#   /usr/share/lxc/templates/ 
# for debian as well as other distributions

# create an lxc container, provide a list any additional packages

lxc-create --template debian --name trixie-template -- --release trixie --packages iputils-ping,vim-tiny

# start and attach to the container
lxc-start trixie-template
lxc-attach trixie-template

# prepare for generating template
apt clean
apt purge

# Remove SSH host keys to ensure unique keys for each clone:
rm /etc/ssh/ssh_host_*

# Empty the machine ID file:
truncate -s 0 /etc/machine-id

# clear history
unset HISTFILE
# truncate history
history -c
&gt; ~/.bash_history
# the following has a space in front to prevent inclusion in the history
 shutdown -h now

# the shutdown returns to the virtual machine&#039;s prompt
# compress the directory structure

cd /var/lib/lxc/trixie-template/

# remove /dev files as they can&#039;t be created in an unprivileged container
# an example error message if not removed:
#   tar: ./rootfs/dev/urandom: Cannot mknod: Operation not permitted
# construction of a new container will re-create the directory and files

rm ./rootfs/dev/ptmx
rm ./rootfs/dev/zero
rm ./rootfs/dev/tty3
rm ./rootfs/dev/urandom
rm ./rootfs/dev/null
rm ./rootfs/dev/tty
rm ./rootfs/dev/console
rm ./rootfs/dev/tty4
rm ./rootfs/dev/tty2
rm ./rootfs/dev/random
rm ./rootfs/dev/tty1
rm ./rootfs/dev/full

# cd into rootfs and zip the container

cd rootfs
tar --xz --acls --numeric-owner -cf /var/local/trixie-13-3-template.tar.xz ./

# the xz file can be copied over to proxmox and placed into
# /var/lib/pve/local-btrfs/template/cache/
# for use as a template for container creation
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;During the first use of lxc-create to create the original container, packages are downloaded and installed to build the container.
The packages and installation is cached for faster subsequent builds of the same container type.

&lt;p&gt;If the cache becomes stale, it can be rebuilt by using --flush-cache in a manner similar to:

&lt;blockquote&gt;&lt;pre&gt;
lxc-create --template debian --name trixie-template -- --release trixie --flush-cache --packages iputils-ping,vim-tiny,less
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;An existing cache can be updated with something like:

&lt;blockquote&gt;&lt;pre&gt;
sudo chroot /var/cache/lxc/debian/rootfs-trixie-amd64
apt-get update
apt-get dist-upgrade
apt-get clean
exit
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;courtesy of &lt;a href=&quot;https://www.tomechangosubanana.com/2015/updating-lxc-imagecontainer-caches/&quot; target=_blank&gt;Updating lxc image/container caches&lt;/a&gt;

&lt;p&gt;One other note, there are two package candidates for installing the &lt;a href=&quot;https://unix.stackexchange.com/questions/400351/what-are-the-differences-between-iputils-ping-and-inetutils-ping&quot; target=_blank&gt;ping utility&lt;/a&gt;:

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://packages.debian.org/trixie/iputils-ping&quot; target=_blank&gt;iputils-ping&lt;/a&gt; - native Linux ping, preferred for Debian/Linux
  &lt;li&gt;&lt;a href=&quot;https://packages.debian.org/trixie/inetutils-ping&quot; target=_blank&gt;inetutils-ping&lt;/a&gt; - general gnu version, used on a variety of posix sytstems, less preferred
  &lt;/ul&gt;

&lt;p&gt;Some fix-ups in the process:

&lt;ul&gt;
  &lt;li&gt;apt-get install less
  &lt;li&gt;dpkg-reconfigure locales
  &lt;li&gt;useradd user
  &lt;/ul&gt;

 
    </content:encoded>

    <pubDate>Fri, 27 Feb 2026 21:03:19 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1335-guid.html</guid>
    
</item>
<item>
    <title>Debian Headers first then Kernel for DKMS rebuilds</title>
    <link>https://blog.raymond.burkholder.net/index.php?/archives/1334-Debian-Headers-first-then-Kernel-for-DKMS-rebuilds.html</link>
            <category>Debian</category>
    
    <comments>https://blog.raymond.burkholder.net/index.php?/archives/1334-Debian-Headers-first-then-Kernel-for-DKMS-rebuilds.html#comments</comments>
    <wfw:comment>https://blog.raymond.burkholder.net/wfwcomment.php?cid=1334</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.raymond.burkholder.net/rss.php?version=2.0&amp;type=comments&amp;cid=1334</wfw:commentRss>
    

    <author>nospam@example.com (Raymond P. Burkholder)</author>
    <content:encoded>
    &lt;p&gt;Something from a Debian mailing list:

&lt;blockquote&gt;
&lt;p&gt;I found the root cause, when testing 6.12.57 I installed the image then the 
headers and the NVIDIA DKMS module was not rebuilt because the matching linux-
headers package was not installed at the time the kernel image was configured.

&lt;p&gt;If I install the headers first and then the linux-image package, DKMS correctly 
builds the NVIDIA module and 6.12.63 works fine, so it doesn&#039;t look like a 
kernel regression after all.

&lt;p&gt;I don&#039;t know if I should manually run dkms autoinstall myself after a kernel 
update  (I never had to before) or if there was a bug during the install 
process of this update.
&lt;/blockquote&gt;

&lt;p&gt;Makes sense, I had NVidia compile fail in a similar.  This makes it obvious what I should have observed.

 
    </content:encoded>

    <pubDate>Sat, 17 Jan 2026 03:39:34 +0000</pubDate>
    <guid isPermaLink="false">https://blog.raymond.burkholder.net/index.php?/archives/1334-guid.html</guid>
    
</item>

</channel>
</rss>
