From b8db8e557b8c5e22a2e387bdd2436b15c99f6ab7 Mon Sep 17 00:00:00 2001 From: Sam Leonard Date: Fri, 12 Apr 2024 14:35:26 +0100 Subject: [PATCH] man: add example --forward-journal= example for vmspawn --- man/systemd-vmspawn.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/man/systemd-vmspawn.xml b/man/systemd-vmspawn.xml index f9483f2d0ec..e8d460ef4fc 100644 --- a/man/systemd-vmspawn.xml +++ b/man/systemd-vmspawn.xml @@ -525,6 +525,22 @@ $ sha256sum -c Fedora-Cloud-&fedora_latest_version;-&fedora_cloud_release;-x86_6 # systemd-vmspawn -M fedora-&fedora_latest_version;-cloud + + + Build and run systemd's system image and forward the VM's journal to a local file + + +$ mkosi build +$ systemd-vmspawn \ + -D mkosi.output/system \ + --private-users $(grep $(whoami) /etc/subuid | cut -d: -f2) \ + --linux mkosi.output/system.efi \ + --forward-journal=vm.journal \ + enforcing=0 + + + Note: this example also uses a kernel command line argument to ensure SELinux isn't started in enforcing mode. + -- 2.47.3