Initial set of distrobuilder VM images

We have now landed enough of @monstermunchkin’s VM work into distrobuilder to allow for building an initial set of images.

Currently that’s just Ubuntu x86_64 images for xenial, bionic, eoan and focal in both normal and cloud variants.

Those images are slightly smaller than the existing ones from the ubuntu: remote and do have the LXD agent loading units pre-baked, so no need for cloud-init, ssh, … You can just launch them and use them with lxc exec (after letting it boot for a few seconds).

We will be following this work with aarch64 images shortly and have initial work done to add both Debian and Fedora images to the mix. We will then follow with the rest of the distributions.

For the normal variant, you’ll notice that the hostname isn’t quite right and needs manual fixing. This will be resolved by us adding proper support for file templating in virtual machines at the LXD layer. We’re expecting LXD 3.22 to support that properly.

stgraber@castiana:~$ lxc launch images:ubuntu/bionic bionic --vm
Creating bionic
Starting bionic
stgraber@castiana:~$ lxc launch images:ubuntu/bionic/cloud bionic-cloud --vm
Creating bionic-cloud
Starting bionic-cloud
stgraber@castiana:~$ lxc list bionic
+--------------+---------+------------------------+------------------------------------------------+-----------------+-----------+
|     NAME     |  STATE  |          IPV4          |                      IPV6                      |      TYPE       | SNAPSHOTS |
+--------------+---------+------------------------+------------------------------------------------+-----------------+-----------+
| bionic       | RUNNING | 10.166.11.254 (enp5s0) | 2001:470:b368:4242:216:3eff:fee8:b76d (enp5s0) | VIRTUAL-MACHINE | 0         |
+--------------+---------+------------------------+------------------------------------------------+-----------------+-----------+
| bionic-cloud | RUNNING | 10.166.11.50 (enp5s0)  | 2001:470:b368:4242:216:3eff:fe26:4075 (enp5s0) | VIRTUAL-MACHINE | 0         |
+--------------+---------+------------------------+------------------------------------------------+-----------------+-----------+
stgraber@castiana:~$ lxc exec bionic-cloud bash
root@bionic-cloud:~# exit
stgraber@castiana:~$
1 Like

lxc is short cut for linux containers
why not make new command and name it lxv work like lxc but for virtual machines?

Actually, in the context of LXD, the lxc tool stands for LXD client (yes, confusing but I didn’t pick those names).

lxv has been suggested before but it would likely cause more confusion than clear any. Everything with VMs behaves the same as with containers and can usually be shared between the two.

So if we had lxc and lxv, it may feel quite odd that every command, except for init and launch behave and produce the exact same output. Creating a profile with one would be visible in the other for example, despite the two different commands giving the impression that you’re dealing with a completely different set of objects.

1 Like

that correct, thank you

And we now have aarch64 images too:

root@delmak:~# lxc launch images:ubuntu/bionic b1 --vm -c security.secureboot=false
Creating b1
Starting b1                                   
root@delmak:~# lxc launch images:ubuntu/bionic/cloud b1-cloud --vm -c security.secureboot=false
Creating b1-cloud
Starting b1-cloud  
root@delmak:~# lxc list b1
+----------+---------+-------------------------+-----------------------------------------------+-----------------+-----------+
|   NAME   |  STATE  |          IPV4           |                     IPV6                      |      TYPE       | SNAPSHOTS |
+----------+---------+-------------------------+-----------------------------------------------+-----------------+-----------+
| b1       | RUNNING | 10.138.138.90 (enp5s0)  | fd42:55a:955c:f7e:216:3eff:fee2:6ae4 (enp5s0) | VIRTUAL-MACHINE | 0         |
+----------+---------+-------------------------+-----------------------------------------------+-----------------+-----------+
| b1-cloud | RUNNING | 10.138.138.105 (enp5s0) | fd42:55a:955c:f7e:216:3eff:fe19:d520 (enp5s0) | VIRTUAL-MACHINE | 0         |
+----------+---------+-------------------------+-----------------------------------------------+-----------------+-----------+
root@delmak:~# lxc exec b1 -- uname -m
aarch64

You’ll notice that secureboot is getting disabled here. That’s because proper signing of arm64 UEFI images is still pretty new and apparently buggy. Some Ubuntu releases have it enabled but we’ve been seeing issues with grub trying to boot the signed kernel.

Hey just to be 100% there are now no VM images being distributed by you guys without LXD agent already installed ?

All the images on the images: remote will have the LXD agent loader units baked in.

The images you can get from ubuntu: and ubuntu-daily: are somewhat outside of our control and currently do not have the agent loader units integrated. I submitted a package for lxd-agent-loader to Ubuntu and should that be included and approved by the security team, we’ll eventually get all Ubuntu images on those two remotes to behave too.

We have now expanded the selection a fair bit:

root@lantea:~# lxc list
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
|           NAME            |  STATE  |         IPV4          |                       IPV6                       |      TYPE       | SNAPSHOTS |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| archlinux                 | RUNNING | 10.33.80.161 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fe73:6dff (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| debian-10                 | RUNNING | 10.33.80.99 (enp5s0)  | fd42:b5a6:a469:95eb:216:3eff:fe39:6ec (enp5s0)   | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| debian-10-cloud           | RUNNING | 10.33.80.80 (enp5s0)  | fd42:b5a6:a469:95eb:216:3eff:fe68:eaf9 (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| debian-11                 | RUNNING | 10.33.80.214 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fee9:5e6d (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| debian-11-cloud           | RUNNING | 10.33.80.180 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fec8:8b19 (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| debian-8                  | RUNNING | 10.33.80.66 (eth0)    | fd42:b5a6:a469:95eb:216:3eff:fee5:9b2a (eth0)    | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| debian-8-cloud            | RUNNING | 10.33.80.245 (eth0)   | fd42:b5a6:a469:95eb:216:3eff:febf:48f1 (eth0)    | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| debian-9                  | RUNNING | 10.33.80.197 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fe45:5b17 (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| debian-9-cloud            | RUNNING | 10.33.80.20 (enp5s0)  | fd42:b5a6:a469:95eb:216:3eff:fe6b:b876 (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| debian-sid                | RUNNING | 10.33.80.228 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fe8e:57ef (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| debian-sid-cloud          | RUNNING | 10.33.80.90 (enp5s0)  | fd42:b5a6:a469:95eb:216:3eff:feb2:5747 (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| fedora-30                 | RUNNING | 10.33.80.244 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fe04:426f (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| fedora-30-cloud           | RUNNING | 10.33.80.181 (enp5s0) | fd42:b5a6:a469:95eb:1d06:d814:e93c:efd4 (enp5s0) | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| fedora-31                 | RUNNING | 10.33.80.235 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:feb4:e2f2 (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| fedora-31-cloud           | RUNNING | 10.33.80.96 (enp5s0)  | fd42:b5a6:a469:95eb:1dde:c8ae:f83:10e (enp5s0)   | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| opensuse-15-1             | RUNNING | 10.33.80.70 (eth0)    | fd42:b5a6:a469:95eb:dc65:b745:8ccf:5372 (eth0)   | VIRTUAL-MACHINE | 0         |
|                           |         |                       | fd42:b5a6:a469:95eb:216:3eff:fec0:7eb7 (eth0)    |                 |           |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| opensuse-15-1-cloud       | RUNNING | 10.33.80.182 (eth0)   | fd42:b5a6:a469:95eb:947e:133:32e3:d0a9 (eth0)    | VIRTUAL-MACHINE | 0         |
|                           |         |                       | fd42:b5a6:a469:95eb:216:3eff:fe68:7d67 (eth0)    |                 |           |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| opensuse-tumbleweed       | RUNNING | 10.33.80.2 (enp5s0)   | fd42:b5a6:a469:95eb:3d28:1d45:b08e:eb2c (enp5s0) | VIRTUAL-MACHINE | 0         |
|                           |         |                       | fd42:b5a6:a469:95eb:216:3eff:fe1e:2608 (enp5s0)  |                 |           |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| opensuse-tumbleweed-cloud | RUNNING | 10.33.80.53 (enp5s0)  | fd42:b5a6:a469:95eb:38ca:5a35:7af7:9806 (enp5s0) | VIRTUAL-MACHINE | 0         |
|                           |         |                       | fd42:b5a6:a469:95eb:216:3eff:fefa:9eaf (enp5s0)  |                 |           |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| ubuntu-16-04              | RUNNING | 10.33.80.238 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fe53:c723 (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| ubuntu-16-04-cloud        | RUNNING | 10.33.80.184 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fe3c:e16e (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| ubuntu-18-04              | RUNNING | 10.33.80.178 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fefe:1310 (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| ubuntu-18-04-cloud        | RUNNING | 10.33.80.85 (enp5s0)  | fd42:b5a6:a469:95eb:216:3eff:fe96:ad8a (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| ubuntu-eoan               | RUNNING | 10.33.80.109 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fe3a:cee0 (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| ubuntu-eoan-cloud         | RUNNING | 10.33.80.221 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fe5c:3e86 (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| ubuntu-focal              | RUNNING | 10.33.80.59 (enp5s0)  | fd42:b5a6:a469:95eb:216:3eff:fe1f:b4ab (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+
| ubuntu-focal-cloud        | RUNNING | 10.33.80.213 (enp5s0) | fd42:b5a6:a469:95eb:216:3eff:fea5:a8ea (enp5s0)  | VIRTUAL-MACHINE | 0         |
+---------------------------+---------+-----------------------+--------------------------------------------------+-----------------+-----------+

Note that the following require secureboot be disabled (security.secureboot=false):

  • archlinux
  • debian/8 and debian/8/cloud
  • debian/9 and debian/9/cloud

Additionally, opensuse has an annoying prompt on first boot on the console for secureboot.
So you either need to handle that prompt or also disable secureboot for those.

We’ve now added CentOS 7/8.

Great news!

These are great news…

a couple of comments/questions

what are the difference between the standard image and the cloud image… on the standard image I had to manually edit /etc/hostname on the cloud-image I didn’t. what is the purpose of having the non cloud image?

Any tutorial/ hints on how to use th cloud image and specify a bigger/custom HDD size for the root partition?

Now… I know this is out of the scope for LXC/LXD team… but MAAS has made some changes from what the called “PODS” into now they are called “KVM HOSTS” and you can create a KVM VM within MAAS.

Any ideas if their roadmap is aligned with LXD/LXC for the ability of creating containers from MAAS ? it seems they are pushing a lot these PODS/KVM but for containers there is only a container tab. but they treat them as “DEVICES” so when I click on a container that is registered on the DNS under any domain, it fails (already sumbitted the bug in MAAS<

It seems there is no one interested in seen CONTAINERS properly integrated with MAAS). only for juju integration…

If you are pushing towards managing KVMs under LXD, should other Ubuntu teams try to align with a similar goal? (I know it is not directly in your hands, but maybe you can push more than a nobody like me asking for feature requests that no one is interested in)

Thanks and sorry for the wining… I love command line… but I have been having trouble evangelizing LXC/LXD to people used to Citrix/VMWare and even virt-manager users…

The hostname thing will be fixed when using LXD 3.22.

The cloud images have cloud-init pre-installed which runs a wide variety of things on boot, including generating the hostname file which is why you didn’t see the issue with that image.

As for MAAS, I don’t believe there is any plan on creating containers through it at this time. The current focus is on getting MAAS to use LXD for VMs, replacing libvirt in that regard.

Similarly Multipass on Linux will also be using LXD to run VMs.

We now have Gentoo available (requires secureboot to be disabled).

images from Ubuntu remote doesn’t have LXD agent

lxc launch ubuntu:18.04 u84 --vm
lxc launch ubuntu:bionic u84 --vm

That’s correct. For those you need to use cloud-init to provision a user, once you have a user in there, you can install the LXD agent with:

  • mount -t 9p config /mnt
  • cd /mnt
  • ./install.sh
  • reboot

I did push our agent integration package to Ubuntu but it’s been sitting in a review queue for well over a month now… Hopefully it eventually gets accepted and included in the official images.