[pve-devel] [PATCH container] config: allow empty environment variables

Filip Schauer f.schauer at proxmox.com
Mon Nov 17 13:49:03 CET 2025


This fixes a problem with the docker.io/httpd OCI image which specifies
an empty environment variable. This violated the pattern of the `env`
property, causing `pct config <vmid>` to fail with:
```
env: value does not match the regex pattern
```

Signed-off-by: Filip Schauer <f.schauer at proxmox.com>
---
 src/PVE/LXC/Config.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index cd3a172..b6fc9a8 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -671,7 +671,7 @@ my $confdesc = {
         description => 'The container runtime environment as NUL-separated list.'
             . ' Replaces any lxc.environment.runtime entries in the config.',
         optional => 1,
-        pattern => qr/(?:\w+=[^\x00-\x1F\x7F]+)(?:\0\w+=[^\x00-\x1F\x7F]+)*/,
+        pattern => qr/(?:\w+=[^\x00-\x1F\x7F]*)(?:\0\w+=[^\x00-\x1F\x7F]*)*/,
     },
     hookscript => {
         optional => 1,
-- 
2.47.3





More information about the pve-devel mailing list