Skip to contentSkip to conversation

xl: do not try and auto re-connect console on reboot

PATCH New Ian Campbell 1 participant 1 message Jul 23, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xl: do not try and auto re-connect console on reboot

# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1279902312 -3600
# Node ID 56a9b511fee800bb7840a340e417f630e1ed9e79 # Parent dd296cdd2c7ce8447f9f82dd943c6fd3574c759a
xl: do not try and auto re-connect console on reboot

It is not possible to run the console client if we are rebooting a guest via the backgrounded xl process so we may as well turn off console autoconnect after the first boot.

tools/libxl/xl_cmdimpl.c +6 -0
diff -r dd296cdd2c7c -r 56a9b511fee8 tools/libxl/xl_cmdimpl.c
@@ -1175,6 +1175,12 @@ start:
             goto error_out;
     }
 
+    /*
+     * Do not attempt to reconnect if we come round again due to a
+     * guest reboot -- the stdin/out will be disconnected by then.
+     */
+    dom_info->console_autoconnect = 0;
+
     ret = libxl_run_bootloader(&ctx, &b_info, num_disks > 0 ? &disks[0] : NULL, domid);
     if (ret) {
         fprintf(stderr, "failed to run bootloader: %d\n", ret);