Changes between Version 8 and Version 9 of Csle2022/Agenda/Containers


Ignore:
Timestamp:
Nov 1, 2022, 3:57:15 PM (2 years ago)
Author:
dushmantha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/Containers

    v8 v9  
    187187Test internet connectivity.[[BR]]
    188188
    189 Login using PuTTY.
     189Login as root using PuTTY.
    190190
    191191'''Setup LXC'''
     
    194194
    195195{{{
    196 sudo lxd init
     196lxd init
    197197Would you like to use LXD clustering? (yes/no) [default=no]:
    198198Do you want to configure a new storage pool? (yes/no) [default=yes]:
     
    213213}}}
    214214
     215Make sure you edit the network interfaces as per your installation details. Don't remove any interface.
     216
     217{{{
     218network:
     219  version: 2
     220  ethernets:
     221    enp0s3:
     222      dhcp4: yes
     223    bridges:
     224      lxdbr0:
     225        dhcp4: yes
     226        interfaces:
     227          - enp0s3
     228}}}
     229
     230{{{
     231netplan apply
     232}}}
     233
     234Modify the default container profile to add bridged network.
     235
     236{{{
     237lxc profile edit default
     238}}}
     239
     240
     241{{{
     242config: {}
     243description: Default LXD profile
     244devices:
     245  eth0:
     246    nictype: bridged
     247    parent: lxdbr0
     248    type: nic
     249  root:
     250    path: /
     251    pool: default
     252    type: disk
     253name: default
     254used_by: []
     255}}}
     256
     257Check remote repositories
     258
     259{{{
     260lxc remote list
     261}}}
     262
     263Local repositories
     264
     265{{{
     266lxc image list
     267}}}
     268
     269Check remote images.
     270
     271{{{
     272lxc image list images:
     273lxc image list images:ubuntu
     274}}}
     275
     276Create a Ubuntu Container.
     277
     278{{{
     279lxc launch ubuntu:22.04 test-ct
     280lxc list
     281}}}
     282
     283Delete a container
     284
     285{{{
     286lxc stop test-ct
     287lxc delete --force test-ct
     288}}}
    215289
    216290'''Cloning'''