vmspawn: do not pass console=hvc0 in GUI mode

This breaks when using qemu's GUI mode. Follow mkosi's example.

Follow-up for 773ca1def8
This commit is contained in:
Luca Boccassi
2026-02-03 10:50:34 +01:00
parent 0375558799
commit 610d8c3dfc
+5 -3
View 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;