Difference between revisions of "Vnx-rootfslxc"
Line 41: | Line 41: | ||
<li>Stop the VM with:</li> | <li>Stop the VM with:</li> | ||
halt | halt | ||
+ | |||
+ | <li>If you want to pack the root filesystem into a tar file, use the following command:</li> | ||
+ | tar --numeric-owner -czpf vnx_rootfs_lxc_ubuntu-16.04-v025.tgz vnx_rootfs_lxc_ubuntu-16.04-v025 | ||
<li>Optionally, create a short link to the rootfs:</li> | <li>Optionally, create a short link to the rootfs:</li> | ||
cd /usr/share/vnx/filesystems | cd /usr/share/vnx/filesystems | ||
ln -s vnx_rootfs_lxc_ubuntu-13.10 rootfs_lxc | ln -s vnx_rootfs_lxc_ubuntu-13.10 rootfs_lxc | ||
</ul> | </ul> |
Revision as of 11:56, 7 May 2016
How to create a LXC Ubuntu root filesystem for VNX
Basic installation
Follow this procedure to create a Ubuntu based LXC root filesystem for VNX. The procedure has been tested over Ubuntu 13.10.
- Create the rootfs with:
lxc-create -t ubuntu -n vnx_rootfs_lxc_ubuntu-13.10
Note1: The default username/password is ubuntu/ubuntu.
Note2: using the linux32 command it should be posible to create a 32 bits image from a 64 bits machine, that is:
linux32 lxc-create -t ubuntu -n vnx_rootfs_lxc_ubuntu
but it does not work...why?
mv /var/lib/lxc/vnx_rootfs_lxc_ubuntu-13.10/ /usr/share/vnx/filesystems/
lxc.rootfs = /usr/share/vnx/filesystems/vnx_rootfs_lxc_ubuntu-13.10/rootfs lxc.mount = /usr/share/vnx/filesystems/vnx_rootfs_lxc_ubuntu-13.10/fstab
touch vnx_rootfs_lxc_ubuntu-13.10/fstab
lxc-start -n vnx_rootfs_lxc_ubuntu-13.10-v025 -F -f /usr/share/vnx/filesystems/vnx_rootfs_lxc_ubuntu-13.10/config
- Add VNX user and change the passwords:
sudo adduser vnx sudo adduser vnx sudo sudo passwd root
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install aptsh openssh-server traceroute telnet nmap apache2 wget tcpdump update-rc.d -f apache2 remove # to avoid automatic start
sudo vi /etc/hosts # change name to vnx sudo vi /etc/hostname # "
sudo deluser ubuntu
halt
tar --numeric-owner -czpf vnx_rootfs_lxc_ubuntu-16.04-v025.tgz vnx_rootfs_lxc_ubuntu-16.04-v025
cd /usr/share/vnx/filesystems ln -s vnx_rootfs_lxc_ubuntu-13.10 rootfs_lxc