September 11, 2019 Roberto Puzzanghera 0 comments
Tired of the nightmares of remotely compiling the kernel with Linux-VServer
, a software that I'm pleased with despite of some lack of documentation, these days I was playing with LXC
, which is included and supported by Slackware
and for which the Linux
kernel doesn't need any patching because it already embeds the hacks for LXC containers.
To convert an existing Linux-VServer
container in a (eventually unprivileged) LXC
container you can follow these steps. I assume that you already know how to create an LXC
container; in case you are interested in unprivileged containers take a look to the excellent Chris Willing's guide (a big thanks to him) linked below.
More info:
In the following /vservers
is the directory where your Linux-VServer
containers are stored, while /lxc
is the directory with your LXC
ones (this directory would be /var/lib/lxc
by default).
First of all prepare the directory which will host the container
mkdir /lxc/test
Copy your existing Linux-VServer
container (assuming that its name is "test") in the rootfs
:
cp -rp /vservers/test /lxc/test/rootfs
Now we have to
The last two steps are just in case of unprivileged containers.
Concerning the configuration, we'll use the convert-vserver.sh script, which I derived from the Slackware
's template from Matteo Bernardini, which comes with LXC
itself.
Download and execute:
wget https://notes.sagredo.eu/files/linux-vserver/convert-vserver.sh chmod +x convert-vserver.sh ./convert-vserver.sh -n test
Once the script was executed with no errors, if the container is supposed to be unprivileged, adjust the config and log files privileges as follows (I assume that lxc
is the user who runs the container):
touch /lxc/test/test.log chown lxc:users /lxc/test /lxc/test/config /lxc/test/test.log
where the name of the log file is of course the same as the container's name.
Finally, since my container had to be unprivileged, I had to remap its uids & gids according to the Chris Willing's guide:
container-userns-convert test 100000
qq_temporary_problem_(#4.3.0)
June 2, 2023 06:32
qq_temporary_problem_(#4.3.0)
June 1, 2023 21:18
qq_temporary_problem_(#4.3.0)
May 31, 2023 18:22
qq_temporary_problem_(#4.3.0)
May 31, 2023 14:42
qq_temporary_problem_(#4.3.0)
May 31, 2023 14:33
Thank you! for all the documentation, patches and support
May 26, 2023 08:42
free(): double free detected in tcache 2: /var/www/qmail/cgi-bin/qmailadmin
May 17, 2023 15:25
free(): double free detected in tcache 2: /var/www/qmail/cgi-bin/qmailadmin
May 17, 2023 07:46
Tags
apache clamav dkim dovecot ezmlm fail2ban hacks lamp letsencrypt linux linux-vserver lxc mariadb mediawiki mozilla mysql openboard owncloud patches php proftpd qmail qmail to postfix qmail-spp qmailadmin rbl roundcube rsync sieve simscan slackware solr spamassassin spf ssh ssl surbl tcprules tex ucspi-tcp vpopmail vqadmin