man: add example --forward-journal= example for vmspawn
authorSam Leonard <sam.leonard@codethink.co.uk>
Fri, 12 Apr 2024 13:35:26 +0000 (14:35 +0100)
committerSam Leonard <sam.leonard@codethink.co.uk>
Fri, 19 Apr 2024 15:38:49 +0000 (16:38 +0100)
man/systemd-vmspawn.xml

index f9483f2d0ec014a6042f3529e0c9909c2ccfe09a..e8d460ef4fc248671894fe61bf1940eef7f67bc5 100644 (file)
@@ -525,6 +525,22 @@ $ sha256sum -c Fedora-Cloud-&fedora_latest_version;-&fedora_cloud_release;-x86_6
 # systemd-vmspawn -M fedora-&fedora_latest_version;-cloud
       </programlisting>
     </example>
+
+    <example>
+      <title>Build and run systemd's system image and forward the VM's journal to a local file</title>
+
+      <programlisting>
+$ 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
+      </programlisting>
+
+      <para>Note: this example also uses a kernel command line argument to ensure SELinux isn't started in enforcing mode.</para>
+    </example>
   </refsect1>
 
   <refsect1>