From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pongracz.istvan@gmail.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id A71C9623F1
 for <pve-devel@lists.proxmox.com>; Mon, 23 Nov 2020 13:47:18 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 9425328D51
 for <pve-devel@lists.proxmox.com>; Mon, 23 Nov 2020 13:46:48 +0100 (CET)
Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com
 [IPv6:2a00:1450:4864:20::32d])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id BFADD28D3D
 for <pve-devel@lists.proxmox.com>; Mon, 23 Nov 2020 13:46:47 +0100 (CET)
Received: by mail-wm1-x32d.google.com with SMTP id c198so15876480wmd.0
 for <pve-devel@lists.proxmox.com>; Mon, 23 Nov 2020 04:46:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=message-id:subject:from:to:date:user-agent:mime-version;
 bh=xTnzR2a/uJMIGVjLvfB5K19sEjx2L6FCqwGv2v8I98Y=;
 b=BANzZAIS+G4bfobW6mts2UTv4aj9ri7fChXYiOsxa2in/VhFapExHOB/2xdTuHvScM
 d1hFRyVnGFqPXKSwt/W6yLek0bt3nqlGG7F/9QfX8kAb2ZDbYj7cuDNNwIBiwQPro+DV
 jTBTQnSStV1h9Jr3E/JQXk1XD74ehe5St2Tv21krgx7bmuxl8gCu0aG6dXRNaMyXPXmR
 6Njw09mTeu7zn3ndp9zVZQcmdospZKrXvBiYYyaT662le3bgrGKOtMtiVnN8cPlyVK0y
 BGY7XHKIwt1Gc67mk/tFDk9moOMRrhS2HOlG0Bnt+cg/+RM0lvlq82+Msp5zQ6FzJvbf
 UxkQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:message-id:subject:from:to:date:user-agent
 :mime-version;
 bh=xTnzR2a/uJMIGVjLvfB5K19sEjx2L6FCqwGv2v8I98Y=;
 b=tdMOIFFpaHPhLffLsIn4j9ceBZV0S3d0opAvxZgS3xmJKpYARisJYK2mDLmJTLfcE+
 FyT4wFgKn1v50MaEkp7ieKsTjAoRBeOzZkFpGpdMJkfdU5UG9WatIQW06Drk0ws8tfF3
 ev+eERBljPwIUqGmcfU7Ap33os9ZnIVuwy/ckFT+1/1SLWFOAQLgie3e4vxvjmaa4/3Q
 65eWMCOvp68Em35tSwiMbupQi2D5HHCSf/Qc3tJxreBYfDNhsTu1V2QUXe5/+5aXF5Ki
 QQ6Omte06KcFdjuSpeQlqnr3j7Pb5yDtAug4lFOdthMYrZGiSF4oKPbBWx6P4wE6B7Cl
 pr7w==
X-Gm-Message-State: AOAM532RbtVv2BdOwaw22ZP2YqxBDtP/2f6PN7fgPaukfrUVQeJUt4Rl
 UToztFZsJCDwlEiPdqNA1DV0TAofYbc=
X-Google-Smtp-Source: ABdhPJyLyUg5h5vdrjB375yslA7ydK9YQznN/FLiVUb8wM103zdN1JXrJnMbsRR41DIrAOZkduvdTQ==
X-Received: by 2002:a1c:93:: with SMTP id 141mr25294222wma.52.1606135601103;
 Mon, 23 Nov 2020 04:46:41 -0800 (PST)
Received: from ipc5 (netacc-gpn-204-14-199.pool.telenor.hu. [5.204.14.199])
 by smtp.googlemail.com with ESMTPSA id q12sm18649385wrx.86.2020.11.23.04.46.40
 for <pve-devel@lists.proxmox.com>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 23 Nov 2020 04:46:40 -0800 (PST)
Message-ID: <4b0b852efcb9c87d9e44d89c844c3c607953547c.camel@gmail.com>
From: =?ISO-8859-1?Q?Pongr=E1cz_Istv=E1n?= <pongracz.istvan@gmail.com>
To: pve-devel@lists.proxmox.com
Date: Mon, 23 Nov 2020 13:46:39 +0100
User-Agent: Evolution 3.36.4-0ubuntu1 
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
 FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider
 HTML_MESSAGE            0.001 HTML included in message
 KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years
 RCVD_IN_DNSWL_NONE     -0.0001 Sender listed at https://www.dnswl.org/,
 no trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [github.io, centos.pm, proxmox.com]
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
Subject: [pve-devel] ClearOS network support in LXC  in PVE  6.2-6
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Mon, 23 Nov 2020 12:47:18 -0000

Hi,
It seems I successfully migrated ClearOS 7.8 from KVM to LXC, with some
necessary modification in the CentOS.pm to get network working.
In short: ClearOS is a great SOHO server, based on CentOS, postfix,
cyrus, ldap, whatever.
There are some documents, how to migrate clearos into lxc, thanks for
their documentation and hints.
To get ClearOS to work and to be able to manage the network in LXC, I
had to modify the CentOS.pm, like this:
/usr/share/perl5/PVE/LXC/Setup# diff -u CentOS.pm-backup-original
CentOS.pm --- CentOS.pm-backup-original   2020-11-21 19:24:33.819829689
+0000+++ CentOS.pm   2020-11-21 19:37:42.403784623 +0000@@ -185,7
+185,7 @@        my $routes = '';        my $routes6 = ''; -       my
$header = "DEVICE=$d->{name}\nONBOOT=yes\n";+       my $header =
"DEVICE=$d-
>{name}\nONBOOT=yes\nTYPE=Ethernet\nUSERCTL=no\nDEFROUTE=yes\nPEERDNS=y
es\nPEERROUTES=yes\n";        my $data = '';        my $bootproto =
''; @@ -193,7 +193,7 @@            if ($d->{ip} eq 'dhcp')
{                $bootproto = 'dhcp';            } else
{-               $bootproto = 'none';+               $bootproto =
'static';                my $ipinfo = PVE::LXC::parse_ipv4_cidr($d-
>{ip});                $data .= "IPADDR=$ipinfo-
>{address}\n";                $data .= "NETMASK=$ipinfo->{netmask}\n";

My question: is that possible to include these modifications into the
mainstream CentOS.pm?Or I have to do this hack every time and every
servers I want to use to run ClearOS?
Thank you!
Background info: * lxc container should be a privileged one, otherwise
samba will not work
 * fstab should be an empty file, otherwise flexshare will not able to
enable new shares
 * several hardware related services should turn off (for example
irqbalance)

ClearOS kvm -> lxc documents:
 * https://forum.proxmox.com/threads/guide-clearos-lxc-container.39376/
 * https://nonasuomy.github.io/LXC-ClearOS-Conversion/

Thank you!István