[pve-devel] ClearOS network support in LXC in PVE 6.2-6
Pongrácz István
pongracz.istvan at gmail.com
Mon Nov 23 13:46:39 CET 2020
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
More information about the pve-devel
mailing list