[lxc-devel] [lxd/master] doc/image-handling: Cover publishing

stgraber on Github lxc-bot at linuxcontainers.org
Thu Oct 1 23:24:59 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201001/8cc856c1/attachment-0001.bin>
-------------- next part --------------
From 113fa6a719aab6c612148968c1b39bceb838f4b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 1 Oct 2020 19:24:45 -0400
Subject: [PATCH] doc/image-handling: Cover publishing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 doc/image-handling.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/doc/image-handling.md b/doc/image-handling.md
index c9222208dc..92c852c6d3 100644
--- a/doc/image-handling.md
+++ b/doc/image-handling.md
@@ -83,6 +83,19 @@ On the client side, this is used with:
 
 `lxc image import URL --alias some-name`
 
+### Publishing an instance or snapshot as a new image
+An instance or one of its snapshots can be turned into a new image.
+This is done on the CLI with `lxc publish`.
+
+When doing this, you will most likely first want to cleanup metadata and
+templats on the instance you're publishing using the `lxc config metadata`
+and `lxc config template` commands. You will also want to remove any
+instance-specific state like host SSH keys, dbus/systemd machine-id, ...
+
+The publishing process can take quite a while as a tarball must be
+generated from the instance and then be compressed. As this can be
+particularly I/O and CPU intensive, publish operations are serialized by LXD.
+
 ## Caching
 When spawning an instance from a remote image, the remote image is
 downloaded into the local image store with the cached bit set. The image


More information about the lxc-devel mailing list