xl: do not try and auto re-connect console on reboot
authorIan Campbell <ian.campbell@citrix.com>
Fri, 23 Jul 2010 17:12:42 +0000 (18:12 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 23 Jul 2010 17:12:42 +0000 (18:12 +0100)
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.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c

index bfa8dbaac4bf93d7d26334de143b10d64b3df407..c43ba9d879b1575b4d6b899ed532338be661c662 100644 (file)
@@ -1182,6 +1182,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);