Incus agent in LXD VMs

I am on the LXD stable branch (5.0.2). The VMs I create have incus-agent running instead of lxd-agent. Am I using the wrong image by any chance?

Does Canonical now have its own image server for LXD?

By the way, I am pulling VM images from here: images:ubuntu/jammy/cloud (https://images.linuxcontainers.org/)

You are using LXD with the images: remote which pulls the community images from https://images.linuxcontainers.org/.

Due to recent changes in distrobuilder (which is used to build the community images) it now appears that VMs from the images remote are running the incus-agent when in fact they are still running the lxd-agent hosted by LXD, as it just symlinks incus-agent to lxd-agent:

https://github.com/lxc/distrobuilder/commit/118c7d550e67d4cdaeb280e3792a493b3e8921cb#diff-ca406f966a7e197a7dd51c565134a2c63887880a39056c12e5e2114a79fd608eR57-R62

Canonical only provides the official Ubuntu images using the ubuntu: remote.

So for example, the official Ubuntu Jammy image would be used as follows:

lxc launch ubuntu:22.04 c1

These include cloud-init and so are equivalent to the /cloud variants from the images: remote.

1 Like
$ lxc image list images: jammy/cloud/amd64 -c ldts
+-----------------------------+-------------------------------------+-----------------+-----------+
|            ALIAS            |             DESCRIPTION             |      TYPE       |   SIZE    |
+-----------------------------+-------------------------------------+-----------------+-----------+
| ubuntu/jammy/cloud (3 more) | Ubuntu jammy amd64 (20230914_07:42) | CONTAINER       | 134.01MiB |
+-----------------------------+-------------------------------------+-----------------+-----------+
| ubuntu/jammy/cloud (3 more) | Ubuntu jammy amd64 (20230914_07:42) | VIRTUAL-MACHINE | 285.94MiB |
+-----------------------------+-------------------------------------+-----------------+-----------+
$ lxc image list ubuntu: j/amd64 -c ldts
+------------+---------------------------------------------+-----------------+-----------+
|   ALIAS    |                 DESCRIPTION                 |      TYPE       |   SIZE    |
+------------+---------------------------------------------+-----------------+-----------+
| j (9 more) | ubuntu 22.04 LTS amd64 (release) (20230914) | CONTAINER       | 434.50MiB |
+------------+---------------------------------------------+-----------------+-----------+
| j (9 more) | ubuntu 22.04 LTS amd64 (release) (20230914) | VIRTUAL-MACHINE | 611.63MiB |
+------------+---------------------------------------------+-----------------+-----------+
$ lxc launch images:ubuntu/jammy/cloud u1 && lxc exec u1 -- cloud-init status --wait && lxc exec u1 -- free -h && lxc exec u1 -- ps aux && lxc delete -f u1
Creating u1
Starting u1
..............
status: done
               total        used        free      shared  buff/cache   available
Mem:           2.0Gi        45Mi       1.9Gi       0.0Ki        93Mi       2.0Gi
Swap:             0B          0B          0B
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.5 165448 10800 ?        Ss   16:11   0:00 /sbin/init
root         128  0.0  0.5  31336 12044 ?        Ss   16:11   0:00 /lib/systemd/systemd-journald
root         165  0.0  0.2  10560  5404 ?        Ss   16:11   0:00 /lib/systemd/systemd-udevd
systemd+     196  0.0  0.3  16116  6604 ?        Ss   16:11   0:00 /lib/systemd/systemd-networkd
systemd+     198  0.0  0.6  25528 12900 ?        Ss   16:11   0:00 /lib/systemd/systemd-resolved
root         241  0.0  0.0   9492  1240 ?        Ss   16:11   0:00 /usr/sbin/cron -f -P
message+     242  0.0  0.2   8428  4776 ?        Ss   16:11   0:00 @dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root         245  0.0  0.9  34304 19224 ?        Ss   16:11   0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
syslog       246  0.0  0.2 152764  4980 ?        Ssl  16:11   0:00 /usr/sbin/rsyslogd -n -iNONE
root         247  0.0  0.3  15000  7116 ?        Ss   16:11   0:00 /lib/systemd/systemd-logind
root         249  0.0  0.0   8396  1080 pts/0    Ss+  16:11   0:00 /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 linux
root         255  0.0  1.0 112304 21844 ?        Ssl  16:11   0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root         296  0.0  0.1  13060  3252 pts/1    Rs+  16:11   0:00 ps aux
$ lxc launch ubuntu:j u1 && lxc exec u1 -- cloud-init status --wait && lxc exec u1 -- free -h && lxc exec u1 -- ps aux && lxc delete -f u1
Creating u1
Starting u1
..................................
status: done
               total        used        free      shared  buff/cache   available
Mem:           2.0Gi        80Mi       1.7Gi       0.0Ki       244Mi       1.9Gi
Swap:             0B          0B          0B
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.5 167240 12540 ?        Ss   16:12   0:00 /sbin/init
root          57  0.0  0.6  31332 12832 ?        Ss   16:12   0:00 /lib/systemd/systemd-journald
root         102  0.0  0.2  11084  5876 ?        Ss   16:12   0:00 /lib/systemd/systemd-udevd
root         109  0.0  0.0   4800  1704 ?        Ss   16:12   0:00 snapfuse /var/lib/snapd/snaps/lxd_24322.snap /snap/lxd/24322 -o ro,nodev,allow_other,suid
root         110  0.0  0.0   4928  1692 ?        Ss   16:12   0:02 snapfuse /var/lib/snapd/snaps/snapd_20092.snap /snap/snapd/20092 -o ro,nodev,allow_other,suid
root         111  0.0  0.0   4860  1732 ?        Ss   16:12   0:00 snapfuse /var/lib/snapd/snaps/core20_2015.snap /snap/core20/2015 -o ro,nodev,allow_other,suid
systemd+     305  0.0  0.3  16116  6496 ?        Ss   16:12   0:00 /lib/systemd/systemd-networkd
systemd+     307  0.0  0.6  25528 12924 ?        Ss   16:12   0:00 /lib/systemd/systemd-resolved
root         339  0.0  0.1   7284  2772 ?        Ss   16:12   0:00 /usr/sbin/cron -f -P
message+     340  0.0  0.2   8588  4760 ?        Ss   16:12   0:00 @dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root         345  0.0  0.8  33084 18568 ?        Ss   16:12   0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
syslog       346  0.0  0.2 152764  5120 ?        Ssl  16:12   0:00 /usr/sbin/rsyslogd -n -iNONE
root         347  0.0  1.9 2428664 39876 ?       Ssl  16:12   0:00 /usr/lib/snapd/snapd
root         349  0.0  0.3  15000  7284 ?        Ss   16:12   0:00 /lib/systemd/systemd-logind
root         355  0.0  0.0   6216  1124 pts/0    Ss+  16:12   0:00 /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 linux
root         373  0.0  0.4  15420  8740 ?        Ss   16:12   0:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
root         374  0.0  1.0 110084 21676 ?        Ssl  16:12   0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root         905  0.0  0.3  14688  6332 ?        Ss   16:12   0:00 /lib/systemd/systemd-timedated
root        1014  0.0  0.1  10460  3356 pts/1    Rs+  16:12   0:00 ps aux

They might be similar in the way of handling cloud-init, but there are a few more differences than just that as can be seen from the above commands.

Indeed there is. For one snapd is included in the official images and not in the community ones.

Another thing I can remember other than snap is that Ubuntu images come with OpenSSH server installed.

Btw, I should have probably explained what the commands do in my previous post. They’re showing different image sizes, different memory usage while running and different list of running processes.