]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vmspawn: do not pass console=hvc0 in GUI mode
authorLuca Boccassi <luca.boccassi@gmail.com>
Mon, 2 Feb 2026 10:59:24 +0000 (11:59 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 3 Feb 2026 09:50:34 +0000 (10:50 +0100)
This breaks when using qemu's GUI mode. Follow mkosi's example.

Follow-up for 773ca1def8f79a8509bf0846de9d75902ca31f79

src/vmspawn/vmspawn.c

index 06f6961b1a8b3228d804707366737725aebd71e1..c2be2c80388dc59e0b7f432b2622206eb4ee8365 100644 (file)
@@ -2451,9 +2451,11 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
                         return log_oom();
         }
 
-        r = strv_prepend(&arg_kernel_cmdline_extra, "console=hvc0");
-        if (r < 0)
-                return log_oom();
+        if (arg_console_mode != CONSOLE_GUI) {
+                r = strv_prepend(&arg_kernel_cmdline_extra, "console=hvc0");
+                if (r < 0)
+                        return log_oom();
+        }
 
         for (size_t j = 0; j < arg_runtime_mounts.n_mounts; j++) {
                 RuntimeMount *m = arg_runtime_mounts.mounts + j;