Confused about architectures

I have two servers running lxc/lxd. One was properly setup by a colleague leaving no docs behind, and the other configured halfway, for some value of halfway.

I managed to guess many of the things he did, but the last step is managing images. We’ve been using hv1 for launching containers using the centos 7 amd64 cloud image that I can see listed in https://uk.images.linuxcontainers.org/, but hv2 fails citing 404. At least that matche what I can see in this output:

mdione@demo-hv1:~/src/works/cloudian$ sudo lxc image list images: | grep centos
| centos/6 (3 more)                    | ffc3f62f6769 | yes    | Centos 6 amd64 (20191126_07:08)              | x86_64  | 75.84MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/6/cloud (1 more)              | 3b8c53c4ec50 | yes    | Centos 6 amd64 (20191126_07:08)              | x86_64  | 84.25MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/6/cloud/i386                  | 19984690de1a | yes    | Centos 6 i386 (20191125_16:19)               | i686    | 84.29MB  | Nov 25, 2019 at 12:00am (UTC) |
| centos/6/i386 (1 more)               | 069cb19f05a3 | yes    | Centos 6 i386 (20191126_07:08)               | i686    | 75.98MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/7 (3 more)                    | 407f445301b7 | yes    | Centos 7 amd64 (20191126_07:08)              | x86_64  | 83.20MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/7/arm64 (1 more)              | fe019d9be023 | yes    | Centos 7 arm64 (20191126_07:08)              | aarch64 | 80.79MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/7/armhf (1 more)              | 1b8908d98a70 | yes    | Centos 7 armhf (20191126_07:08)              | armv7l  | 78.78MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/7/cloud (1 more)              | 3342288ec8e6 | yes    | Centos 7 amd64 (20191126_07:08)              | x86_64  | 89.72MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/7/cloud/arm64                 | 86f7272cfad9 | yes    | Centos 7 arm64 (20191126_07:08)              | aarch64 | 87.23MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/7/cloud/armhf                 | 424c3834f9de | yes    | Centos 7 armhf (20191126_09:39)              | armv7l  | 85.15MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/7/cloud/i386                  | 0347c9b271fd | yes    | Centos 7 i386 (20191126_07:08)               | i686    | 90.32MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/7/cloud/ppc64el               | 2bef6153b95e | yes    | Centos 7 ppc64el (20191126_07:08)            | ppc64le | 90.36MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/7/i386 (1 more)               | b1e5634d8bf5 | yes    | Centos 7 i386 (20191126_07:08)               | i686    | 83.61MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/7/ppc64el (1 more)            | 527672a93133 | yes    | Centos 7 ppc64el (20191126_07:08)            | ppc64le | 83.73MB  | Nov 26, 2019 at 12:00am (UTC) |
| centos/8 (3 more)                    | 8c1397d759c8 | yes    | Centos 8 amd64 (20191126_07:08)              | x86_64  | 120.94MB | Nov 26, 2019 at 12:00am (UTC) |
| centos/8/arm64 (1 more)              | d53dbe284818 | yes    | Centos 8 arm64 (20191126_07:08)              | aarch64 | 116.79MB | Nov 26, 2019 at 12:00am (UTC) |
| centos/8/cloud (1 more)              | f6a14fd8168a | yes    | Centos 8 amd64 (20191126_07:08)              | x86_64  | 135.38MB | Nov 26, 2019 at 12:00am (UTC) |
| centos/8/cloud/arm64                 | df49c146797e | yes    | Centos 8 arm64 (20191126_07:08)              | aarch64 | 131.08MB | Nov 26, 2019 at 12:00am (UTC) |
| centos/8/cloud/ppc64el               | d1bc21c9d021 | yes    | Centos 8 ppc64el (20191126_07:08)            | ppc64le | 138.42MB | Nov 26, 2019 at 12:00am (UTC) |
| centos/8/ppc64el (1 more)            | cc9e611f5d33 | yes    | Centos 8 ppc64el (20191126_07:08)            | ppc64le | 123.52MB | Nov 26, 2019 at 12:00am (UTC) |

Notice the *64 image I’m using is not listed there.

To make things worse, lxc mentions Intel based 64bits architectures in many ways:

  • amd64 (expected on any Debian based distro, but I’m trying to use CentOS, so I would expect x86_64)
  • x86_64 (usual in RedHat et al based distros)
  • i686 (I guess this is really a 32bits one)
  • i386 (This definitely is 32bits)

I have several questions:

  1. Which is the 64bits architecture that I want?
  2. Why lxc does not find the *64 architecture I need?
  3. Why the different labels for architectures?

Hi!

When you want to list the centos images, you can also run lxc image list images:centos. The centos in images:centos means that it will match the string anywhere in the name of the container image.

Indeed, you do not see any reference to amd64, are the x86_64 images really missing? There is, for example, centos/8 but why does it not mention in the name amd64? Let’s see in detail what is centos/8.

$ lxc image list images:centos/8
Fingerprint: 8c1397d759c84d12010ac60932c2665a39889a971030f994dfb86cfe095efd0c
Size: 120.94MB
Architecture: x86_64
Type: container
Public: yes
Timestamps:
    Created: 2019/11/26 00:00 UTC
    Uploaded: 2019/11/26 00:00 UTC
    Expires: never
    Last used: never
Properties:
    release: 8
    architecture: amd64
    serial: 20191126_07:08
    description: Centos 8 amd64 (20191126_07:08)
    type: squashfs
    os: Centos
Aliases:
    - centos/8/default
    - centos/8/default/amd64
    - centos/8
    - centos/8/amd64
Cached: no
Auto update: disabled

The centos/8 has the alias centos/8/amd64, which means that for your server (which is x86_64) you can use either names and you get the x86_64 container image. For simplicity, the image appears as centos/8 without the specifier amd64 because it is implied for your server architecture.

  1. amd64 and x86_64 are used interchangeably. It is a Linux thing that it says amd64 because originally the Linux architecture port for 64-bit Intel compatible CPU was codenamed amd64. I think AMD had the first 64-bit compatible Intel CPUs or something. But amd64 is used for both AMD and Intel 64-bit CPUs.
  2. In LXD, you cannot use the other architecture container images on your system. lxc image list just shows them for you. If you setup LXD on a arm64 developer board, then you can use the arm64 container images (and not any others). The *64 architecture container images are there; because of the notation for what is default, you do not need to specify the architecture in the container image name.
  3. lxc image list shows all available container images, including other architectures. Some distributions may not be available to all architectures. But you know that with lxc image list, you can have a full view of what’s available.

With lxc remote list you can view the available remotes. For example, when you run lxc image list images:, the images: comes from the name of the specific remote. You mention that a hv2 gives you some error when you list container images. Use lxc remote list to figure out where it points to.