Patch scripts to improve PCT/PVE 9:
Add OCI container type support to PCT, enabling Redroid container startup
Chinese Documentation | English Documentation
Important
Running Redroid PCT(LXC) containers may affect other PCT(LXC) containers, e.g.: Docker cannot start or NFS cannot be mounted inside other PCT(LXC) containers.
To avoid such issues, do not set Redroid PCT(LXC) containers to autostart.
To resolve this, set a non-OCI PCT(LXC) container (e.g., Debian 12) to autostart,
or manually start a non-OCI PCT(LXC) container (e.g., Debian 12) before running a Redroid PCT(LXC) container.
This ensures lxcfs initializes correctly, so running Redroid PCT(LXC) containers does not affect Docker or NFS in other PCT(LXC) containers.
Warning
- PVE Cluster Mode: The script has not been tested in cluster environments. Use in cluster mode is not recommended.
- Compatibility: This script is only tested and supported on fresh installations of
PVE 9.1.1 ~ 9.1.4andPVE 9.2.2.
There may be unknown issues on other versions or non-fresh installations.
Not tested on ARM64 PVE, not recommended for ARM64 users. - To update the patch script, revert changes before updating.
Caution
- If you have used other PCT(LXC) related scripts, using this script may cause unpredictable issues (and vice versa).
- Please back up important data before using this script. All data loss caused by the script is the user's responsibility. Running the script means you accept this statement!
- After applying this script, do not update PVE. If you need to update PVE, please revert the changes first to avoid accidents.
Tip
It is recommended to use a fresh PVE 9.1 / 9.2 installation
Supported on PVE 9.1 / 9.2
If you use PVE 8, please use the pve-8 branch:
https://github.com/toss-a/PCT-patches/tree/pve-8
On the PVE host, run in the Console (Shell):
git clone https://github.com/toss-a/PCT-patches
cd PCT-patches
bash Patch-for-PCT-to-support-oci.sh -eTo revert the script changes, run:
bash Patch-for-PCT-to-support-oci.sh -e -RUsage: Patch-for-PCT-to-support-oci.sh [options]
| Option | Description |
|---|---|
-h, --help |
Show this help message |
-R, --restore |
Restore original files |
-D, --del-backup |
Delete backup files after restore |
-y, --yes |
Skip confirmation prompts |
-c, --chinese |
Show messages in Chinese (default) |
-e, --english |
Use English for messages |
- Snapshots
- Backup
- Firewall
- Template + Full Clone
- Template + Linked Clone
Caution
After creating a Redroid PCT(LXC) container, if the container's OS Type is not Oci, or there are no Entrypoint and lxc.mount.auto parameter options:
First refresh the PVE WebUI to check for changes. If still missing, try rebooting PVE.
If the issue persists after reboot, rerun the script (ensure no containers/VMs are running), then try creating a new Redroid PCT(LXC) container.
To confirm success, see deployment screenshots.
Important
When creating the container, uncheck Unprivileged container
Download a template from Release.
Allocate at least 5GB for rootfs; at least 4GB (4096MB) RAM; set Swap to 0.
| Parameter | Value |
|---|---|
rootfs |
≥ 5GB |
Memory |
≥ 4096MB |
Swap |
= 0 |
Tip
To disable IPv6, add androidboot.disable_ipv6=1 to the Entrypoint parameter [Lineage templates only]
Note
lxc.init.cmd has been replaced by Entrypoint on newer PVE/PCT versions.
Set IPv4 to DHCP. Regardless of IPv6 settings, Redroid PCT(LXC) containers will get a stateless IPv6 address.
After creating the container, go to Resources and click Add to add a Mount Point. Set Path to /data, and disk size to at least 25G.
| Parameter | Value |
|---|---|
Path |
/data |
Disk Size |
≥ 25G |
Note
This is equivalent to manually adding lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir to the config file
Click Add to add a Mount Entry. Set Source Path to /dev/dri, Target Path to /dev/dri, and Create Type to dir.
| Parameter | Value |
|---|---|
Source Path |
/dev/dri |
Target Path |
/dev/dri |
Create Type |
dir |
Important
PCT now auto-configures Entrypoint and lxc.mount.auto for OCI containers. No need to set these manually in Options.
For more Entrypoint parameters, see redroid-doc

