> ## Content Index
> Fetch the complete content index at: https://trendboxgeek.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Ubuntu 26.04 cgroup v2: Fix Docker, LXC & Kubernetes Errors
- URL: https://trendboxgeek.com/blog/cgroup-v2/
- Published: 2026-09-29T06:56:24.000Z
- Updated: 2026-09-29T06:56:24.000Z
- Author: Pankajbhai Chavda
- Tags: #blog-col

If you read the release notes of Ubuntu 26.04, you have probably seen the warnings. After installation, the operating system removes cgroup v1, which might cause your older Docker, LXC, or kubelet setups to stop working, as cgroup v2 is now the only option. I see this everywhere, so I decided to test it live on one of my own homelab servers to see how bad the damage actually is.

When I tested it on a clean 26.04 install with Docker installed the normal way, nothing broke. If you have a special setup, then you may face a real problem, so follow the method below and see if your system has a problem or not.

The core issue is real enough: Ubuntu 26.04 completely removes cgroup v1\. Now everything runs through systemd's unified cgroup v2 hierarchy. If you have old container runtimes that look for old paths like `/sys/fs/cgroup/memory`, they will panic and refuse to start. 

But does that actually happen on a standard install? Let's check.

## Check Your Own Box First

Before you touch anything, run this:

stat -fc %T /sys/fs/cgroup/

**Expected Output:**

trend@boxgeek:~$ stat -fc %T /sys/fs/cgroup/

cgroup2fs

trend@boxgeek:~$

If you get the output `cgroup2fs`, then you are on the unified hierarchy, and this output is expected and correct on 26.04\. But this does not identify whether your system has any problem or not. It just means your operating system has done its job.

Next, actually check if Docker cares.

sudo systemctl status docker

**Expected Output:**

![docker status check.](https://trendboxgeek.com/content/images/2026/09/Screenshot-From-2026-09-27-17-14-00.png)

You will see the output `active (running)` and the cgroup shown as well. On my test box, this came back completely clean — Docker daemon up, containers loaded, zero complaints.

Then confirm how Docker is actually managing cgroups:

docker info | grep -i cgroup

**Expected Output:**

![check docker info and cgroup.](https://trendboxgeek.com/content/images/2026/09/Screenshot-From-2026-09-27-17-14-51.png)

This is the ideal pairing. Last, check that your Docker version is not old.

docker --version

Docker has supported cgroup v2 natively since 20.10\. If you have used Ubuntu's own package manager or Docker's official repo at any point in the last few years, you are fine. The old Docker mentioned in that warning actually refers to a very old installation.

## How to Fix Ancient Docker Installs

If your output showed `cgroupfs` as the driver instead of `systemd`, or if you are using an old server from 2019, then you need to fix it. Don't try to hack legacy v1 support back into Ubuntu. Just purge the old packages.

sudo apt-get remove docker docker-engine docker.io containerd runc

Then pull the current official repo so you are not relying on stale distro packages.

sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Re-run the `docker info` check. You should now be on systemd and v2.

## The Real Gotchas: LXC and Kubelet

The warning is actually important for LXC and Kubernetes if you are carrying the same legacy setup.

If you use LXC, its modern version handles v2 easily without any additional setup. The trap is your old container configs in `/etc/lxc/`. If your containers still have old v1 settings, then 26.04 will choke on them.

You have to find the legacy syntax:

lxc.cgroup.memory.limit_in_bytes = 512M

And update it to the v2 format:

lxc.cgroup2.memory.max = 512M

For Kubernetes, if you run a local node and it gets stuck after an upgrade, it may be looking for kubelet v1\. Check if it's running with `which kubelet && systemctl is-active kubelet`.

If it is not working properly, then you need to explicitly tell it to use the systemd driver. Open your drop-in config.

sudo nano /var/lib/kubelet/kubeadm-flags.env

Make sure this flag is in there:

--cgroup-driver=systemd

Reload and restart to apply:

sudo systemctl daemon-reload
sudo systemctl restart kubelet

Older kubelet defaults assumed cgroupfs, which is exactly the kind of mismatch cgroup v2 stops tolerating.

## The Real Takeaway

The "cgroup v2 breaks everything" warning is technically true, but it does not affect anyone running current software. I fully tested on my server and expected to find at least one broken thing, but I found nothing broken — everything was fine. Docker runs natively on v2, with no legacy LXC or kubelet baggage to worry about. If you have also read about this warning, test your system before rebuilding everything.