Installing vSLX in a container (lxc)

(For the lxc flow only) After preparing a Linux container, perform this task to install a vSLX virtual lab in the container.

Note

Note

Although this legacy, unscripted flow is still supported, we recommend the scripted flow under Container installation (multiple vSLX labs).
  1. Start the container and attach to it.
    vlab1_user@ubuntu:/slxos-dist$ sudo lxc-start -n VLAB1
    vlab1_user@ubuntu:/slxos-dist$ sudo lxc-attach -n VLAB1
    In these steps, the container name is "VLAB1".
  2. Set a password for the default user "ubuntu".
    root@VLAB1:/slxos-dist# passwd ubuntu
    Enter new UNIX password: 
    Retype new UNIX password: 
    passwd: password updated successfully
    root@VLAB1:/slxos-dist# exit
    exit
  3. Log in to the container as "ubuntu".
    user@ubuntu:/slxos-dist$ sudo lxc-console -n VLAB1
    Connected to tty 1
    Ubuntu 16.04.4 LTS VLAB1 pts/0
    
    VLAB1 login: ubuntu
    Password: 
    Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-87-generic x86_64)
    
    ubuntu@VLAB1:~$ sudo -i
    [sudo] password for ubuntu: 
    root@VLAB1:~# 
    Note

    Note

    To exit the container, type Ctrl+a q.
  4. Become a root user.
    ubuntu@VLAB1:~$ sudo -i
    [sudo] password for ubuntu: 
    root@VLAB1:~# 
  5. Verify that all is ready for vSLX installation, as follows:
    1. List the slxos-dist directory.
      root@VLAB1:~# ls /slxos-dist
      extreme-lxc_2.0.0.deb  slxos17r.2.00  slxos17r.2.00.tar.gz  vslx_2.0.0.deb  vslx2.0.0.tar.gz
      Note

      Note

      You can also list included directories.
    2. Verify that the container's Ethernet interface is up and that an internet address is assigned.
      root@VLAB1:~# ifconfig -a
      eth0      Link encap:Ethernet  HWaddr 00:16:3e:b5:7d:b9  
                inet addr:192.0.2.0  Bcast:10.0.0.255  Mask:255.255.255.0
                inet6 addr: 2001:db8::/64 Scope:Link
                inet6 addr: 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff/64 Scope:Global
                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                RX packets:59 errors:0 dropped:0 overruns:0 frame:0
                TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000 
                RX bytes:9877 (9.8 KB)  TX bytes:1312 (1.3 KB)
      (output
      				truncated)
    3. Enter the ping command—specifying a known URL—to verify that you have internet connectivity.
      root@VLAB1:~# ping example.com
  6. Install the vSLX debian package.
    root@VLAB1:~# dpkg -i /slxos-dist/vslx_2.0.0.deb
    Selecting previously unselected package vslx-utils.
    (Reading database ... 13031 files and directories currently installed.)
    Preparing to unpack ./vslx_2.0.0.deb ...
    Unpacking vslx (2.0.0) ...
    Setting up vslx (2.0.0) ...
  7. Run the post-installation script.
    root@VLAB1:~# /VM/postinst-setup.sh
    Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
    Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease 
    Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]           
    Fetched 204 kB in 1s (202 kB/s)                              
    Reading package lists... Done
    Reading package lists... Done

After successful installation, proceed to Up-and-running example.