User Tools

Site Tools


docs:migrate-vserver-to-lxc
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Previous revision
Next revision
docs:migrate-vserver-to-lxc [2017/07/25 15:44] 95.208.70.15
Line 1: Line 1:
 +====== migration from vserver to lxc ======
 +
 +===== preface =====
 +
 +host system: debian jessie 8.9
 +
 +you need: LXC > Version 2.0, install it from jessie-backports
 +
 +do not install dnsmasq!
 +
 +I use [[http://www.fischglas.de/software/vo/|vo]] to keep track of changes so does this document. 
 +
 +===== prereq. =====
 +
 +<code>
 +if ! grep -q "[^#]* jessie-backports" /etc/apt/sources.list ; then
 +vo -o /etc/apt/sources.list
 +echo "deb http://ftp.de.debian.org/debian jessie-backports main non-free contrib" >> /etc/apt/sources.list
 +vo -i /etc/apt/sources.list
 +fi
 +apt-get update
 +apt-get install --no-install-recommends lxc/jessie-backports lxcfs uidmap debootstrap
 +
 +# new kernel
 +apt-get install linux-image-4.9.0-0.bpo.3-amd64 linux-base=4.3~bpo8+1  firmware-linux-free irqbalance
 +apt-get install linux-image-amd64
 +
 +apt-get clean
 +</code>
 +
 +===== start migration =====
 +
 +<code>
 +# stop vservers:
 +VSERVERS=$(
 +  vserver-stat | awk 'NR > 1 { print $NF }'
 +)
 +echo "$VSERVERS" > /root/vservers-list
 +xargs -r -i%  vserver % stop < /root/vservers-list
 +
 +reboot
 +</code>
 +
 +System should boot with Linux 4.9.0-0.bpo.3-amd64 .
 +
 +The subuid mechanism needs the uid/gid values inside the container
 +to be recalculated and changed. 
 +[[http://www.fischglas.de/software/ownrecalc/|ownrecalc]] gets the job done.
 +
 +
  
docs/migrate-vserver-to-lxc.txt · Last modified: 2017/07/25 16:03 by 95.208.70.15