Unfortunately, the development of openvz has come to a certain dead end, the paid version of virtuozo has gone to the side of the codebase and at some point it turned out that openvz only works on the old kernel version 2.6.32, and work on merging openvz and virtuozo7 is going, say honestly not fast.
Actually, this prompted the proxmox command in version 4.0 to abandon openvz in favor of lxc and kernel version 4.2.6. Unfortunately, the proxmox team didn’t pay much attention to testing lxc in proxmox, I strongly recommend abstaining from anyone who wants to migrate with openvz.
')
Below I will talk about all the difficulties and problems after migrating to lxc.
I tried several times already lxc, to be honest, it was full of children's problems, and this every time I was repelled by using it in production, and I can poach homepagies and on openvz without children's problems lxc, even the same docker went much further into stability and predictability.
From the openvz global problems, I only remember the problem in centos 7 where the network did not rise, and it was necessary to default to register with pens in rc.local, or by installing
this patch .
In lxc everything turned out to be much worse, I switched to it from openvz, when the version of proxmox 4.1 was released, I honestly thought everything would work in lxc as expected and stable, as in Windows after the first service pack. The advantage was to envelope the openvz backup in lxc with two teams, but unfortunately the move eventually responded with excruciating pain and a lot of wasted time, I wish I had sat on openvz for another year.
lzop -d vzdump-openvz-126-2016_01_27-11_08_32.tar.lzo
pct restore 126 vzdump-openvz-126-2016_01_27-11_08_32.tar --rootfs local: 0
Use the option to remove the disk quota --rootfs local: 0 if your storage is not on lvm or zfs. Here is a
more detailed guide for those who do not understand.
The five main problems lxc I have encountered:
- In centos 6 pkhp not to connect to the mysql socket, it is necessary to prescribe everywhere instead of localhost ip 127.0.0.1, I dug this problem for a long time but did not find a solution, at first I thought this was due to what I converted from openvz, but on a fresh installation of lxc centos 6 there is same problem. Tried to put percona 5.6 problem persists.
- Monstrously slow work of lxc in the image base, that is, if the files are stored as a disk image on the host machine, the performance of the disk subsystem drops severalfold, from 3 to 20 times. I have not tested lxc on lvm and zfs. On lvm there is still no thin provision, but they promise in the next versions. I have quite a lot of things deployed in image base in kvm and there is a certain overhead to write to disk, but it is measured in percent, even probably not in tens of percent, but such a catch is that writing to mysql becomes 20 times slower from lxc in proxmox I was not expecting. Cured as a result by storing guest files directly in the host file system as in openvz. At the same time, disk quotas do not work, but since there is plenty of space and monitoring of a place, it is scored on quotas, although disk quotas are more relevant for ssd systems. When creating and restoring, specify the option --rootfs local: 0; unfortunately, this cannot be done from the web interface.
- Not working backups lxc, proxmox backup just hung on suspend vm even in version proxmox 4.1, this bug was fixed literally on March 2.
- It is really slower than openvz.
- I had two containers stuck tightly and they could not be killed by any means, the server was also not able to reboot gently because of them, so I had to make the reset button on the server.
Migration issues:
- It was not possible to launch debian 6 normally after converting to lxc, I don’t remember exactly what the problem was, but due to the fact that debian 6 is heavily legacy, I transferred all applications to fresh debian with 8 hands.
- Above, I mentioned that php does not connect to mysql via socket.
- In centos 6 the network does not rise due to the renaming of network interfaces from venet to eth0, you need to go to the container from the host via pct enter ID and execute the commands
sed -i -e 's / venet0 / eth0 / g' / etc / sysconfig / network
rm -rf / etc / sysconfig / network-scripts / ifcfg-venet0: 0
rm -rf / etc / sysconfig / network-scripts / ifcfg-venet0
reboot - You can’t go to the redhat based ssh container due to the lack of tty, as udev does a crooked work after conversion
pct enter ID
sed -i -e 's / start_udev / false / g' /etc/rc.d/rc.sysinit
reboot
FYI:
1) Detailed
guidelines for updating proxmox 3-> 4;
2) Description of the problem with the speed of disks in lxc:
one ,
two ,
three ;
3) Support for proxmox 3.x will end in April 2016;
4)
Trade , why lxc is bad;
5)
How to migrate c lxc back to openvz.
I hope this post will save someone a lot of time.
UPD1: I found another bug in some virtual machines in my backup vzdump does not save the / var / log folder and if you restart from backup, all services do not rise and swear at the absence of the log folder.