[Patch] Proxmox 4.0 CentOS 5 and 6 Containers not starting

dw2412

Renowned Member
Mar 14, 2013
22
0
66
Code:
--- Redhat.pm.bak       2015-10-06 09:38:29.000000000 +0200
+++ Redhat.pm   2015-10-14 20:10:11.151244903 +0200
@@ -18,8 +18,8 @@

     my $version;

-    if ($release =~ m/release\s+(\d\.\d)(\.\d+)?\s/) {
-       if ($1 >= 6 && $1 < 8) {
+    if ($release =~ m/release\s+(\d\.\d)(\.\d+)?/) {
+       if ($1 >= 5 && $1 < 8) {
            $version = $1;
        }
     }

This small little patch for file /usr/share/perl5/PVE/LXC/Setup/Redhat.pm should enable CentOS 6 Containers to start and to allow CentOS 5 (provided that you've adapted the container for LXC!) to start, too.

Best regards

Andreas
 
This patch works today with /usr/share/perl5/PVE/LXC/Setup/CentOS.pm
CentOS 5.11 works on LXC.