Intelligente Lösungen
in neuer Dimension

LXC: Neuer 32-Bit-Container

Kurzanleitung zur Erstellung eines neuen 32-Bit-Containers. Dieser Ablauf funktioniert mit Ubuntu-18.04 oder älter, er scheitert mit 20.04 oder neuer!

Anlegen und erster Start

1
2
3
$ lxc launch ubuntu:18.04/i386 ubuntu-1804-32-uli
Creating ubuntu-1804-32-uli
Starting ubuntu-1804-32-uli

Sichten

1
2
3
4
5
6
7
8
9
10
11
12
13
$ lxc ls ubuntu-1804-32-uli
+--------------------+---------+---------------------+------+-----------+-----------+
|      NAME          |  STATE  |        IPV4         | IPV6 |   TYPE    | SNAPSHOTS |
+--------------------+---------+---------------------+------+-----------+-----------+
| ubuntu-1804-32-uli | RUNNING | 10.2.110.192 (eth0) |      | CONTAINER | 0         |
+--------------------+---------+---------------------+------+-----------+-----------+

$ lxc config show ubuntu-1804-32-uli
...
profiles:
- default
stateful: false
description: ""

Anpassen

1
2
$ ./bin/lxc-hostonly.sh ubuntu-1804-32-uli
Profiles hostonly applied to ubuntu-1804-32-uli

Löschen

1
2
$ lxc delete ubuntu-1804-32-uli
$ lxc delete ubuntu-1804-32-uli --force

Ansible

host_vars/(server).yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/host_vars/(server).yml b/host_vars/(server).yml
index e9a9460..4e6d9bb 100644
--- a/host_vars/backup.yml
+++ b/host_vars/backup.yml
@@ -21,4 +21,10 @@ lxd:
       timezone: Europe/Berlin
       pubkeys: |
         ssh-rsa AAAAB3NzaC...DoITmw== uli.heller@daemons-point.com
+    - ubuntu_1804_32:
+      name: ubuntu-1804-32
+      alias: ubuntu/bionic/i386
+      timezone: Europe/Berlin
+      pubkeys: |
+        ssh-rsa AAAAB3NzaC...DoITmw== uli.heller@daemons-point.com

Ausrollen

1
2
3
4
5
6
7
8
9
10
$ ansible-playbook site.yml -l (server)
...
TASK [lxd-host : Copy image 'ubuntu/bionic/i386'] ********************************************
changed: [backup]

TASK [lxd-host : hostonly to nat] ************************************************************
changed: [backup]
...
PLAY RECAP ***********************************************************************************
backup : ok=78   changed=21   unreachable=0    failed=0    skipped=13   rescued=0    ignored=1

Fehler bei Ubuntu-20.04

1
2
3
$ lxc launch ubuntu:20.04/i386 ubuntu-2004-32
Creating ubuntu-2004-32
Error: Failed instance creation: Failed getting remote image info: Failed getting image: The requested image couldn't be found

Historie und Anmerkung

  • 2022-08-02: Hinweis auf 18.04
  • 2021-03-18: Erste Version