From e01ff70a77e781734e1e73a2238af2e9bf7967a8 Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Fri, 8 Apr 2016 13:22:54 +0200 Subject: nspawn: always setup machine id We check /etc/machine-id of the container and if it is already populated we use value from there, possibly ignoring value of --uuid option from the command line. When dealing with R/O image we setup transient machine id. Once we determined machine id of the container, we use this value for registration with systemd-machined and we also export it via container_uuid environment variable. As registration with systemd-machined is done by the main nspawn process we communicate container machine id established by setup_machine_id from outer child to the main process by unix domain socket. Similarly to PID of inner child. --- man/systemd-nspawn.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'man/systemd-nspawn.xml') diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml index 7e87865ba8..3f3bd38900 100644 --- a/man/systemd-nspawn.xml +++ b/man/systemd-nspawn.xml @@ -355,7 +355,9 @@ Set the specified UUID for the container. The init system will initialize /etc/machine-id from this if this file is - not set yet. + not set yet. Note that this option takes effect only if + /etc/machine-id in the container is + unpopulated. -- cgit v1.2.3-54-g00ecf