Vnx-rootfslxccentos
How to create a LXC CentOS root filesystem for VNX
Basic installation
Follow this procedure to create a CentOS based LXC root filesystem for VNX. The procedure has been tested with CentOS version 7.
- Create the rootfs with:
sudo apt-get install yum lxc-create -t centos -n vnx_rootfs_lxc_centos -- -R 7 -a x86_64
chroot /var/lib/lxc/vnx_rootfs_lxc_centos/rootfs passwd
mv /var/lib/lxc/vnx_rootfs_lxc_centos /usr/share/vnx/filesystems/vnx_rootfs_lxc_centos64-7-v025
lxc.rootfs = /usr/share/vnx/filesystems/vnx_rootfs_lxc_centos64-7-v025/rootfs
touch vnx_rootfs_lxc_centos64-7-v025/fstab
lxc-start -n vnx_rootfs_lxc_centos64-7-v025 -F -f /usr/share/vnx/filesystems/vvnx_rootfs_lxc_centos64-7-v025/config
adduser vnx passwd vnx
yum update yum install perl telnet wget openssh-clients traceroute tcpdump net-tools
sudo vi /etc/hosts # change name to vnx sudo vi /etc/hostname # "
sed -i -e "/exit 0/d" /etc/rc.local echo "# /dev/net/tun" >> /etc/rc.local echo "mkdir -p /dev/net/" >> /etc/rc.local echo "mknod -m 666 /dev/net/tun c 10 200" >> /etc/rc.local echo "" >> /etc/rc.local echo "# /dev/kvm" >> /etc/rc.local echo "mknod -m 660 /dev/kvm c 10 232" >> /etc/rc.local
history -c
halt
tar --numeric-owner -czpf vnx_rootfs_lxc_centos64-7-v025.tgz vnx_rootfs_lxc_centos64-7-v025
cd /usr/share/vnx/filesystems ln -s vnx_rootfs_lxc_centos64-7-v025 rootfs_lxc_centos64