]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vmspawn: split out networking related options into its own "Networking" section in...
authorLennart Poettering <lennart@amutable.com>
Wed, 20 May 2026 13:50:32 +0000 (15:50 +0200)
committerLennart Poettering <lennart@amutable.com>
Wed, 20 May 2026 21:38:30 +0000 (23:38 +0200)
man/systemd-vmspawn.xml
src/vmspawn/vmspawn.c

index f31d1a3df273168b551d83b05dc90b4936a3c72f..c70b76c4980b8d39c9dbed29d9500c15c3ae12da 100644 (file)
           </listitem>
         </varlistentry>
 
-        <varlistentry>
-          <term><option>-n</option></term>
-          <term><option>--network-tap</option></term>
-
-          <listitem>
-            <para>Create a TAP device to network with the virtual machine.</para>
-
-            <para>Note: root privileges are required to use TAP networking.
-            Additionally,
-            <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-            must be running and correctly set up on the host to provision the host interface. The relevant
-            <literal>.network</literal> file can be found at
-            <filename>/usr/lib/systemd/network/80-vm-vt.network</filename>.
-            </para>
-
-            <xi:include href="version-info.xml" xpointer="v255"/>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>--network-user-mode</option></term>
-
-          <listitem><para>Use user mode networking.</para>
-
-          <xi:include href="version-info.xml" xpointer="v255"/></listitem>
-        </varlistentry>
-
         <varlistentry>
           <term><option>--firmware=<replaceable>PATH</replaceable></option></term>
 
       </variablelist>
     </refsect2>
 
+    <refsect2>
+      <title>Networking Options</title>
+
+      <variablelist>
+        <varlistentry>
+          <term><option>-n</option></term>
+          <term><option>--network-tap</option></term>
+
+          <listitem>
+            <para>Create a TAP device to network with the virtual machine.</para>
+
+            <para>Note: root privileges are required to use TAP networking.
+            Additionally,
+            <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+            must be running and correctly set up on the host to provision the host interface. The relevant
+            <literal>.network</literal> file can be found at
+            <filename>/usr/lib/systemd/network/80-vm-vt.network</filename>.
+            </para>
+
+            <xi:include href="version-info.xml" xpointer="v255"/>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><option>--network-user-mode</option></term>
+
+          <listitem><para>Use user mode networking.</para>
+
+          <xi:include href="version-info.xml" xpointer="v255"/></listitem>
+        </varlistentry>
+      </variablelist>
+    </refsect2>
+
     <refsect2>
       <title>System Identity Options</title>
 
index 0c3c6a8109f1b178b1ce84150f47687353510ffb..cc26309317b95b7392232fa8d1d81220a1f678f5 100644 (file)
@@ -232,6 +232,7 @@ static int help(void) {
                 NULL,
                 "Image",
                 "Host Configuration",
+                "Networking",
                 "Execution",
                 "System Identity",
                 "Properties",
@@ -255,7 +256,7 @@ static int help(void) {
         (void) table_sync_column_widths(
                         0, tables[0], tables[1], tables[2], tables[3], tables[4],
                         tables[5], tables[6], tables[7], tables[8], tables[9], tables[10],
-                        tables[11]);
+                        tables[11], tables[12]);
 
         help_cmdline("[OPTIONS...] [ARGUMENTS...]");
         help_abstract("Spawn a command or OS in a virtual machine.");
@@ -540,14 +541,6 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
                 }
 
-                OPTION('n', "network-tap", NULL, "Create a TAP device for networking"):
-                        arg_network_stack = NETWORK_STACK_TAP;
-                        break;
-
-                OPTION_LONG("network-user-mode", NULL, "Use user mode networking"):
-                        arg_network_stack = NETWORK_STACK_USER;
-                        break;
-
                 OPTION_LONG("secure-boot", "BOOL|auto", "Enable searching for firmware supporting SecureBoot"): {
                         int b;
 
@@ -666,6 +659,16 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
                 }
 
+                OPTION_GROUP("Networking"): {}
+
+                OPTION('n', "network-tap", NULL, "Create a TAP device for networking"):
+                        arg_network_stack = NETWORK_STACK_TAP;
+                        break;
+
+                OPTION_LONG("network-user-mode", NULL, "Use user mode networking"):
+                        arg_network_stack = NETWORK_STACK_USER;
+                        break;
+
                 OPTION_GROUP("Execution"): {}
 
                 OPTION('s', "smbios11", "STRING", "Pass an arbitrary SMBIOS Type #11 string to the VM"):