From 92367938f6bf91598b453f259f322f5c5334045f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 25 May 2020 11:29:33 +0300 Subject: doc: document how to set hostname in image --- vmdb2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vmdb2.md b/vmdb2.md index 484dc5a..7ca4a55 100644 --- a/vmdb2.md +++ b/vmdb2.md @@ -141,6 +141,19 @@ device nodes, etc), it needs to be run using root privileges. For the same reason, it probably can't be run in an unprivileged container. +## Setting the hostname + +vmdb2 uses debootstrap, which copies the host's /etc/hostname file +into the image. You probably want to set the hostname for the image +you're creating. You can do this by overwriting the /etc/hostname file +in the image, for example with the following step: + +~~~yaml +- chroot: rootfs + shell: | + echo myhostname > /etc/hostname +~~~ + ## All images must be partitioned At this time, vmdb2 does not support building partitioned images -- cgit v1.2.1