Hi all.
I'd like to share some issues I faced after migration CentOS 6 containers from OpenVZ (Proxmox VE 3.4) to LXC (Proxmox VE 4.1) using https://pve.proxmox.com/wiki/Convert_OpenVZ_to_LXC.
I had a CentOS 6 CT installed from a standard template. After migrating it to LXC there were two issues:
1. No more /dev/shm folder
2. The CT didn't react to shutdown command
To address the 1st issue one must add a line to /usr/share/lxc/config/centos.common.conf or create a file under /usr/share/lxc/config/common.conf.d on the Proxmox host. The magic line is:
Then make sure the CT's /etc/fstab no longer mounts /dev/shm
The 2nd issue happened due to missing files in the CT's file system which LXC requires. Here are they:
Also the following might be required in /etc/securetty:
And don't forget to comment out /sbin/start_udev line in /etc/rc.sysinit
I was unable to quickly find those files on the net, so I put them here: https://github.com/jazzl0ver/lxc-centos
Or one can extract them from any publicly available LXC Centos templates.
I'd like to share some issues I faced after migration CentOS 6 containers from OpenVZ (Proxmox VE 3.4) to LXC (Proxmox VE 4.1) using https://pve.proxmox.com/wiki/Convert_OpenVZ_to_LXC.
I had a CentOS 6 CT installed from a standard template. After migrating it to LXC there were two issues:
1. No more /dev/shm folder
2. The CT didn't react to shutdown command
To address the 1st issue one must add a line to /usr/share/lxc/config/centos.common.conf or create a file under /usr/share/lxc/config/common.conf.d on the Proxmox host. The magic line is:
Code:
lxc.mount.entry = none dev/shm tmpfs rw,nosuid,nodev,create=dir
The 2nd issue happened due to missing files in the CT's file system which LXC requires. Here are they:
Code:
/etc/init.d/lxc-halt
/etc/rc.d/rc0.d/S00lxc-halt -> ../init.d/lxc-halt
/etc/rc.d/rc6.d/S00lxc-reboot -> ../init.d/lxc-halt
/etc/init/lxc-sysinit.conf
/etc/init/power-status-changed.conf
Also the following might be required in /etc/securetty:
Code:
# LXC (Linux Containers)
lxc/console
lxc/tty1
lxc/tty2
lxc/tty3
lxc/tty4
# For libvirt/Virtual Machine Monitor
pts/0
And don't forget to comment out /sbin/start_udev line in /etc/rc.sysinit
I was unable to quickly find those files on the net, so I put them here: https://github.com/jazzl0ver/lxc-centos
Or one can extract them from any publicly available LXC Centos templates.