Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
app-notes:set-up-lxc [2024/11/22 16:34] – [1. Set up the LXC Contianer] grayapp-notes:set-up-lxc [2025/01/23 13:32] (current) – [2. Test LXC installation and set up further] gray
Line 26: Line 26:
 From a Jenkins server you get the current image for the container From a Jenkins server you get the current image for the container
  
-* Jenkins Server Page / [[https://jenkins.linuxcontainers.org/view/Images/job/image-debian/|Link]]+* Jenkins Server Page image-debian / [[https://jenkins.linuxcontainers.org/view/Images/job/image-debian/|Link]]
  
 The "''armhf''" tab is important here The "''armhf''" tab is important here
Line 45: Line 45:
  
 When the "Apply" button is pressed, Debian will be installed. When the "Apply" button is pressed, Debian will be installed.
 +
 +===== Other LXC container images =====
 +
 +Two more LXC images are currently being offered on the Jenkins server. 
 +You can use an Alpine or Ubuntu image for the container.
 +
 +* Jenkins Server Page image-alpine / [[https://jenkins.linuxcontainers.org/view/Images/job/image-alpine/|Link]]
 +
 +* Jenkins Server Page image-ubuntu / [[https://jenkins.linuxcontainers.org/view/Images/job/image-ubuntu/|Link]]
 +
 +
 +===== - Test LXC installation and set up further =====
 +
 +Under the console you can first check whether the installation has been carried out.
 +
 +<konsole>
 +~ $ cd /mnt/storage0/lxc/guest0
 +/mnt/storage0/lxc/guest0 $ ls
 +bin    dev    home   media  opt    root   sbin   sys    usr
 +boot   etc    lib    mnt    proc   run    srv    tmp    var
 +/mnt/storage0/lxc/guest0 $ 
 +</konsole>
 +
 +This file must be available under this directory structur
 +
 +<konsole>
 +~ $ lxc-info guest0
 +Name:           guest0
 +State:          RUNNING
 +PID:            20493
 +CPU use:        1.49 seconds
 +BlkIO use:      20.00 KiB
 +Memory use:     7.22 MiB
 +KMem use:       1.20 MiB
 +~ $ 
 +
 +</konsole>
 +
 +The LXC container is set up and already started.
 +
 +Set up the LXC container further. A network interface is enabled here. 
 +
 +{{:pictures:lxc_netzwerk.png?800|}}
 +
 +The container has now also been assigned an IP address.
 +
 +<konsole>
 +~ $ lxc-info guest0
 +Name:           guest0
 +State:          RUNNING
 +PID:            2255
 +IP:             192.168.1.149
 +CPU use:        1.57 seconds
 +BlkIO use:      4.00 KiB
 +Memory use:     6.29 MiB
 +KMem use:       1.18 MiB
 +Link:           virt0
 + TX bytes:      2.28 KiB
 + RX bytes:      853 bytes
 + Total bytes:   3.11 KiB
 +~ $ 
 +</konsole>
 +
 +Always assign a fixed IP address for the LXC container via the DHCP server.
 +
 +{{:pictures:lxc_ip_adresse.png?800|}}
 +
 +Log in to the LXC container and test whether it can access the Internet.
 +
 +<konsole>
 +~ $ lxc-attach guest0
 +root@LXCNAME:~# ping heise.de
 +PING heise.de (193.99.144.80) 56(84) bytes of data.
 +64 bytes from redirector.heise.de (193.99.144.80): icmp_seq=1 ttl=244 time=42.4 ms
 +64 bytes from redirector.heise.de (193.99.144.80): icmp_seq=2 ttl=244 time=31.0 ms
 +64 bytes from redirector.heise.de (193.99.144.80): icmp_seq=3 ttl=244 time=27.1 ms
 +--- heise.de ping statistics ---
 +3 packets transmitted, 3 received, 0% packet loss, time 2005ms
 +rtt min/avg/max/mdev = 27.116/33.504/42.432/6.505 ms
 +root@LXCNAME:~# 
 +</konsole>
 +
 +The container is installed and set up. Now you can set up further tools on the container.
 +
 +----
 +
 +=== Use this link to return to the SNMP setup ===
 +
 +* Back to SNMP setup / [[app-notes:set-up-snmp]]