Difference between revisions of "Vnx-rootfslxccentos"
(→Basic installation) |
(→References) |
||
Line 50: | Line 50: | ||
== References == | == References == | ||
− | http://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/setup-linux-container-with-lxc-on-ubuntu-16-04-14-04.html | + | <ul> |
+ | <li>Setup Linux Container with LXC on Ubuntu 16.04. http://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/setup-linux-container-with-lxc-on-ubuntu-16-04-14-04.html</li> | ||
+ | </ul> |
Latest revision as of 02:22, 5 August 2017
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
References
- Setup Linux Container with LXC on Ubuntu 16.04. http://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/setup-linux-container-with-lxc-on-ubuntu-16-04-14-04.html