From VNX
Revision as of 19:29, 29 August 2017 by David (talk | contribs) (Basic installation)
Jump to: navigation, search

How to create a LXC VyOS root filesystem for VNX

Basic installation

[VyOS] is an open source network operating system that is based on Debian GNU/Linux and that joins multiple applications such as Quagga, ISC DHCPD, OpenVPN, StrongS/WAN and others under a single management interface. It can be installed on physical hardware or on virtual machines and it is a community fork of [Vyatta].

Follow this procedure as a root user to create a VyOS based LXC root filesystem for VNX. The procedure has been tested with VyOS 1.1.7.

  • Get VyOS installation CD and mount it to make its content accesible:
  • wget
    mount -o loop vyos-1.1.7-amd64.iso /mnt/
  • Create a Debian LXC rootfs with:
  • lxc-create -n vyos -t debian -- -r wheezy
  • Substitute the rootfs directory of the newly created container by the VyOS one:
  • cd /var/lib/lxc/vyos
    rm -rf /var/lib/lxc/vyos/rootfs/
    unsquashfs /mnt/live/filesystem.squashfs
    mv squashfs-root/ rootfs
    umount /mnt
  • Do some modifications in container configuration:
  • # Change the number of ttys to 6
    sed -i -e "s/lxc.tty = 4/lxc.tty = 6/" config
    # Eliminate the "nr_inodes" option in vyatta-router script (not supported inside the container)
    sed -i -e 's/,nr_inodes=0//' rootfs/etc/init.d/vyatta-router
    # Create the /dev/fuse device manually in /etc/rc.local
    sed -i -e "/By default this script does nothing/a mknod -m 666 /dev/fuse c 10 229\nchown root.fuse /dev/fuse\nchmod 660 /dev/fuse" rootfs/etc/rc.local