Deprecated container templates

15 views
Skip to first unread message

Narcis Garcia

unread,
Dec 21, 2023, 2:49:25 AM12/21/23
to LXC users SPM
Hello,

I've explored github.com/lxc/lxc-ci and I've seen that new versions of
YAML schemas remove old distro versions, and at same time
images.linuxcontainers.org is cleaned from corresponding deprecated images.

I want to know how to use lxc-create and get those old templates or, at
least, a syntax for distrobuilder uses old YAML schemas.
For example, to create an Ubuntu/Trusty container.

Thank you.
--

Narcis Garcia

__________
I'm using this dedicated address because personal addresses aren't
masked enough at this mail public archive. Public archive administrator
should remove and omit any @, dot and mailto combinations against
automated addresses collectors.

Stéphane Graber

unread,
Dec 21, 2023, 10:45:07 AM12/21/23
to Narcis Garcia, LXC users SPM
Hey there,

You'd indeed want to get distrobuilder on your system
(https://github.com/lxc/distrobuilder), then chase down an older
version of the .yaml in the lxc-ci repo
(https://gituhb.com/lxc/lxc-ci) and finally run `distrobuilder
build-lxc image.yaml -o image.release=RELEASE -o
image.architecture=ARCHITECTURE` (also `-o image.variant=VARIANT if an
image that has variants).

For trusty, that'd most likely be `distrobuilder build-lxc ubuntu.yaml
-o image.release=trusty -o image.architecture=amd64 -o
image.variant=default`, the resulting image files can then be used
with the `lxc-local` template (`lxc-create -t local`).

Stéphane
> --
> You received this message because you are subscribed to the Google Groups "lxc-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to lxc-users+...@lists.linuxcontainers.org.
> To view this discussion on the web visit https://groups.google.com/a/lists.linuxcontainers.org/d/msgid/lxc-users/043012ff-db87-e923-4fbe-14f739061412%40actiu.net.



--
Stéphane

Narcis Garcia

unread,
Dec 21, 2023, 11:37:08 AM12/21/23
to LXC users SPM
Than you Stéphane;

Is there some sure procedure to find last version of YAML schemas for
deprecated distro/versions?

Narcís.

El 21/12/23 a les 16:44, 'Stéphane Graber' via lxc-users ha escrit:

Narcis Garcia

unread,
Dec 21, 2023, 11:53:17 AM12/21/23
to lxc-...@lists.linuxcontainers.org
Once saved an YAML schema as /tmp/ubuntu.yaml I tried this final command:

$ sudo /snap/bin/distrobuilder build-dir /tmp/ubuntu.yaml -o
source.downloader=ubuntu-http -o image.distribution=ubuntu -o
image.release=trusty -o image.architecture=amd64 -o
image.variant=default -o packages.manager=apt /tmp/ubuntu.dir

INFO [2023-12-21T16:49:39Z] Downloading source
Error: Error while downloading source: Failed to download image: Failed
to get latest release: Failed to GET "/releases/trusty/release/": Get
"/releases/trusty/release/": unsupported protocol scheme ""
ERROR [2023-12-21T16:49:42Z] Failed running distrobuilder
err="Error while downloading source: Failed to download image:
Failed to get latest release: Failed to GET
\"/releases/trusty/release/\": Get \"/releases/trusty/release/\":
unsupported protocol scheme \"\""
INFO [2023-12-21T16:49:42Z] Removing cache directory


El 21/12/23 a les 16:44, 'Stéphane Graber' via lxc-users ha escrit:

Narcis Garcia

unread,
Dec 21, 2023, 11:58:51 AM12/21/23
to LXC users SPM
Sorry; these are the command and the result (not previous copied ones):

$ sudo /snap/bin/distrobuilder build-dir /tmp/ubuntu.yaml -o
image.release=trusty -o image.architecture=amd64 -o
image.variant=default /tmp/ubuntu.dir

Error: Failed to get definition: yaml: unmarshal errors:
line 283: field create-message not found in type
shared.DefinitionTargetLXC
ERROR [2023-12-21T16:56:22Z] Failed running distrobuilder
err="Failed to get definition: yaml: unmarshal errors:\n line 283:
field create-message not found in type shared.DefinitionTargetLXC"
INFO [2023-12-21T16:56:22Z] Removing cache directory


El 21/12/23 a les 17:53, Narcis Garcia ha escrit:
Reply all
Reply to author
Forward
0 new messages